Page MenuHomePhabricator

Integrate automated DNS snippets into CI
Closed, ResolvedPublic

Description

Modify CI process in some way to pull and check the DNS repository with the snippets present.

Event Timeline

The pulling the git looks straight forward (adding to the Dockerfile), as for actually testing against the pull I suspect we'll have to use the template mechanics that builds the DNS repository to pass a path to the path those snippets are checked out to so that any place we $INCLUDE a snippet, we use a template variable (such as {{INCLUDEPATH}} or somesuch) - correct me if I'm wrong @BBlack but looking at the docs for gdnsd it doesn't appear that there is a way to set the search path for $INCLUDES otherwise.

Change 568546 had a related patch set uploaded (by CRusnov; owner: CRusnov):
[integration/config@master] operations-dnslint: Add support for generated DNS as part of linting process

https://gerrit.wikimedia.org/r/568546

Change 569340 had a related patch set uploaded (by CRusnov; owner: CRusnov):
[operations/dns@master] tox: Support DNS_INCLUDE_DIR and generated DNS

https://gerrit.wikimedia.org/r/569340

Change 568683 had a related patch set uploaded (by CRusnov; owner: CRusnov):
[operations/dns@master] gen-zones.py: Add variable insertion

https://gerrit.wikimedia.org/r/568683

hashar triaged this task as Medium priority.Mar 11 2020, 8:53 AM

Summary of status:

We have decided that modifying the CI image itself is unnecessary in light of incidental changes to deploy-check.py in https://gerrit.wikimedia.org/r/c/operations/dns/+/569340 - which automatically pulls a copy of the repository as needed to test the current state of the zone files.

The changes in that patch either use an existing checkout or pull, and copy the repository into the output tree for inclusion. This simplifies changes to gen-zones.py (well, obviates them) and lets us use a simple $INCLUDE in the zone files themselves. It facilitates local testing and CI, as well as pre-flight testing on target machines. I have tested local and CI testing.

Change 568546 abandoned by CRusnov:
operations-dnslint: Add support for generated DNS as part of linting process

Reason:
This has been superceded by a clever change downstream.

https://gerrit.wikimedia.org/r/568546

Change 568683 abandoned by CRusnov:
gen-zones.py: Add variable insertion

Reason:
This is no longer needed, although a neat feature.

https://gerrit.wikimedia.org/r/568683

Change 569340 merged by CRusnov:
[operations/dns@master] tox: Support DNS_INCLUDE_DIR and generated DNS

https://gerrit.wikimedia.org/r/569340

This has been complete for some time.