Skip to content

Conversation

@marc
Copy link
Collaborator

@marc marc commented Nov 27, 2024

What github issue is this PR for, if any?

n/a

What changed, and why?

The TOC Generator step in GitHub actions sometimes tries to run against branches that no longer exist and fails. This config update should have it only check/run against the main branch.

This update also has the TOC Generator create a PR for readme changes instead of pushing them directly.

How is this tested? (please write tests!) 💖💪

Need to see how this runs in GitHub actions.

Feelings gif (optional)

😀 😀
First time collaborating with @FireLemons! 🎉

The TOC Generator sometimes tries to run against branches that no longer exist.
This config update should have it only check the main branch.

This update also has the TOC Generator create a PR for readme changes instead of pushing them directly.
@FireLemons FireLemons merged commit 3eb4c82 into main Nov 27, 2024
18 checks passed
@FireLemons FireLemons deleted the gh_workflow_toc_generator branch November 27, 2024 02:55
@aplchian
Copy link

Hey @marc! 👋 I see this change restricts the TOC generator to only run on the main branch, but I'm curious about a few architectural implications:

Branch Strategy Questions:

  1. What happens if a long-running feature branch significantly modifies the README structure and then gets merged? Won't the TOC be out of sync during the entire development period of that branch? How do we ensure documentation consistency across branches?

  2. By only running on main, we're essentially making the TOC a "post-merge" validation rather than a "pre-merge" validation. What's the rollback strategy if the TOC generator creates a problematic PR after a merge that breaks documentation?

PR Creation Logic:
3. The CREATE_PR: true flag is interesting - but what happens if multiple commits to main happen in rapid succession? Could we end up with conflicting TOC PRs that need manual resolution? How does the action handle PR collision scenarios?

  1. Since this creates PRs automatically, who becomes the reviewer? Is there a risk of infinite loops if the TOC PR itself triggers another workflow run?

Testing Concerns:
5. You mentioned "Need to see how this runs in GitHub actions" - but how do we test failure scenarios? What if the TOC generator fails to create a PR due to permissions, rate limits, or API issues? Do we have monitoring/alerting for this workflow?

  1. Is there a strategy for testing this workflow change without potentially spamming the repo with test PRs during development?

These might seem like edge cases, but they could become real issues at scale! What are your thoughts? 🤔

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.

4 participants