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

build: use mavenCentral() instead of jcenter() #1086

Closed
wants to merge 8 commits into from

Conversation

ed-g
Copy link
Contributor

@ed-g ed-g commented Jan 10, 2022

Gradle says jcenter() has be deprecated. I've run tests before and after this change, and in both cases the Task :output-comparator:test FAILED, so at least there is no difference.

Summary:

Fixes warnings on build.

Expected behavior:

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with gradle test to make sure you didn't break anything

Task :output-comparator:test FAILED

org.mobilitydata.gtfsvalidator.outputcomparator.cli.MainTest > tooManyCorruptedSource_invalidTest FAILED
com.google.common.truth.ComparisonFailureWithFacts at MainTest.java:356

8 tests completed, 1 failed

  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

Gradle says jcenter() has be deprecated.
@CLAassistant
Copy link

CLAassistant commented Jan 10, 2022

CLA assistant check
All committers have signed the CLA.

@lionel-nj
Copy link
Contributor

Hi @ed-g 👋🏾

Thank you for this contribution! Our team will soon review it.

@lionel-nj lionel-nj self-requested a review January 25, 2022 16:32
Copy link
Contributor

@lionel-nj lionel-nj left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @ed-g.

It appears that all tests are successful on the CI and on my computer, could you specify your configuration please?

@ed-g
Copy link
Contributor Author

ed-g commented Jan 26, 2022

Hi @lionel-nj!

This is from building on linux x86, openjdk-17.

It looks like java 17 has finally dropped a function which system-lambda-1.2.0.jar depends on?

Someone suggests https://github.com/webcompere/system-stubs as an alternative.

stefanbirkner/system-lambda#23

> Task :output-comparator:test FAILED
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by com.github.stefanbirkner.systemlambda.SystemLambda (file:/home/validate/.gradle/caches/modules-2/files-2.1/com.github.stefanbirkner/system-lambda/1.2.0/949a1f977d7287196301a6ec1ef2214e1c93981d/system-lambda-1.2.0.jar)
WARNING: Please consider reporting this to the maintainers of com.github.stefanbirkner.systemlambda.SystemLambda
WARNING: System::setSecurityManager will be removed in a future release

org.mobilitydata.gtfsvalidator.outputcomparator.cli.MainTest > tooManyCorruptedSource_invalidTest FAILED
    com.google.common.truth.ComparisonFailureWithFacts at MainTest.java:356

@ed-g
Copy link
Contributor Author

ed-g commented Jan 26, 2022

I'm only superficially familiar with java testing, but I've swapped in the System Stubs library.

The tooManyCorruptedSource_invalidTest test now runs, but it does fail on an output comparison,

tooManyCorruptedSource_invalidTest

expected: …ources":["source-id-5","source-id-4"],"sourceIdCount":5…
but was : …ources":["source-id-4","source-id-5"],"sourceIdCount":5…
	at app//org.mobilitydata.gtfsvalidator.outputcomparator.cli.MainTest.tooManyCorruptedSource_invalidTest(MainTest.java:356)

I don't know if the swapped position of source-id-5 and source-id-4 is significant, if it is not, maybe this check could be changed to allow either ordering?

@ed-g
Copy link
Contributor Author

ed-g commented Jan 27, 2022

I've updated the test to pass with either ordering of source-id-4 and source-id-5, and all tests are successful on my machine.

@lionel-nj
Copy link
Contributor

Hi @ed-g, it seems that this PR contains several changes. Could you separate them to help evaluate the potential side effects please?

  1. jCenter -> mavenCentral
  2. library change: SystemLambda -> SytemStub
  3. the changes in the tooManyCorruptedSource_invalidTest

Although the order in tooManyCorruptedSource_invalidTest is not important, IMO the behavior should be consistent regardless of the configuration, hence the tests should not be changed, since it passes the CI (Java 11)

I'll set up the CI to test, package and generate the javadocs for this project in order to replicate what you witnessed, this will help debugging.

@ed-g
Copy link
Contributor Author

ed-g commented Jan 31, 2022

Hi @lionel-nj OK I've created separate pull requests for each independent change.

@lionel-nj
Copy link
Contributor

Thank you @ed-g :)

@barbeau
Copy link
Member

barbeau commented Apr 19, 2022

@barbeau barbeau closed this Apr 19, 2022
barbeau added a commit that referenced this pull request May 11, 2022
I believe ubuntu-20.04 was originally added to troubleshoot issues discussed in PR #1086, which have since been resolved.

Given that:
* we have a lot of CI tests running, which makes review of the CI tests challenging (see #1095)
* these seem to be redundant given that we're also running on `ubuntu-latest`

...I'm proposing that we remove running on this specific version of ubuntu. This should remove 6 redundant checks (3 occurrences x 2 for each Java version 11 and 17).
@barbeau barbeau mentioned this pull request May 11, 2022
4 tasks
maximearmstrong pushed a commit that referenced this pull request May 11, 2022
I believe ubuntu-20.04 was originally added to troubleshoot issues discussed in PR #1086, which have since been resolved.

Given that:
* we have a lot of CI tests running, which makes review of the CI tests challenging (see #1095)
* these seem to be redundant given that we're also running on `ubuntu-latest`

...I'm proposing that we remove running on this specific version of ubuntu. This should remove 6 redundant checks (3 occurrences x 2 for each Java version 11 and 17).
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.

None yet

4 participants