Skip to content

Changelog block publish clause is not heeded by render command #2544

@lcawl

Description

@lcawl

Describe the bug

While updating elastic/elasticsearch#140141 to work with the new changelog configuration format implemented in #2534, the block: create clauses successfully prevented changelogs from being created. However the block: publish clauses seemed to have no effect on the "docs-builder changelog render" command. That is to say, changelog entries that ought to have been commented out of the markdown content were still visible. This is a regression from previous behaviour.

Expected behavior

When you use the changelog configuration file and the steps listed in elastic/elasticsearch#140141, the changelogs with "Allocation" and "CCS" areas should be commented out of the index.md output file.

Steps to reproduce

To test the use of this configuration file:

  1. Obtain the changelog configuration file from [DOCS] Add changelog configuration file elasticsearch#140141, for example.

  2. Run the docs-builder changelog add command to generate changelogs for a PR that uses the type and area labels that are included in the changelog.yml. For example:

    docs-builder changelog add --prs 140034,135597,139703,137566 --repo elasticsearch --owner elastic \
      --products "elasticsearch 9.3.0" --output ./docs/changelog/new \
      --config ./docs/changelog.yml

    Confirm that the changelogs have been successfully created with appropriate area values.

  3. Run the docs-builder changelog add command to test the block: create clause. For example:

    docs-builder changelog add --prs https://github.com/elastic/elasticsearch/pull/140227  \
      --products "elasticsearch 9.3.0" --config ./docs/changelog.yml \
      --output ./docs/changelog/new

    Confirm that the changelog was not created due to the presence of a "non-issue" label.

  4. Run the docs-builder changelog bundle and docs-builder changelog render commands to generate docs that heed the block:publish config. For example:

    docs-builder changelog bundle --directory ./docs/changelog/new --all \
       --output-products "cloud-serverless 2025-01-23 ga"
    docs-builder changelog render \
       --input "/path/to/elasticsearch/docs/changelog/new/changelog-bundle.yaml|/path/to/elasticsearch/docs/changelog/new|elasticsearch|keep-links" \
       --output ./docs/release-notes/_snippets \
       --config ./docs/changelog.yml
     ``
    

The output from this command includes an index.md file which is where the problem can be seen.

Tooling

  • docs-builder
  • migration tooling
  • I'm not sure

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions