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

Upgrade protobuf v4.27.2 #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ee08b397
Copy link

Please annotate your PR title to describe what the PR does, then give a brief bulleted description of your PR below. PR titles should begin with [BUGFIX], [FEATURE], [DOCS], [MAINTENANCE], or [CONTRIB]. If a new feature introduces breaking changes for the or configuration files, please also add [BREAKING].

Description

[Describe the issue or feature that this pull request is addressing. Provide context and any relevant links to issues or documentation.]

Changes Made

[Describe the changes made in this pull request, including any new code or dependencies added, removed, or updated.]

Definition of Done

Before submitting this pull request, please ensure that the following criteria have been met:

  • All automated tests have passed successfully.
  • All manual tests have passed successfully.
  • Code has been reviewed by at least one other team member.
  • Code has been properly documented and commented as needed.
  • All new and existing code adheres to our project's coding standards.
  • All dependencies have been added or removed from the project's README or other documentation as needed.
  • Any relevant documentation or help files have been updated to reflect the changes made in this pull request.
  • Any necessary database migrations have been run.
  • Any relevant UI changes have been reviewed and approved by the UI/UX team.

Additional Notes

[Add any additional notes or context for the reviewer or future maintainers of this code.]

Thank you for submitting!

@ee08b397
Copy link
Author

@spensonshih @tdieff Is there any tip about how to fix the unit tests by running mvn test or running a single test?

Single test

java.lang.AssertionError: test.properties must be preset on test classpath, see https://github.com/takari/takari-plugin-testing-project/blob/master/testproperties.md for me details

	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.junit.Assert.assertNotNull(Assert.java:713)
	at io.takari.maven.testing.TestProperties.loadProperties(TestProperties.java:59)
	at io.takari.maven.testing.TestProperties.<init>(TestProperties.java:50)

Mvn test

[ERROR] io.github.blackrock.protocjar.ProtocTest.testRunProtocCompileShade -- Time elapsed: 0.204 s <<< ERROR!
java.io.FileNotFoundException: Unsupported platform: protoc-2.4.1-osx-aarch_64.exe
	at io.github.blackrock.protocjar.Protoc.extractProtoc(Protoc.java:223)
	at io.github.blackrock.protocjar.Protoc.extractProtoc(Protoc.java:184)
	at io.github.blackrock.protocjar.Protoc.runProtoc(Protoc.java:68)
	at io.github.blackrock.protocjar.Protoc.runProtoc(Protoc.java:55)
	at io.github.blackrock.protocjar.ProtocTest.testRunProtocCompileShade(ProtocTest.java:119)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)

[ERROR] io.github.blackrock.protocjar.ProtocTest.testStdTypes -- Time elapsed: 0.250 s <<< ERROR!
java.io.FileNotFoundException: Unsupported platform: protoc-2.6.1-osx-aarch_64.exe
	at io.github.blackrock.protocjar.Protoc.extractProtoc(Protoc.java:223)
	at io.github.blackrock.protocjar.Protoc.extractProtoc(Protoc.java:184)
	at io.github.blackrock.protocjar.Protoc.runProtoc(Protoc.java:68)
	at io.github.blackrock.protocjar.Protoc.runProtoc(Protoc.java:55)
	at io.github.blackrock.protocjar.ProtocTest.testStdTypes(ProtocTest.java:82)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]   MavenUtilTest.testParseSnapshotExeName:60 expected: <protoc-2.4.1-20180823.052533-7-osx-x86_64.exe> but was: <null>
[ERROR] Errors:
[ERROR]   ProtocTest.testRunProtocBasic:36 » FileNotFound Unsupported platform: protoc-2.4.1-osx-aarch_64.exe
[ERROR]   ProtocTest.testRunProtocCompile:99 » FileNotFound Unsupported platform: protoc-2.4.1-osx-aarch_64.exe
[ERROR]   ProtocTest.testRunProtocCompileShade:119 » FileNotFound Unsupported platform: protoc-2.4.1-osx-aarch_64.exe
[ERROR]   ProtocTest.testRunProtocDownloadArtifact:67 » FileNotFound https://repo.maven.apache.org/maven2/com/google/protobuf/protoc/3.4.0/protoc-3.4.0-osx-aarch_64.exe
[ERROR]   ProtocTest.testStdTypes:82 » FileNotFound Unsupported platform: protoc-2.6.1-osx-aarch_64.exe
[INFO]
[ERROR] Tests run: 9, Failures: 1, Errors: 5, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for protoc-jar-maven-plugin 2.0-SNAPSHOT:
[INFO]
[INFO] protoc-jar-maven-plugin ............................ SUCCESS [  0.001 s]
[INFO] protoc-jar ......................................... FAILURE [  2.574 s]
[INFO] maven-plugin ....................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.927 s
[INFO] Finished at: 2024-06-28T18:10:30-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.2.5:test (default-test) on project protoc-jar: There are test failures.

@spensonshih
Copy link
Contributor

@ee08b397 , looks like you found an issue with the build. I think the issue is because in the protoc-jar module, the binaries under the bin/**/*.exe are only included in the jar using the maven-assembly-plugin on the package phase. So if you run the test phase only, then the unit tests for the plugin cannot find the binaries. For now, you can run mvn package to get around this. If you don't mind to raise a separate issue for this so we can keep track and fix it.

@ee08b397
Copy link
Author

ee08b397 commented Jul 8, 2024

Thanks @spensonshih. The issue is raised in #29.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants