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

[Release Automation] Label PRs with GitHub Action #3151

Merged
merged 17 commits into from
Jun 7, 2023

Conversation

Kalaiselvi84
Copy link
Contributor

@Kalaiselvi84 Kalaiselvi84 commented May 12, 2023

What type of PR is this?

Uncomment only one /kind <> line, press enter to put that in a new line, and remove leading whitespace from that line:

/kind breaking
/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind hotfix

/kind feature
What this PR does / Why we need it:

Which issue(s) this PR fixes:

Closes #2459

Special notes for your reviewer:

@Kalaiselvi84
Copy link
Contributor Author

@zmerlynn,

Github action failed to label the PR due to resource not accessible by integration. Is there any permission required to access the files?

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 6bc8522d-0bdd-48cd-8303-ac00805cfa39

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@Kalaiselvi84 Kalaiselvi84 changed the title [Release Automation] Auto-Label PRs with GitHub Action [Release Automation] Label PRs with GitHub Action May 12, 2023
@Kalaiselvi84 Kalaiselvi84 marked this pull request as ready for review May 13, 2023 00:10
@google-oss-prow google-oss-prow bot requested a review from EricFortin May 13, 2023 00:10
@google-oss-prow google-oss-prow bot added size/L and removed size/M labels May 16, 2023
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 4924d90f-1c38-4a7c-9438-b4b6e22ddcfc

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 14d0d643-9eb7-42c5-9f09-74eae847d2a5

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3151/head:pr_3151 && git checkout pr_3151
  • helm install agones ./install/helm/agones --namespace agones-system --agones.image.release=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.32.0-0f04029-amd64

@google-oss-prow google-oss-prow bot added size/M and removed size/L labels May 19, 2023
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: b0c95a53-29df-4552-9873-24ea8918aecc

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3151/head:pr_3151 && git checkout pr_3151
  • helm install agones ./install/helm/agones --namespace agones-system --agones.image.release=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.32.0-7d65f08-amd64

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 04e77449-b426-4f01-b133-6c4d122ddf74

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

uses: actions/github-script@v4
with:
async: yes
repo-token: ${{ secrets.GITHUB_TOKEN }}
Copy link
Member

Choose a reason for hiding this comment

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

What happens if you use the AGONES_BOT secret?

Copy link
Contributor Author

@Kalaiselvi84 Kalaiselvi84 May 31, 2023

Choose a reason for hiding this comment

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

I attempted to use AGONES_BOT by creating a secret with that name in my repo and it is functioning as intended - https://github.com/Kalaiselvi84/agones/actions/runs/5133792952/jobs/9236886161?pr=262

Copy link
Member

Choose a reason for hiding this comment

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

Let's take that for a spin, see how it goes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I created a new PR to test this script, but it did not receive any labels. Instead, I encountered an error message stating, "Error retrieving files: HttpError: Resource not accessible by integration." - https://github.com/googleforgames/agones/actions/runs/5140174858/jobs/9251379449?pr=3194

Copy link
Member

Choose a reason for hiding this comment

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

That's weird. So it worked once but not a second time?

Should we just merge it and see what happens on the Agones repo? Any downside?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is working fine in my fork every time but fails in Agones.

My fork - https://github.com/Kalaiselvi84/agones/actions/runs/5133792952/jobs/9236886161?pr=262
Agones repo - https://github.com/googleforgames/agones/actions/runs/5140174858/jobs/9251379449?pr=3194

Should we just merge it and see what happens on the Agones repo? Any downside?

I am unsure about the Github Action script's functionality, given our prior experience with the "update branch" task. While it worked smoothly in our fork, it encountered issues when applied to Agones.

Do we need to configure permissions for AGONES_BOT in order to resolve the error encountered in the Agones repository: 'Error retrieving files: HttpError: Resource not accessible by integration'?

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 20ec9c47-7435-4891-8885-7437dd54dab9

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 6ff4f47e-4461-4ab3-8558-c8dbe2cb2592

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3151/head:pr_3151 && git checkout pr_3151
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.33.0-754f665-amd64

@Kalaiselvi84 Kalaiselvi84 marked this pull request as ready for review June 1, 2023 03:45
@google-oss-prow google-oss-prow bot requested a review from markmandel June 1, 2023 03:45
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 9c718437-d6cf-4e52-a8ce-baf799ce33f3

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3151/head:pr_3151 && git checkout pr_3151
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.33.0-3727d4d-amd64

@gongmax gongmax dismissed their stale review June 1, 2023 05:02

code changed since last review

pull-requests: write

steps:
- name: Checkout code
Copy link
Member

Choose a reason for hiding this comment

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

Curious - do we need to check out the repository code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line is not required. I included it to ensure that the workflow can access the files to avoid the integration issue, but still the error persists so will remove it

with:
async: yes
repo-token: ${{ secrets.AGONES_BOT }}
script: |
Copy link
Member

Choose a reason for hiding this comment

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

It's super cool you can do this.

@markmandel markmandel mentioned this pull request Jun 1, 2023
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 8039a281-dd7f-4fb9-9497-cf10ff8f61d1

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

Comment on lines 27 to 28
permissions:
pull-requests: write
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
permissions:
pull-requests: write
permissions:
contents: read
pull-requests: write

Possibly? Just taking reference from: https://github.com/actions/labeler#create-workflow

It's also possible to try it with the GITHUB_TOKEN

Copy link
Collaborator

@zmerlynn zmerlynn Jun 2, 2023

Choose a reason for hiding this comment

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

Or try permissions: read-all|write-all as mentioned in https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idpermissions, just to see if it's a permissions issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@markmandel, please merge this PR. I was able to reproduce the error in my fork by not adding the write permission to the pull_request and issues - https://github.com/Kalaiselvi84/agones/actions/runs/5185413754/jobs/9345294118?pr=274
You can adjust the permission in Agones if there is any issues. WDYT?

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good! Merging!

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 741a8bf2-06b7-4aad-85ab-6c2ef0d6e7cc

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: f3da7a13-d54d-4264-9d05-fd502aff2d26

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/googleforgames/agones.git pull/3151/head:pr_3151 && git checkout pr_3151
  • helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.33.0-e02934b-amd64

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Kalaiselvi84, markmandel

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@markmandel markmandel merged commit 0b6de4a into googleforgames:main Jun 7, 2023
@Kalaiselvi84 Kalaiselvi84 added the kind/feature New features for Agones label Jul 5, 2023
@Kalaiselvi84 Kalaiselvi84 deleted the issues/280492287 branch March 15, 2024 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release Automation: Configure prow to properly add labels on PRs
5 participants