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

[#28187] Add standalone prism validates runner precommit #28487

Merged
merged 3 commits into from
Sep 18, 2023

Conversation

lostluck
Copy link
Contributor

@lostluck lostluck commented Sep 15, 2023

Add a github action precommit for the standalone prism runner. Standalone prism uses job specified environments (usually docker containers), by default.

  • Updates the go run_validates_runner.sh test script. Ensure prism binary shuts down and cleans up afterwards.
  • Add gradle actions to invoke script as the prism runner.
  • Add github action workflow to trigger as precommit. Copied from the GoPortable precommit workflow. https://github.com/apache/beam/blob/master/.github/workflows/beam_PreCommit_GoPortable.yml
  • Check for docker manifest for image to avoid pull failures for unpushed images.
  • Plumb Pipeline options through to workers for container provisioning.
  • Filter out Xlang tests for prism, since it's not yet capable of them.
  • Make prism use loopback mode by default for in-process servers, not if endpoint is overridden, which uses job default (docker).
  • Add flags to standalone prism to specify Web UI and Job Management ports.

Part of #28187


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@codecov
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

Merging #28487 (11104e3) into master (a0f14a8) will increase coverage by 0.01%.
Report is 8 commits behind head on master.
The diff coverage is 21.05%.

@@            Coverage Diff             @@
##           master   #28487      +/-   ##
==========================================
+ Coverage   72.23%   72.24%   +0.01%     
==========================================
  Files         684      684              
  Lines      100855   100862       +7     
==========================================
+ Hits        72855    72872      +17     
+ Misses      26420    26411       -9     
+ Partials     1580     1579       -1     
Flag Coverage Δ
go 53.46% <21.05%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...go/pkg/beam/runners/prism/internal/environments.go 29.07% <0.00%> (-0.42%) ⬇️
...pkg/beam/runners/prism/internal/jobservices/job.go 62.31% <0.00%> (-1.87%) ⬇️
...o/pkg/beam/runners/prism/internal/worker/worker.go 44.61% <0.00%> (-0.15%) ⬇️
sdks/go/pkg/beam/runners/prism/internal/execute.go 85.34% <100.00%> (+0.25%) ⬆️

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link
Contributor

Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:

R: @jrmccluskey for label go.
R: @damccorm for label build.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@lostluck
Copy link
Contributor Author

Gentle Ping.

Copy link
Contributor

@jrmccluskey jrmccluskey left a comment

Choose a reason for hiding this comment

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

LGTM

# See the License for the specific language governing permissions and
# limitations under the License.

name: PreCommit GoPrism
Copy link
Contributor

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?

Copy link
Contributor Author

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...

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'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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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.

Copy link
Contributor

@jrmccluskey jrmccluskey Sep 18, 2023

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

Copy link
Contributor Author

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.

@lostluck lostluck merged commit 0d37c6f into master Sep 18, 2023
9 of 10 checks passed
@lostluck lostluck deleted the prismContainerPrecommit branch September 18, 2023 19:54
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

2 participants