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

Test backport workflow with branch that doesn't make a GraphQL call #3551

Merged

Conversation

jdbaldry
Copy link
Member

@jdbaldry jdbaldry commented Sep 12, 2024

For more information, refer to grafana/grafana-github-actions#224.

I'd like to try backporting this to at least one release branch to check if it behaves correctly.

@jdbaldry jdbaldry requested a review from a team as a code owner September 12, 2024 14:46
@jdbaldry jdbaldry force-pushed the 2024-09-test-rest-api-backport-workflow branch from 61e41f2 to 5de1854 Compare September 12, 2024 15:24
@aleks-p aleks-p added the backport release/v1.7 This label will backport a merged PR to the release/v1.7 branch label Sep 12, 2024
Copy link
Contributor

Hello @aleks-p!
Backport pull requests need to be either:

  • Pull requests which address bugs,
  • Urgent fixes which need product approval, in order to get merged,
  • Docs changes.

Please, if the current pull request addresses a bug fix, label it with the type/bug label.
If it already has the product approval, please add the product-approved label. For docs changes, please add the type/docs label.
If the pull request modifies CI behaviour, please add the type/ci label.
If none of the above applies, please consider removing the backport label and target the next major/minor release.
Thanks!

Copy link
Contributor

This PR must be merged before a backport PR will be created.

@aleks-p aleks-p merged commit 6819c91 into grafana:main Sep 12, 2024
20 checks passed
github-actions bot pushed a commit that referenced this pull request Sep 12, 2024
…3551)

For more information, refer to grafana/grafana-github-actions#224.

Signed-off-by: Jack Baldry <[email protected]>
(cherry picked from commit 6819c91)
Copy link
Contributor

The backport to release/v1.7 failed:

Validation Failed: "Could not resolve to a node with the global id of 'T_kwDOAG3Mbc4AczmP'."

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-3551-to-release/v1.7 origin/release/v1.7
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 6819c91e159153ec52cb4ce88ec73e5b88511f73

When the conflicts are resolved, stage and commit the changes:

git add . && git cherry-pick --continue

If you have the GitHub CLI installed:

# Push the branch to GitHub:
git push --set-upstream origin backport-3551-to-release/v1.7
# Create the PR body template
PR_BODY=$(gh pr view 3551 --json body --template 'Backport 6819c91e159153ec52cb4ce88ec73e5b88511f73 from #3551{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title '[release/v1.7] Test backport workflow with branch that doesn't make a GraphQL call' --body-file - --label 'type/ci' --label 'backport' --base release/v1.7 --milestone release/v1.7 --web

Or, if you don't have the GitHub CLI installed (we recommend you install it!):

# Push the branch to GitHub:
git push --set-upstream origin backport-3551-to-release/v1.7

# Create a pull request where the `base` branch is `release/v1.7` and the `compare`/`head` branch is `backport-3551-to-release/v1.7`.

# Remove the local backport branch
git switch main
git branch -D backport-3551-to-release/v1.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release/v1.7 This label will backport a merged PR to the release/v1.7 branch backport-failed type/ci
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants