Commit Graph

36311 Commits

Author SHA1 Message Date
Petr Špaček
96691c5873 Parse and render rst syntax in :short: statement descriptions in tables
Without this change tables generated by .. namedconf:statementlist::
contained raw text and displayed rst syntax to users.

The raw docutil node returned by rst parser can contain unresolved
references (pending_xref nodes). We just store those nodes and let
Sphinx to resolve them later on.

Beware: This would not work if we injected nodes in later stages of
processing. All unresolved references must be in place before
'doctree-resolved' event is emitted (i.e. before resolve_references() is
called inside Sphinx).

(cherry picked from commit 62f3cf98d3)
2022-07-04 15:36:44 +02:00
Petr Špaček
6ac047cfaa Generate tables of statements in doctree-read phase
This change allows us to generate "unresolved" references and let Sphinx
deal with dereferencing them in later stages. It is not useful by itself
but it serves as preparation for the next commit.

(cherry picked from commit b109c86805)
2022-07-04 15:36:44 +02:00
Petr Špaček
824ff41f32 Optimize resolve_xref to avoid O(n^2) iteration
Formerly resolve_xref() in Sphinx extension called get_objects() from
Sphinx API which subsequently iterated the whole list of objects,
causing single iteration per single reference, which is essentially.
O(n^2). Avoid using get_objects() and access internal dictionary
directly intead.

The docs build time was still dominated by other factors but speedup is
about 10 % on my machine.

(cherry picked from commit 8a5f20121e)
2022-07-04 15:36:40 +02:00
Petr Špaček
6d3c318538 Merge branch 'marka-cobertura-replaced-by-coverage_report-v9_18' into 'v9_18'
Fix for GitLab 15.0: cobertura replaced by coverage_report [v9_18]

See merge request isc-projects/bind9!6513
2022-07-04 05:31:05 +00:00
Mark Andrews
9ca645bdaf Fix for GitLab 15.0: cobertura replaced by coverage_report
From Gitlab 15.0 release notes:

   artifacts:reports:cobertura keyword

   As of GitLab 15.0, the artifacts:reports:cobertura keyword has
   been replaced by artifacts:reports:coverage_report. Cobertura
   is the only supported report file, but this is the first step
   towards GitLab supporting other report types.

(cherry picked from commit 008032d268)
2022-07-04 07:11:14 +02:00
Petr Špaček
34a1e3db92 Merge branch 'pspacek/arm-grammar-render-v9_18' into 'v9_18'
Render grammar snippets in the ARM [v9_18]

See merge request isc-projects/bind9!6507
2022-07-01 08:43:16 +00:00
Petr Špaček
85626adeb8 Add note that named.conf man page is not a complete manual
We cannot simply do URL because it would make our lives more complicated
with -S edition.

(cherry picked from commit 908acd5d70)
2022-07-01 10:21:06 +02:00
Petr Špaček
e8cb9cceb7 Cleanup tag filtering code for statementlist:: RST directive
Technically this is fixup for
33931c97fa
but that commit is already merged.

(cherry picked from commit f5faddd08a)
2022-07-01 10:21:06 +02:00
Petr Špaček
666f0f1d40 Add link anchor and hyperlinks to keys statement
This is super confusing because statement "keys" exists in context
controls and server blocks where it refers to symmetric TSIG key, and it
_also_ exists in dnssec-policy block where it specifies public-private
key pair parameters.

In an (unsuccessful) attempt to disambiguate these two I added bunch of
hyperlinks and a warning.

(cherry picked from commit d88fefbb4a)
2022-07-01 10:21:06 +02:00
Petr Špaček
af15c21bc3 Describe rndc server block using .. rndcconf syntax
We need to split the description to silence warnings about undescribed
statements.

(cherry picked from commit 82e2f0b37e)
2022-07-01 10:21:06 +02:00
Petr Špaček
990ec8f15b Define default-source-address, default-source-address-v6 for rndc
(cherry picked from commit 10f88bffe5)
2022-07-01 10:21:06 +02:00
Petr Špaček
763e40de22 Document ipv4only-* options in the ARM
Statements ipv4only-contact, ipv4only-enable, ipv4only-server did not
have their own section in the ARM. Now they have.

(cherry picked from commit 1687b40849)
2022-07-01 10:21:06 +02:00
Petr Špaček
d6005488b8 Add missing link anchor for dlz search statement
(cherry picked from commit 40b3ce727c)
2022-07-01 10:21:06 +02:00
Petr Špaček
07cfcf8691 Special-case zone in-view
It is not really a zone type, so let's not generate "type in-view"
anchor for it.

(cherry picked from commit 261bdc7358)
2022-07-01 10:21:06 +02:00
Petr Špaček
e55682f6f7 Remove extra whitespace in grammar for null statement
(cherry picked from commit 1af157eb20)
2022-07-01 10:21:06 +02:00
Petr Špaček
fa871ffa67 Add ability to filter tables using blocks
A new syntax
.. namedconf:statementlist::
   :filter_blocks: type secondary
allows to generate tables with statements allowed within specified
blocks.

(cherry picked from commit 08a8acffdc)
2022-07-01 10:21:06 +02:00
Petr Špaček
ca866c7e92 Sort grammar map keys while pretty printing them
It would be too easy if we could just call sorted(). Thanks to zone
grammar the most important key "type" gets sorted near end, so we pull
it up to the top using a hack.

(cherry picked from commit 5c04e3c524)
2022-07-01 10:21:05 +02:00
Petr Špaček
9b2bf0f8be Pretty-print grammar for zones
It turns out the tree of dictionaries is not the best structure to
represent our grammar, unfortunatelly. The problem is that "zone" has
several context-dependent variants which change meaning of "zone" based
on inner field "type".

Redesigning the whole structure does not seem to be worth, so I settled
on this terrible hack.

(cherry picked from commit 0392144e99)
2022-07-01 10:21:05 +02:00
Petr Špaček
c4133e8779 Add zone definitions into the view grammar
I cannot see a reasonable way to achieve this without the hack in this
commit.

(cherry picked from commit 435cbb61ba)
2022-07-01 10:21:05 +02:00
Petr Špaček
bc729e39da Add option to suppress grammar rendering
A new flag
.. namedconf:statement::
   :suppress_grammar:
suppresses pretty-printing grammar.

It is useful mostly for zones because each zone has it's own grammar, so
printing all of them at once usually does not make sense.

(cherry picked from commit 1f5bc4fe3b)
2022-07-01 10:21:05 +02:00
Petr Špaček
243ae3b6a7 Remove auto-generated rst files in repo in favour of grammar pretty printer
(cherry picked from commit 0bbbdc6244)
2022-07-01 10:20:56 +02:00
Petr Špaček
f34c1034f2 Warn about experimental and deprecated options
(cherry picked from commit 7b4ad8a3ff)
2022-07-01 10:00:28 +02:00
Petr Špaček
3a692b068c Render statement's grammar
This is replacement for auto-generated *.rst files stored in the repo.

(cherry picked from commit c6fe8970f6)
2022-07-01 10:00:28 +02:00
Petr Špaček
2df4072d43 Render list of blocks accepting a given statement
(cherry picked from commit eba3b1ad16)
2022-07-01 10:00:28 +02:00
Petr Špaček
a486e6e294 Detect unsupported statement:: directives with multiple names
(cherry picked from commit d61d998e3b)
2022-07-01 10:00:28 +02:00
Petr Špaček
4c53d6f906 Warn about statements not found in the grammar
(cherry picked from commit ebe6ede2ec)
2022-07-01 10:00:28 +02:00
Petr Špaček
b11b1c6414 Warn about statements in grammar not described in docs
Skip over obsolete options.

(cherry picked from commit cbad1803a5)
2022-07-01 10:00:27 +02:00
Petr Špaček
7fe582629a Give Sphinx configuration domains access to grammar
(cherry picked from commit 1c6f2c5ad1)
2022-07-01 10:00:27 +02:00
Petr Špaček
160428a0f7 Add helper to unify options and zone block grammars
A helper is needed to combine cfg_test output for generic options and
all the type-dependent zone block variants.

(cherry picked from commit a691ebd0c9)
2022-07-01 10:00:27 +02:00
Petr Špaček
ec9af7dbc7 Add pretty printer for JSON grammar
It produces the same format as cfg_test --grammar. The advantage is that
it allows to print any node in configuration the tree, not just whole
blocks.

(cherry picked from commit 190004e46c)
2022-07-01 10:00:27 +02:00
Petr Špaček
aabdff9551 Add utility to search for context-dependent configuration statements
The utility detects statements which use the same name (e.g.
max-zone-ttl) but use different grammar in different contexts. These
typically need special case in docs.

(cherry picked from commit 8960d51aa3)
2022-07-01 10:00:27 +02:00
Petr Špaček
a78b461653 Add a new library to parse grammar format produced by cfg_test
It transforms named.conf/rndc.conf grammar from text format into Python
dictionary. This allows granular access to grammar elements.

Beware: It heavity depens on cfg_test output format!
(cherry picked from commit df08982930)
2022-07-01 10:00:27 +02:00
Petr Špaček
e9d21cee3b Add rndc.conf grammar into doc/misc
It uses the same mechanism as all other grammars, but the file is named
differently to distinguish it from named.conf grammars.

(cherry picked from commit fb474de3ab)
2022-07-01 10:00:27 +02:00
Petr Špaček
214da1de67 Un-format grammar files in doc/misc
The next commit is going to add parser for ISC configuration format.
To simplify the parser the grammar files in doc/misc are no longer
line-wrapped as handling it would make the grammar parser unnecessairly
complicated.

This affects visible output in the ARM, but in the end we are going to
replace the auto-generated .rst files with grammar pretty printed, so
formatting of these files does not matter in practical terms.

(cherry picked from commit 699570cdec)
2022-07-01 10:00:20 +02:00
Petr Špaček
a46f671a30 Add missing comment markers to doc/misc/ grammar files
These files can be consumed by scripts, so obviously missing comment
markers wreak havoc.

(cherry picked from commit af3683f436)
2022-07-01 09:26:18 +02:00
Petr Špaček
19e40f34bc Merge branch 'sgoldlust/arm-tag-query-transfer-v9_18' into 'v9_18'
Add tags and short descriptions for query and transfer statements [v9_18]

See merge request isc-projects/bind9!6504
2022-06-30 16:16:00 +00:00
Petr Špaček
364a15da16 Accept rst syntax in .. statement:: short: text
Nested rst syntax is now parsed and rendered. E.g.:

.. namedconf:statement:: example
   :short: Use ``this`` **cool** syntax!

(cherry picked from commit 563eb8e1b9)
2022-06-30 18:12:01 +02:00
Petr Špaček
5513f47e53 Disambiguate address_match_list link anchor
Let's keep just the :term: produced by grammar glossary.

(cherry picked from commit 0e7ca5b5e0)
2022-06-30 18:12:01 +02:00
Suzanne Goldlust
d4b1916a59 Add the :tags: and :short: descriptions for the category "transfer"
(cherry picked from commit 3cf976bd78)
2022-06-30 18:12:01 +02:00
Suzanne Goldlust
51057d3c85 Add the :tags: and :short: descriptions for the category "query"
(cherry picked from commit 7187a5cf77)
2022-06-30 18:12:01 +02:00
Petr Špaček
62958590cd Resurrect DNS NOTIFY chapter in the ARM
It was accidentally removed in the heat of
25eb91d23c.

(cherry picked from commit 2630cf8e76)
2022-06-30 18:11:54 +02:00
Michal Nowak
783be731bf Merge branch '2371-add-stress-testing-with-rpz-v9_18' into 'v9_18'
[v9_18] Add stress testing with RPZ

See merge request isc-projects/bind9!6497
2022-06-28 19:47:05 +00:00
Michal Nowak
46a8cf94c6 Add stress testing with RPZ
(cherry picked from commit d272574653)
2022-06-28 20:37:40 +02:00
Petr Špaček
2de747d246 Merge branch '3408-drop-debian-9-stretch-v9_18' into 'v9_18'
Drop support for Debian 9 (Stretch) [v9_18]

See merge request isc-projects/bind9!6495
2022-06-28 15:57:20 +00:00
Petr Špaček
ccb608ebea Declare Debian 9 (Stretch) community-maintained
(cherry picked from commit 4ce1f25210)
2022-06-28 17:56:34 +02:00
Petr Špaček
85de8f8c15 Drop Debian 9 (Stretch) from CI
(cherry picked from commit aa86a8bcf0)
2022-06-28 17:56:34 +02:00
Artem Boldariev
07cbd5500e Merge branch '3415-update-http-listeners-on-reconfig-v9-18' into 'v9_18'
[Backport to 9.18]: Update HTTP listeners settings on reconfiguration

See merge request isc-projects/bind9!6494
2022-06-28 14:27:31 +00:00
Artem Boldariev
69e1d3804e doth test: extend with HTTP endpoints reconfiguration check
This commit add a check which verifies that HTTP endpoints are being
picked up properly by the BIND instance on a reconfiguration.

(cherry picked from commit 7822670d0f)
2022-06-28 16:38:21 +03:00
Artem Boldariev
12a6fafae2 Update CHANGES [GL #3415]
Mention that the settings are now applied properly on reconfiguration.

(cherry picked from commit 502c78c339)
2022-06-28 16:38:18 +03:00
Artem Boldariev
b6b07c5646 Update the set of HTTP endpoints on reconfiguration
This commit ensures that on reconfiguration the set of HTTP
endpoints (=paths) is being updated within HTTP listeners.

(cherry picked from commit d2e13ddf22)
2022-06-28 16:37:31 +03:00