Skip to content

fix(ci): update README sync for source-built stack - #131

Merged
john00003 merged 9 commits into
ROCm:mainfrom
2imi9:fix/readme-version-sync
Aug 20, 2026
Merged

john00003 merged 9 commits into
ROCm:mainfrom
2imi9:fix/readme-version-sync

Conversation

@2imi9

@2imi9 2imi9 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Motivation

Restore the README version-sync workflow after the source-build stack changed the Dockerfile ARG names.

Technical Details

Read the current component ARGs, update the current badges and stack table, and fail if required metadata or README fields are missing.

Test Plan

Check the current Dockerfile, a synthetic version bump, and missing metadata; run YAML parsing, ShellCheck, and git diff --check.

Test Result

All checks pass locally. The current README stays unchanged, and the version-bump fixture updates every owned field.

Submission Checklist

The version sync workflow still parsed ROCm from FROM and expected the removed VLLM_VERSION and VLLM_ROCM_VARIANT arguments. After the source-build stack landed, the extraction step exited before producing outputs.

Read the current Dockerfile ARGs, update the current badge and stack-table layout, fail on missing or ambiguous fields, and exercise the renderer on pull requests.
@sbates130272 sbates130272 added the bug Something isn't working label Aug 12, 2026
@sbates130272
sbates130272 requested a lite review from Copilot August 12, 2026 15:37
@sbates130272

Copy link
Copy Markdown
Collaborator

@2imi9 I want to go a different way. I want to add this as a CI check on code on a PR into main and give the user direction on how to fix so we can get merges into main. If you want to adapt your PR to do that I will review that!

@sbates130272 sbates130272 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's change this to trigger on PR into main and run a check and inform user of any mismatches they need to fix before merge.

@2imi9

2imi9 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

@sbates130272 got it. I updated the PR to run a read-only README consistency check on PRs targeting main, with actionable mismatch details and a repair command.

Comment thread .github/scripts/workflows/sync-readme-versions.py
Comment thread .github/scripts/workflows/test_sync_readme_versions.py
Comment thread .github/workflows/aic-update-readme-shields.yml
Comment thread .github/workflows/aic-update-readme-shields.yml Outdated
Comment thread .github/workflows/aic-update-readme-shields.yml Outdated
@2imi9

2imi9 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

@sbates130272 everything fixed in d941956

@2imi9
2imi9 requested a review from sbates130272 August 14, 2026 03:02
@2imi9

2imi9 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

What would be most useful for me to help with now? I can finish #127 or #130, or switch to a higher-priority issue.

@john00003

john00003 commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

@2imi9 Stephen may be away for a bit. I can help run CI and review things if need be. Just give me a ping on GitHub.

Work on whatever you are most interested in!

@2imi9

2imi9 commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

@john00003 Thanks! I just finished checking #130. It’s ready for review.

…sync

Upstream ROCm#138 landed the same runner/workflow script split under
.github/scripts/, so drop this branch's competing top-level scripts/
move and keep only the README version check. The sync script and its
tests move to .github/scripts/workflows/ to match.
pull_request:
branches: [main]
paths: [docker/Dockerfile]
types: [opened, synchronize, reopened, edited]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
types: [opened, synchronize, reopened, edited]
types: [opened, synchronize, reopened]

I believe edited means this would trigger on things such as modifying a PR's title or description as well. Is my understanding correct?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that’s correct. I removed it.

# stack declared in docker/Dockerfile.

name: AIC Update README Shields
name: AIC README Version Check

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add a paths: filter, that only runs this on changes to docker/Dockerfile, README.md, patches/**, or the script change?

@2imi9 2imi9 Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just added

from urllib.parse import quote


REPO_ROOT = Path(__file__).resolve().parents[2]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be parents[3]? My agent flagged that this was failing and proposed a fix:

 # test_sync_readme_versions.py:28  — where the fixture dir is made
  -        (self.root / "scripts" / "workflows").mkdir(parents=True)
  +        (self.root / ".github" / "scripts" / "workflows").mkdir(parents=True)

  # test_sync_readme_versions.py:40  — where setUp copies to, and run_sync executes from
  -        return self.root / "scripts" / "workflows" / SCRIPT_NAME
  +        return self.root / ".github" / "scripts" / "workflows" / SCRIPT_NAME

  mkdir(parents=True) already creates the intermediate .github/, so no extra call is needed. Everything else keys off the script property — setUp's shutil.copy2 destination and run_sync's argv — so those two edits move the whole fixture.

  The other fixture paths stay put: dockerfile is self.root / "docker" / "Dockerfile" and readme is self.root / "README.md", which are correct relative to the tmpdir-as-repo-root either way.

  Full change

  Four edits, verified together above (CHECK_EXIT=0, Ran 12 tests ... OK):

  1. parents[2] → parents[3] in both files.
  2. The two fixture-layout lines above.
  3. The two repair hints in sync-readme-versions.py:243 and :267 — they currently print python3 scripts/workflows/..., a path that doesn't exist.
  4. The two test assertions at :132 and :272 that pin those hint strings.

Let me know what your thoughts are!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you !

parents[2] resolved to .github, so the script was incorrectly looking for .github/docker/Dockerfile. I changed both files to use parents[3], moved the test fixture script under .github/scripts/workflows, and corrected the repair-command paths and assertions.

I verified the fix with the real metadata check and all 12 tests passing. Fixed in 18e77b2.

@john00003

Copy link
Copy Markdown
Collaborator

Let me install the updates workflows on my runner and try a CI run!

@john00003
john00003 merged commit 8647036 into ROCm:main Aug 20, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants