Consolidate sections.yaml + areas.yaml into single changelogs/changelogs.yaml#4561
Closed
Copilot wants to merge 2 commits into
Closed
Consolidate sections.yaml + areas.yaml into single changelogs/changelogs.yaml#4561Copilot wants to merge 2 commits into
sections.yaml + areas.yaml into single changelogs/changelogs.yaml#4561Copilot wants to merge 2 commits into
Conversation
Agent-Logs-Url: https://github.com/envoyproxy/toolshed/sessions/7fc64e7a-10f3-4c96-8f45-119e50cf0cf5 Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Consolidate sections.yaml and areas.yaml into changelogs.yaml
Consolidate May 18, 2026
sections.yaml + areas.yaml into single changelogs/changelogs.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the two separate
changelogs/sections.yamlandchangelogs/areas.yamlconfig files with a singlechangelogs/changelogs.yaml. Clean cutover — no fallback, no legacy file support, no deprecation path.New file shape:
envoy.base.utilstyping.py: addsChangelogConfigDict(total=False, keyssections: ChangelogSectionsDict,areas: ChangelogAreasDict)changelog.py:CHANGELOG_SECTIONS_PATH+CHANGELOG_AREAS_PATH→CHANGELOG_CONFIG_PATH = "changelogs/changelogs.yaml"configcached property loads the combined file; raisesChangelogErroronReaderError, logs warning and returns partial value onTypeCastingErrorsections/areasbecome thin views:config["sections"]andcast(..., config.get("areas", {}))— missing areas section is silently empty, missing sections surfaces naturally asKeyErrorsections_path/areas_path→ singleconfig_pathvalidate_sectionserror message updated to referencechangelogs/changelogs.yamlenvoy.code.checkCHANGELOG_AREAS_PATH→CHANGELOG_CONFIG_PATHCHANGELOG_AREAS_FILE→CHANGELOG_CONFIG_FILEcheck_entry_filenameandcheck_areas_filenow citechangelogs/changelogs.yamlTests
sections/areasunit tests (which patchedfrom_yamldirectly) replaced with: oneconfigproperty test covering all error paths + thin-view tests forsectionsandareassections_path/areas_pathtests replaced byconfig_pathchangelogs/changelogs.yamlwithsections:top-level keycheck_areas_fileexpected strings updated fromchangelogs/areas.yaml→changelogs/changelogs.yamlOriginal prompt
Background
Stacked on PR #4560 (branch
copilot/add-areas-yaml-validation), which adds validation forchangelogs/areas.yaml.We want to consolidate
changelogs/sections.yamlandchangelogs/areas.yamlinto a single config file:changelogs/changelogs.yaml.This is an in-tree managed config consumed only by toolshed + envoy. No external consumers. The plan PR (envoy#45093) introducing
areas.yamlhasn't merged yet, andsections.yamlonly lives in envoy. So we do a clean cutover — no back-compat, no fallback to legacy paths, no deprecation warnings, no migration period. After this PR lands,sections.yamlandareas.yamlare simply no longer read by toolshed.Scope (this PR — stacked on
copilot/add-areas-yaml-validation)File format
New file
changelogs/changelogs.yamlwith two top-level keys, each a mapping of registry-key → entry-with-title(and optionaldescriptionfor sections):Toolshed changes —
py/envoy.base.utils/envoy/base/utils/abstract/project/changelog.pyCHANGELOG_SECTIONS_PATH = "changelogs/sections.yaml"withCHANGELOG_CONFIG_PATH = "changelogs/changelogs.yaml".CHANGELOG_AREAS_PATHconstant added in PR Addareas.yamlvalidation to changelog checker (file integrity + entry prefix mapping) #4560 (since the base branch this PR stacks on adds it).configcached property onAChangelogsthat readschangelogs/changelogs.yamland returns a typed dict withsectionsandareaskeys.ReaderError→ raiseChangelogError(same as the existingsectionsproperty does).TypeCastingError→ log a warning and return the partial value (same as existingsectionsbehaviour).sectionsandareascached properties to be thin views:return self.config["sections"]andreturn self.config.get("areas", {})respectively. (Areas-section absent in config → empty dict is fine; sections must be present, otherwise validation downstream will fail naturally.)sections_pathproperty with aconfig_pathproperty pointing at the new file. Delete theareas_pathproperty added in PR Addareas.yamlvalidation to changelog checker (file integrity + entry prefix mapping) #4560.changelogs/sections.yamlorchangelogs/areas.yaml(invalidate_sections, and in the new area checks from Addareas.yamlvalidation to changelog checker (file integrity + entry prefix mapping) #4560) should now referencechangelogs/changelogs.yaml.Toolshed changes —
py/envoy.base.utils/envoy/base/utils/typing.pyChangelogConfigDicttyping entry (a TypedDict withsections: ChangelogSectionsDictandareas: ChangelogAreasDictkeys; both can stay defined as they are).Toolshed changes —
py/envoy.code.check/envoy/code/check/abstract/changelog.pycheck_areas_file/check_config_filemethod added in PR Addareas.yamlvalidation to changelog checker (file integrity + entry prefix mapping) #4560 keeps the same checks (duplicate titles, valid title chars, valid key chars) but now operates against the loaded config'sareassection and reportschangelogs/changelogs.yamlas the source path.areas.yamlvalidation to changelog checker (file integrity + entry prefix mapping) #4560 (currently gated onareas.yamlexisting) should now gate onchangelogs/changelogs.yamlexisting AND containing anareassection. Without an areas section → skip area-prefix validation incheck_entry_filename, skipcheck_config_fileentirely (no errors).Tests
py/envoy.base.utils/tests/test_abstract_project_changelogs.pyandpy/envoy.code.check/tests/test_abstract_changelog.pythat referencesections.yaml,areas.yaml,CHANGELOG_SECTIONS_PATH,CHANGELOG_AREAS_PATH,sections_path,areas_pathto use the newchangelogs.yaml/CHANGELOG_CONFIG_PATH/config_path.sections.yamltotmp_pathliketest_abstract_changelog_data_unknown_section) to write the consolidatedchangelogs.yamlinstead.configcached property: missing file →ChangelogError(NOT silent — it's a required config now); valid file → parsed dict; unparseable →ChangelogError; type-cast warning path → returns partial value.sectionsandareasare correctly extracted fromconfig.Out of scope (do NOT do in this PR)
sections.yamlorareas.yaml.get_data_from_entries).changelogs/changelogs.yaml, deletingchangelogs/sections.yaml, updatingdocs/BUILDgenruletoolslist, droppingareas.yamlfrom in-flight envoy#45093) is a coordinated follow-up that happens once this toolshed PR is published in a wheel.Base branch
This PR is stacked on
copilot/add-areas-yaml-validation(PR #4560). Base it on that branch. The diff this PR introduces sho...This pull request was created from Copilot chat.