Skip to content

fix sync-maintainers parser for subgroup table format#2228

Open
false200 wants to merge 1 commit into
flatcar:mainfrom
false200:fix/sync-maintainers-parser
Open

fix sync-maintainers parser for subgroup table format#2228
false200 wants to merge 1 commit into
flatcar:mainfrom
false200:fix/sync-maintainers-parser

Conversation

@false200

Copy link
Copy Markdown

Fix sync-maintainers parser for the new MAINTAINERS.md layout

Fixes #2227

The central MAINTAINERS.md file was rewritten to use maintainer subgroup tables. sync-maintainers.py still parsed the old ### repo block format, so ./sync-maintainers.py list printed nothing and the repo and github commands had no repos to work on.

This change parses repos and maintainers from the Maintainer Subgroups table instead. Maintainer entries are written as * @user lines so the existing get_assignees() logic still works. Also fixes the success log that was printing the literal text {repo_name} ok.

How to use

From the sync-maintainers/ directory, install dependencies and run the list command.

pip install -r requirements.txt
./sync-maintainers.py list

You should see 15 repo names from the subgroup table (nebraska, mantle, sysext-bakery, and the rest). Before this change the command returned no output. Cross check that list against the Repositories column in the Maintainer Subgroups table in MAINTAINERS.md.

Testing done

Ran from sync-maintainers/ on Windows with Python 3.

pip install -r requirements.txt
./sync-maintainers.py list

Output:

flatcar-app-jitsi
flatcar-app-minecraft
flatcar-linux-build-secrets
flatcar-linux-infra
flatcar-linux-infra-secrets
flatcar-maintainer-private
flatcar-socials
flatcar-website
go-omaha
jenkins-os
jenkins-secret
mantle
nebraska
nebraska-update-agent
sysext-bakery

Also verified in Python that parse_maintainers() returns 15 repos, the intro paragraph is still read correctly, and nebraska gets the six maintainers from the nebraska-maintainers subgroup row with valid assignee usernames.

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

Not applicable for this change. This PR only touches the maintainer sync script in the Flatcar meta repo.

Signed-off-by: false200 <214800619+false200@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

sync-maintainers.py finds zero repos after MAINTAINERS.md was rewritten

1 participant