Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nicer platform sync workflow: parallel and with Dev Center markdown generation #672

Merged
merged 5 commits into from
Dec 7, 2023

Conversation

dzuelke
Copy link
Contributor

@dzuelke dzuelke commented Dec 7, 2023

Full result example here: https://github.com/heroku/heroku-buildpack-php/actions/runs/7134065350

Parallel syncing of stacks

Syncing platform package repo updates from the development to the stable "bucket" is currently done using a GHA workflow that needs to be kicked off separately for each stack:

platform-sync-master

Instead, we're now running it in parallel for all stacks. That's faster, less manual work (for dispatching), and allows easy addition of further jobs after all stacks have synced:

platform-sync-nicer

GUS-W-14627856

Generating "PHP Support" contents

The "PHP Support" article on Dev Center has tables for runtimes, built-in extensions, third-party extensions, Composer, and web servers. These tables are generated by tooling that is fed the repository URLs for all stacks as input. The output is the markdown for the tables linked above.

Since we're now syncing all stacks in parallel, we can do that at the end of the sync workflow!

In fact, we can even use the public Dev Center API to fetch the raw article markdown, patch the generated sections with the help of their start/end markers, and output the whole document for copy/pasting:

platform-sync-dc-md

With a diff, too:

platform-sync-dc-diff

And based on the improvements added in #671, it will even warn if the repository contains unexpected versions, or print notices if allowed versions are not there:

platform-sync-warning

GUS-W-14616720
GUS-W-14627917

Handles syncing of the stacks in parallel.

Opens up the door for post-sync actions, e.g. generating Dev Center articles, changelogs, etc.

GUS-W-14627856
Easier to read.

Also add a bunch of comments to explain some of the pipeline stunts
Auto-splits the sections, detects the start and end markers, generates a patch file, and uses it to update the markdown downloaded via the public Dev Center API.

CRLF line endings are preserved correctly if needed.

Prints both a diff and the full resulting markdown contents.

GUS-W-14627917
@dzuelke dzuelke requested a review from a team as a code owner December 7, 2023 21:36
@dzuelke dzuelke merged commit d9e3462 into main Dec 7, 2023
9 checks passed
@dzuelke dzuelke deleted the nicer-platform-sync-workflow branch December 7, 2023 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants