Make the API tighter. The idea of this commit is to highlight the
distinction between a database transaction and a journal transaction,
and ensure we run dns_zone_verifydb on error.
Done to simplify a later refactor.
(cherry picked from commit 399f0c191a)
These functions don't need to be called from multiple places and
by making them static we will detect when they are not added to the
list functions to be tested.
Closes#5715
Backport of MR !11480
Merge branch 'backport-5715-isc_run_test_impl-should-use-a-static-declaration-9.20' into 'bind-9.20'
See merge request isc-projects/bind9!11502
These functions don't need to be called from multiple places and
by making them static we will detect when they are not added to the
list functions to be tested.
(cherry picked from commit 22d664aa15)
Use isc_one_or_more and isc_zero_or_more rather than (-2) and
(-1) when calling isc_base64_tobuffer. Similarly for
isc_hex_tobuffer. This should help reduce the probability
that the wrong number is used and it makes the intent clearer.
Closes#5713
Backport of MR !11479
Merge branch 'backport-5713-use-macros-with-isc_base64_tobuffer-and-isc_hex_tobuffer-9.20' into 'bind-9.20'
See merge request isc-projects/bind9!11498
This adds the following enum isc_one_or_more and isc_zero_or_more
which specify if one or more or zeror or more bytes are required
when reading the unbounded base64 / hex encoded data.
(cherry picked from commit 07610f8566)
If a response policy zone (RPZ) or a catalog zone contained an
`$INCLUDE` directive, then manually reloading that zone could
fail to process the changes in the response policy or in the
catalog, respectively. This has been fixed.
Closes#5714
Backport of MR !11489
Merge branch 'backport-5714-zone_loaddone-rpz-and-catz-bugfix-9.20' into 'bind-9.20'
See merge request isc-projects/bind9!11496
The zone_loaddone() function disables database notifications for
a catalog zones and response policy zones (RPZ) when loading had
failed. Howerer, the 'result != ISC_R_SUCCESS' check is insufficient,
because the DNS_R_SEENINCLUDE result also indicates success.
Add a second condition for the "if" block.
(cherry picked from commit 31290eccb1)
If the system_test_dir contains a symlink, then it might cause issues
further down when using relative_to(), unless it is resolved first. This
has been observed on FreeBSD13 in CI where /home is a symlink to
/usr/home.
Backport of MR !11490
Merge branch 'backport-nicki/pytest-freebsd13-artifacts-path-9.20' into 'bind-9.20'
See merge request isc-projects/bind9!11494
If the system_test_dir contains a symlink, then it might cause issues
further down when using relative_to(), unless it is resolved first. This
has been observed on FreeBSD13 in CI where /home is a symlink to
/usr/home.
(cherry picked from commit b1e3469059)
Turns out the original ans.pl implementation before (!10928) was a copy
of an old version of the ans2 server from the resolver system test.
I reimplemented it fully, even though only two ResponseHandlers are
actually used in the statistics test.
(cherry picked from commit 7d5ec7167b)
Store the most specific matching domain in DomainHandler and
expose it through the `matched_domain` property for subclasses
to use in their implementations of `get_responses`.
(cherry picked from commit b89cc2bd86)
Fix bugs in BRID and HHIT implementation and enable
the unit tests.
Closes#5710
Backport of MR !11491
Merge branch 'backport-5710-fix-hhit-and-brid-issues-9.20' into 'bind-9.20'
See merge request isc-projects/bind9!11492
Additionally, the test was badly implemented. This has been fixed.
Closes#5712
Backport of MR !11478
Merge branch 'backport-5712-unit-test-tsig_badsig-was-not-being-called-9.20' into 'bind-9.20'
See merge request isc-projects/bind9!11485
When creating the `DSYNC` record from a structure, `uint16_tobuffer` was used instead of `uint8_tobuffer` when adding the scheme, causing a `DSYNC` record that was one octet too long. This has been fixed.
Closes#5711
Backport of MR !11477
Merge branch 'backport-5711-dsync_fromstruct-produces-an-invalid-record-9.20' into 'bind-9.20'
See merge request isc-projects/bind9!11483
uint16_tobuffer was used instead of uint8_tobuffer when adding the
scheme to the buffer. This produced a record that was one octet
too long. This has been fixed.
(cherry picked from commit 3180e50459)
Some CI jobs spend more time pulling the docker image and setting up their environment than running the script. This MR adds a tag `smalljob` to jobs considered lightweight in order to run them on a dedicated small VM.
Backport of MR !11266
Merge branch 'backport-andoni/try-small-vm-for-lightweight-ci-jobs-9.20' into 'bind-9.20'
See merge request isc-projects/bind9!11481
Jobs using the "post_merge" and "manual_release_job_qa" anchors also
complete in less than a minute, so they now include the "smalljob" tag.
Since the "release" job is also a fast one, but without an anchor, the
"smalljob" tag is added to its definition.
The "autoconf_job" definion also includes the tag and it is kept in its
own stage.
(cherry picked from commit e9f2b7944e)
In .gitlab-ci.yml, since "&other_checks_job" has "needs: []", remove
that line from the jobs that use that anchor.
(cherry picked from commit 66175b448c)
Most jobs in this stage have it by default, so it makes sense to
add it to their common anchor. Jobs with different "needs:" will
override it.
(cherry picked from commit 432b7d7954)
Given the short runtime (<1min) of the "linkcheck" and
"generate-tsan-stress-test-configs" CI jobs, move them to the
"quick-checks" stage.
(cherry picked from commit ae76829157)
Move CI stage "other-checks" right after "quick-checks" and get the jobs
in it as close to each other as possible in .gitlab-ci.yml.
Since no job is allowed to depend (via "needs") on any job that is
assigned to a stage later than its own, move the "tsan:stress" and
"gcov" jobs to the "system" stage.
(cherry picked from commit 4f89d32bff)
Jobs with more than one minute of runtime are not considered for the
small VM.
The "tarball-create" job goes to the more appropriate "build" stage.
"coccinelle" and "checkbashisms" are moved to the generic
"other-checks".
(cherry picked from commit ba5844a1de)
Rename the "postcheck" CI stage to the more generic "other-checks".
Slower jobs that still run in autoscaled runners belong here, as opposed
to the lightweight ones in "quick-checks".
(cherry picked from commit 6d442c4a06)
Most jobs in the "precheck" stage spend more time setting up their
environment than running the script (seconds), this allows us to add a
small always on dedicated runner instead of the autoscaled ones.
Hence, the stage is renamed to "quick-checks", and a tag "smalljob" is
added to the anchor so that these jobs are picked by the dedicated
runner.
(cherry picked from commit 9aa5041a88)
Read the Docs fails to pick the latest version when updating the `stable` tag, i.e. a build is triggered but it takes the previous version of it. This is a known bug in RtD: https://github.com/readthedocs/readthedocs.org/issues/10838.
The only approach that seems to solve this on our end, is to wait some time and trigger the build again so that it picks the latest version of the tag.
Backport of MR !11475
Merge branch 'backport-andoni/fix-rtd-picking-old-version-when-stable-branch-update-9.20' into 'bind-9.20'
See merge request isc-projects/bind9!11476
Read the Docs fails to pick the latest version of the stable tag when
updated, i.e. a build is triggered but it takes the previous version.
This commit triggers a second build after 5 minutes to ensure that the
correct tag version is used for the documentation.
This is a known bug in RtD:
https://github.com/readthedocs/readthedocs.org/issues/10838.
(cherry picked from commit 168b15cfd9)
Python 3.10 or newer is now required for running the system test suite. The required python packages and their version requirements are now tracked in `bin/tests/system/requirements.txt`.
Support for pytest 9.0.0 has been added its minimum supported version has been raised to 7.0.0. The minimum supported dnspython version has been raised to 2.3.0.
Closes#5690Closes#5614
Backport of MR !11415
Merge branch 'backport-nicki/pytest-9-compat-9.20' into 'bind-9.20'
See merge request isc-projects/bind9!11469