Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate away from erb #357

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

migrate away from erb #357

wants to merge 5 commits into from

Conversation

b4ldr
Copy link
Member

@b4ldr b4ldr commented Jan 17, 2025

update the templating code to move away from erb and where possible use the print_config function

This PR is currently a WIP, couple of outstanding things

  • we need to add a spec test for unbound::remote so before we merge this so we can ensure parity (remote_spec: Add spec test for the unbound::remote class #358)
  • confirm it's ok to quote all string values
    • if so what about yes/no values?
  • spec tests are failing, but the error message suggests they shouldn't (hoping to get some help on this which is why im creating the pr early)

Also happy to split this up into separate PRs if needed

@b4ldr b4ldr force-pushed the migrate_to_epp branch 2 times, most recently from 95232a6 to f1c8e1b Compare January 17, 2025 19:52
) {
$records = $local_data.map |$record| {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's a lot going on here. Can you please add some comments about what's happening?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair comment will do

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated let me know what's missing?

@b4ldr b4ldr force-pushed the migrate_to_epp branch 2 times, most recently from 41fe534 to c270c7e Compare January 18, 2025 21:23
Copy link
Member Author

@b4ldr b4ldr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you have any idea on the spec test failure please say because im lost, specificly the error like

  77) unbound::stub on archlinux-6-x86_64 unbound::address is expected to contain Concat::Fragment[unbound-stub-lab.example.com] with content  supplied string
      Failure/Error:
                  expect(subject).to contain_concat__fragment('unbound-stub-lab.example.com').with_content(
                    <<~ZONE
                      stub-zone:
                        name: "lab.example.com"
                        stub-addr: "10.0.0.10@10053"
                        stub-host: "ns1.example.com"
                        stub-host: "ns2.example.com"
                        stub-first: no
                        stub-no-cache: no
                    ZONE

        expected that the catalogue would contain Concat::Fragment[unbound-stub-lab.example.com] with content set to supplied string
        Diff:
          <The diff is empty, are your objects producing identical `#inspect` output?>
      # ./spec/defines/stub_spec.rb:47:in `block (5 levels) in <top (required)>'

) {
$records = $local_data.map |$record| {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated let me know what's missing?

functions/clean_blank_lines.pp Outdated Show resolved Hide resolved
@b4ldr b4ldr force-pushed the migrate_to_epp branch 2 times, most recently from 8a52da2 to b29a0e5 Compare January 28, 2025 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants