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

[Prism] Remove unused code #32414

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

damondouglas
Copy link
Contributor

This PR addresses #31793 removing unused code later discovered not needed.


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.

@damondouglas damondouglas marked this pull request as ready for review September 11, 2024 07:43
Copy link
Contributor

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

R: @Abacn added as fallback since no labels match configuration

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

@Abacn
Copy link
Contributor

Abacn commented Sep 11, 2024

This PR removed tests but the test result report shows test number remains the same as the main branch

image

Later I realize runners:prism:java:build didn't add to

tasks.register("javaPreCommit") {

so the tests never exercised.

I would suggest add dependsOn("runners:prism:java:build") to tasks.register("javaPreCommit") { so we are sure these codes can be safely removed

Copy link
Contributor

Reminder, please take a look at this pr: @Abacn

@Abacn
Copy link
Contributor

Abacn commented Sep 19, 2024

Tried to add :runners:prism:java:build to Java PreCommit, there is at least one flaky (2/2) test:

givenPrismLocation404_thenThrows
value of           : getMessage()
expected to contain: NotFoundException
but was            : java.io.IOException: Server returned HTTP response code: 500 for URL: https://example.com/i/dont/exist.zip
	at app//org.apache.beam.runners.prism.PrismLocatorTest.givenPrismLocation404_thenThrows(PrismLocatorTest.java:119)

In general, PrismLocatorTest relies on real URLs (https://github.com/apache/beam/releases/tag/v2.57.0/apache_beam-v2.57.0-prism-darwin-amd64.zip, https://example.com/i/dont/exist.zip) which are not a good unit test. Can we use mock there?

@Abacn
Copy link
Contributor

Abacn commented Sep 20, 2024

funny that "fix xxxx" phrase also leads to close a PR, not only an Issue

@damondouglas damondouglas merged commit 80960d1 into apache:master Sep 25, 2024
32 checks passed
@damondouglas damondouglas deleted the prism-delete-unused-code branch September 25, 2024 19:35
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.

2 participants