-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[#28187] Add standalone prism validates runner precommit #28487
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
name: PreCommit GoPrism | ||
|
||
on: | ||
push: | ||
tags: ['v*'] | ||
branches: ['master', 'release-*'] | ||
paths: ['model/**', 'sdks/go.**', 'release/**','.github/workflows/beam_PreCommit_GoPrism.yml'] | ||
pull_request_target: | ||
branches: ['master', 'release-*'] | ||
paths: ['model/**', 'sdks/go.**', 'release/**'] | ||
issue_comment: | ||
types: [created] | ||
schedule: | ||
- cron: '0 */6 * * *' | ||
workflow_dispatch: | ||
|
||
# This allows a subsequently queued workflow run to interrupt previous runs | ||
concurrency: | ||
group: '${{ github.workflow }} @ ${{ github.event.issue.number || github.event.pull_request.head.label || github.sha || github.head_ref || github.ref }}-${{ github.event.schedule || github.event.comment.body || github.event.sender.login}}' | ||
cancel-in-progress: true | ||
|
||
env: | ||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }} | ||
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }} | ||
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }} | ||
|
||
# Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event | ||
permissions: | ||
actions: write | ||
pull-requests: read | ||
checks: read | ||
contents: read | ||
deployments: read | ||
id-token: none | ||
issues: read | ||
discussions: read | ||
packages: read | ||
pages: read | ||
repository-projects: read | ||
security-events: read | ||
statuses: read | ||
|
||
jobs: | ||
beam_PreCommit_GoPrism: | ||
name: ${{matrix.job_name}} (${{ matrix.job_phrase }}) | ||
runs-on: [self-hosted, ubuntu-20.04, main] | ||
strategy: | ||
matrix: | ||
job_name: [beam_PreCommit_GoPrism] | ||
job_phrase: [Run GoPrism PreCommit] | ||
timeout-minutes: 120 | ||
if: | | ||
github.event_name == 'push' || | ||
github.event_name == 'pull_request_target' || | ||
github.event_name == 'schedule' || | ||
github.event_name == 'workflow_dispatch' || | ||
github.event.comment.body == 'Run GoPrism PreCommit' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup repository | ||
uses: ./.github/actions/setup-action | ||
with: | ||
comment_phrase: ${{ matrix.job_phrase }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }}) | ||
- name: Setup self-hosted | ||
uses: ./.github/actions/setup-self-hosted-action | ||
with: | ||
requires-py-39: false | ||
requires-go: false | ||
- name: Run goPrismPreCommit script | ||
uses: ./.github/actions/gradle-command-self-hosted-action | ||
with: | ||
gradle-command: :goPrismPreCommit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you validated that this action passes on a fork of the repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically no. But I have no reason to believe it won't work.
This file is copied from GoPortable, with GoPortable switched with GoPrism, and the new gradle command. I've been running the new gradle command the whole time to get this working.
I also somehow ended up with a beam repo branch rather than a fork branch.... I don't know how that happened. Something clearly changed with my usual flow. That aside...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll merge this in, and run the dispatch right away, and I'll be ready to disable the auto-runs if that manual kick fails.
Not ideal, but I'm confident.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/apache/beam/actions/runs/6226441348/job/16898968175
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, that failed.
Somehow it doesn't have a go.mod file in the beam/sdks/ directory, so it can't build a prism instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When. I was adding the govulncheck action it was funky about that, I had to specify the working directory to be the sdks directory and let it run there rather than specifying the path to the directory from Beam root. Might be a place to start
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I think the issue is that it's building from the beam directory rather than beam/sdks. Changing directories before building the prism binary should sort it out.
Not entirely sure why it works locally for me, since that should be the same as well... interesting.