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

ci: track merged PRs in a GitHub project #6867

Merged
merged 1 commit into from
May 18, 2023

Conversation

dzhu
Copy link
Contributor

@dzhu dzhu commented May 17, 2023

Description

As a first step toward exploring a new release process, this creates a GitHub action that adds each merged fix/feat PR to an organization-level GitHub project for tracking during the release party.

The PRs are not added directly to the project; instead, new issues linking to them are created in a separate repo. It would be possible and a bit simpler to add them directly, but I felt that it was preferable to have a separate place specifically for release-related discussion that was not appending onto the already closed PRs.

Test Plan

Did a bunch of iteration on a private test repo. There's some chance that something will go wrong on the transfer to this one, but I think I've done the best I can do. And it's not like anything terrible will happen if something is off.

@dzhu dzhu requested a review from a team as a code owner May 17, 2023 18:48
@cla-bot cla-bot bot added the cla-signed label May 17, 2023
@@ -0,0 +1,92 @@
#!/bin/bash
set -eux
Copy link
Member

Choose a reason for hiding this comment

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

I've always liked the French set here. :D

Copy link
Member

@dannysauer dannysauer left a comment

Choose a reason for hiding this comment

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

I want to gripe about the verbosity of the GraphQL API, but I suppose I won't. :)

What I will ask is if we can plan to add the PRs to a milestone in the relevant project at the same time. It doesn't have to be in this initial PR, but I'd like to see all PRs added to a milestone eventually. So how do you feel about changing the name of the action to something like "track PRs for release" or something along those lines so we can do that in the same action later on?

fetch-depth: 0
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
Copy link
Member

Choose a reason for hiding this comment

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

Why a specific commit instead of a release version that dependabot can track and update? That commit seems to map to the current release. :)

Suggested change
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
uses: tibdex/github-app-token@v1.8.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's from an example in GitHub's docs, which also generally recommend pinning third-party actions for security, which I figured might be particularly useful here, since we're passing in a secret (albeit one with very limited permissions). So that is the reason, though I'll defer to your judgment if you still don't want to go with the pin.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm for us pinning versions going forward whenever images are involved and setting the example for the rest of the org.
It's a hella PITA and costs us some automation, but bumping versions of hashed things ourselves isn't too problematic to automate down the line.

PR_TITLE: ${{ github.event.pull_request.title }}
PR_URL: ${{ github.event.pull_request.html_url }}
run: |
tools/scripts/add-pr-to-release-project.sh
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we want to directly run that embedded script from PRs (especially forks).

It might be nice to package that script up as a docker action, too, but perhaps that's overkill. Just checking it out from the pull request target (or main) would probably be easier.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd totally love help create and action for this if necessary.
We already have a repo for release PR's, so we may as well publish release tooling from it.

@dzhu dzhu force-pushed the release-project-add-prs branch from 71dc2bc to aaccc9f Compare May 17, 2023 21:52
Copy link
Contributor Author

@dzhu dzhu left a comment

Choose a reason for hiding this comment

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

Thanks! I did have a reason for the specific commit, so I wanted to check on that, but otherwise I've updated as requested.

fetch-depth: 0
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's from an example in GitHub's docs, which also generally recommend pinning third-party actions for security, which I figured might be particularly useful here, since we're passing in a secret (albeit one with very limited permissions). So that is the reason, though I'll defer to your judgment if you still don't want to go with the pin.

As a first step toward exploring a new release process, this creates a
GitHub action that adds each merged fix/feat PR to an organization-level
GitHub project for tracking during the release party.

The PRs are not added directly to the project; instead, new issues
linking to them are created in a separate repo. It would be possible and
a bit simpler to add them directly, but I felt that it was preferable to
have a separate place specifically for release-related discussion that
was not appending onto the already closed PRs.
@dzhu dzhu force-pushed the release-project-add-prs branch from aaccc9f to ced08a1 Compare May 17, 2023 21:54
Copy link
Contributor

@loksonarius loksonarius left a comment

Choose a reason for hiding this comment

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

neat

@dzhu dzhu merged commit 48648a2 into determined-ai:main May 18, 2023
55 of 57 checks passed
@dzhu dzhu deleted the release-project-add-prs branch May 18, 2023 19:04
@dzhu
Copy link
Contributor Author

dzhu commented May 18, 2023

Correction to what I said about permissions: I thought the GitHub App could have separate permissions for what repos it could be used from and what repos it had access to, but the first run failed when it wasn't installed on this repo, so now I think actually those are not distinct and it needs to have access to the main repos. Hopefully that's okay, considering it's running on pull_request_target.

dzhu added a commit to dzhu/determined that referenced this pull request May 19, 2023
Following on from determined-ai#6867, this adds some more steps to the release
automation. The workflows now handle a special label that marks a PR as
a fix to be cherry-picked for the current release. There's also
scaffolding for some future steps for actually handling the
cherry-picks; some of that implementation is left stubbed out for now,
but I believe this should cover the full shape of the Actions lifecycle
we have in mind. Remaining work will lie in filling in that
implementation and updating rph to handle the human side of things.
dzhu added a commit to dzhu/determined that referenced this pull request May 20, 2023
Following on from determined-ai#6867, this adds some more steps to the release
automation. The workflows now handle a special label that marks a PR as
a fix to be cherry-picked for the current release. There's also
scaffolding for some future steps for actually handling the
cherry-picks; some of that implementation is left stubbed out for now,
but I believe this should cover the full shape of the Actions lifecycle
we have in mind. Remaining work will lie in filling in that
implementation and updating rph to handle the human side of things.
dzhu added a commit to dzhu/determined that referenced this pull request May 22, 2023
Following on from determined-ai#6867, this adds some more steps to the release
automation. The workflows now handle a special label that marks a PR as
a fix to be cherry-picked for the current release. There's also
scaffolding for some future steps for actually handling the
cherry-picks; some of that implementation is left stubbed out for now,
but I believe this should cover the full shape of the Actions lifecycle
we have in mind. Remaining work will lie in filling in that
implementation and updating rph to handle the human side of things.
dzhu added a commit that referenced this pull request May 22, 2023
Following on from #6867, this adds some more steps to the release
automation. The workflows now handle a special label that marks a PR as
a fix to be cherry-picked for the current release. There's also
scaffolding for some future steps for actually handling the
cherry-picks; some of that implementation is left stubbed out for now,
but I believe this should cover the full shape of the Actions lifecycle
we have in mind. Remaining work will lie in filling in that
implementation and updating rph to handle the human side of things.
garrett361 pushed a commit to garrett361/determined that referenced this pull request May 25, 2023
As a first step toward exploring a new release process, this creates a
GitHub action that adds each merged fix/feat PR to an organization-level
GitHub project for tracking during the release party.

The PRs are not added directly to the project; instead, new issues
linking to them are created in a separate repo. It would be possible and
a bit simpler to add them directly, but I felt that it was preferable to
have a separate place specifically for release-related discussion that
was not appending onto the already closed PRs.
wes-turner pushed a commit that referenced this pull request Jun 5, 2023
As a first step toward exploring a new release process, this creates a
GitHub action that adds each merged fix/feat PR to an organization-level
GitHub project for tracking during the release party.

The PRs are not added directly to the project; instead, new issues
linking to them are created in a separate repo. It would be possible and
a bit simpler to add them directly, but I felt that it was preferable to
have a separate place specifically for release-related discussion that
was not appending onto the already closed PRs.
wes-turner pushed a commit that referenced this pull request Jun 5, 2023
Following on from #6867, this adds some more steps to the release
automation. The workflows now handle a special label that marks a PR as
a fix to be cherry-picked for the current release. There's also
scaffolding for some future steps for actually handling the
cherry-picks; some of that implementation is left stubbed out for now,
but I believe this should cover the full shape of the Actions lifecycle
we have in mind. Remaining work will lie in filling in that
implementation and updating rph to handle the human side of things.
wes-turner pushed a commit that referenced this pull request Jun 5, 2023
As a first step toward exploring a new release process, this creates a
GitHub action that adds each merged fix/feat PR to an organization-level
GitHub project for tracking during the release party.

The PRs are not added directly to the project; instead, new issues
linking to them are created in a separate repo. It would be possible and
a bit simpler to add them directly, but I felt that it was preferable to
have a separate place specifically for release-related discussion that
was not appending onto the already closed PRs.
wes-turner pushed a commit that referenced this pull request Jun 5, 2023
Following on from #6867, this adds some more steps to the release
automation. The workflows now handle a special label that marks a PR as
a fix to be cherry-picked for the current release. There's also
scaffolding for some future steps for actually handling the
cherry-picks; some of that implementation is left stubbed out for now,
but I believe this should cover the full shape of the Actions lifecycle
we have in mind. Remaining work will lie in filling in that
implementation and updating rph to handle the human side of things.
@dannysauer dannysauer added this to the 0.23.0 milestone Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants