Skip to content

feat: migrate maven repository and enable snapshots #2032

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

Merged
merged 21 commits into from
Jun 10, 2025

Conversation

jcpitre
Copy link
Contributor

@jcpitre jcpitre commented May 22, 2025

Summary

Closes https://github.com/MobilityData/product-tasks/issues/146 and #2013

Modified the gradle configuration to publish via Maven Central Portal instead of OSSRH (s01.oss.sonatype.org), since the latter will soon be deprecated.

Also added the publication of snapshots. This is triggered when a PR is merged in main if certain files/directories change, currently:

  • 'core/src/main/**'
  • 'main/src/main/**'
  • 'model/src/main/**'
  • 'build.gradle'
  • '.github/workflows/publish_snapshots.yml'

Expected behavior

Snapshot part

For the snapshot part, each time a PR is merged with changes in the abovementioned files, the Publish Jars Snapshots github action is run.
After that, you should be able to navigate to the snapshots from this page

The snaphot version will be built like this:

  • Take the latest released version, e.g. 7.1.0.
  • Increment the last digit and add -SNAPSHOT, e.g. 7.1.1-SNAPSHOT
    • To be honest, that's what I observed, even if I did not find specific documentation about this process.

Each new snapshot uploaded will have as a suffix the date and UTC time it was uploaded and a digit.
Example: https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/org/mobilitydata/gtfs-validator/gtfs-validator-core/7.1.1-SNAPSHOT/7.1.1-20250528.204959-4/

So you can test by making sure of the presence of the snapshot that was just uploaded.

Release part

This is started by a release trigger in the Upload Release Assets Github action.

See the doc here

Testing

Testing was done by executing the GH actions.
When the actions are run, the version provided by the axion plugin would be a SNAPSHOT (e.g. 7.1.1-SNAPSHOT) since the current commit does not have a release tag.

  • For publish_snapshots.yml I would expect components to appear in the snapshot repository.
    • The version should be 7.1.1-SNAPSHOT as per the axion gradle plugin.
  • For publish_assets.yml I would expect the action to fail since we are trying to publish a snapshot version to maven central.

To test the release, I forced the version in build.gradle i.e. replace version scmVersion.version by version '1.2', then execute the GH actions.

  • For publish_snapshots.yml I would expect the action to fail since we are trying to publish a release version to the snapshot repository.
  • For publish_assets.yml - I would expect components to appear in the Deployments page with the version set in build.gradle.
    • If you do that, don't forget to drop the components after the test.

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
  • Add or update any needed documentation to the repo
  • 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)

@jcpitre jcpitre changed the title 146 migrate maven repository feat: migrate maven repository and enable snapshots May 28, 2025
@jcpitre jcpitre marked this pull request as ready for review May 28, 2025 21:53
Copy link
Contributor

📝 Acceptance Test Report

📋 Summary

✅ The rule acceptance has passed for commit c523953
Download the full acceptance test report here (report will disappear after 90 days).

📊 Notices Comparison

New Errors (1 out of 1909 datasets, ~0%) ✅

Details of new errors due to code change, which is less than the provided threshold of 1%.

Dataset Notice Code
us-california-south-county-transit-link-gtfs-817 missing_required_column
Dropped Errors (0 out of 1909 datasets, ~0%) ✅

No changes were detected due to the code change.

New Warnings (0 out of 1909 datasets, ~0%) ✅

No changes were detected due to the code change.

Dropped Warnings (0 out of 1909 datasets, ~0%) ✅

No changes were detected due to the code change.

🛡️ Corruption Check

38 out of 1947 sources (~2 %) are corrupted.
Dataset Ref Report Exists Ref Report Readable Latest Report Exists Latest Report Readable
ca-saskatchewan-moose-jaw-transit-gtfs-2602
de-baden-wuttemberg-nvbw-gtfs-2393.json
de-bayern-munchner-verkehrs--und-tarifverbund-gmbh-mvv-gtfs-2252
de-sachsen-mitteldeutscher-verkehrsverbund-gmbh-mdv-gtfs-2360
fr-eurostar-gtfs-2431.json
fr-grand-est-troyes-champagne-metropole-tcat-gtfs-2627
fr-grand-est-troyes-champagne-metropole-tcat-gtfs-2628
ie-dublin-bus-eireann-gtfs-2636
il-ministry-of-transport-and-road-safety-gtfs-2519
jp-aomori-aomori-city-bus-gtfs-2607
ro-buzau-transbus-buzau-gtfs-2106
ro-dambovita-servicii-publice-municipale-targoviste-gtfs-2107
ro-prahova-transport-calatori-express-ploiesti-gtfs-2108
us-california-alameda-contra-costa-transit-district-ac-transit-gtfs-2455
us-california-county-connection-gtfs-2421
us-california-regional-transportation-commission-of-southern-nevada-rtc-gtfs-110
us-california-santa-maria-area-transit-gtfs-26
us-california-south-county-transit-link-gtfs-2203
us-california-taft-maricopa-area-transit-gtfs-821
us-california-tri-delta-transit-gtfs-1974
us-florida-gainesville-regional-transit-system-gtfs-2412
us-hawaii-hawaii-mass-transit-agency-hele-on-bus-gtfs-2608
us-illinois-danville-mass-transit-gtfs-2363
us-kansas-salina-gtfs-1867
us-massachusetts-pioneer-valley-transit-authority-pvta-gtfs-2416
us-utah-cache-valley-gtfs-1906
us-virginia-arlington-transit-gtfs-485
us-virginia-fairfax-cue-bus-cue-gtfs-2609
us-virginia-fredericksburg-regional-transit-gtfs-2430
us-washington-coast-transportation-gtfs-2162
us-washington-columbia-county-public-transportation-gtfs-2168
us-washington-community-in-motion-gtfs-2163
us-washington-eastside-friends-of-seniors-gtfs-2166
us-washington-hopelink-transportation-gtfs-2167
us-washington-intercity-transit-gtfs-2289
us-washington-paratransit-services-gtfs-2176
us-washington-puget-sound-educational-service-district-gtfs-2177
us-washington-sound-generations-hyde-shuttle-gtfs-2183

⏱️ Performance Assessment

📈 Validation Time

Assess the performance in terms of seconds taken for the validation process.

Time Metric Dataset ID Reference (s) Latest (s) Difference (s)
Average -- 3.79 3.96 ⬆️+0.17
Median -- 1.42 1.55 ⬆️+0.12
Standard Deviation -- 10.80 10.90 ⬆️+0.09
Minimum in References Reports us-massachusetts-massachusetts-area-express-max-gtfs-431 0.48 0.61 ⬆️+0.13
Maximum in Reference Reports gb-unknown-uk-aggregate-feed-gtfs-2014 269.68 276.85 ⬆️+7.17
Minimum in Latest Reports us-california-flex-v2-developer-test-feed-2-gtfs-1818 0.59 0.59 ⬆️+0.00
Maximum in Latest Reports gb-unknown-uk-aggregate-feed-gtfs-2014 269.68 276.85 ⬆️+7.17
📜 Memory Consumption
Metric Dataset ID Reference (s) Latest (s) Difference (s)
Average -- 466.71 MiB 467.53 MiB ⬆️+838.29 KiB
Median -- 333.93 MiB 333.42 MiB ⬇️-521.34 KiB
Standard Deviation -- 748.17 MiB 755.81 MiB ⬆️+7.64 MiB
Minimum in References Reports us-colorado-via-mobility-gtfs-180 38.86 MiB 411.93 MiB ⬆️+373.07 MiB
Maximum in Reference Reports ch-unknown-swiss-federal-railways-sbb-gtfs-2144 7.78 GiB 8.15 GiB ⬆️+377.00 MiB
Minimum in Latest Reports us-iowa-citibus-gtfs-2304 407.93 MiB 39.76 MiB ⬇️-368.16 MiB
Maximum in Latest Reports be-vlaams-gewest-de-lijn-gtfs-684 7.29 GiB 9.49 GiB ⬆️+2.20 GiB

@jcpitre jcpitre requested a review from Copilot May 29, 2025 13:38
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request migrates the GTFS Validator publishing process from OSSRH to the new Maven Central Portal, adds snapshot publication on merges to main, and updates related documentation and image paths.

  • Switch upload scripts and workflows to use Maven Central Portal API and dedicated Gradle tasks
  • Introduce a GitHub Actions workflow to publish snapshot versions on main
  • Update documentation and asset paths to reflect new publishing steps and directory structure

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
scripts/publish_to_maven_central.sh New Bash script to package and upload artifacts via Maven Central API
docs/RELEASE.md Renumber release steps, update links/descriptions for Maven Central
docs/CONTRIBUTING.md, BRANCHING.md, ACCEPTANCE_TESTS.md, README.md Fix image paths to /docs/images/...
.github/workflows/publish_snapshots.yml Add workflow to build and publish snapshot JARs on main
.github/workflows/publish_assets.yml Upgrade checkout action, switch to publishToMavenCentral task

@emmambd emmambd linked an issue May 29, 2025 that may be closed by this pull request
@MobilityData MobilityData deleted a comment from Copilot AI May 29, 2025
@MobilityData MobilityData deleted a comment from Copilot AI May 29, 2025
@MobilityData MobilityData deleted a comment from Copilot AI May 29, 2025
@MobilityData MobilityData deleted a comment from Copilot AI May 29, 2025
@MobilityData MobilityData deleted a comment from Copilot AI May 29, 2025
Copy link
Contributor

📝 Acceptance Test Report

📋 Summary

✅ The rule acceptance has passed for commit ddd3764
Download the full acceptance test report here (report will disappear after 90 days).

📊 Notices Comparison

New Errors (0 out of 1909 datasets, ~0%) ✅

No changes were detected due to the code change.

Dropped Errors (0 out of 1909 datasets, ~0%) ✅

No changes were detected due to the code change.

New Warnings (0 out of 1909 datasets, ~0%) ✅

No changes were detected due to the code change.

Dropped Warnings (0 out of 1909 datasets, ~0%) ✅

No changes were detected due to the code change.

🛡️ Corruption Check

38 out of 1947 sources (~2 %) are corrupted.
Dataset Ref Report Exists Ref Report Readable Latest Report Exists Latest Report Readable
ca-saskatchewan-moose-jaw-transit-gtfs-2602
de-baden-wuttemberg-nvbw-gtfs-2393.json
de-bayern-munchner-verkehrs--und-tarifverbund-gmbh-mvv-gtfs-2252
de-sachsen-mitteldeutscher-verkehrsverbund-gmbh-mdv-gtfs-2360
fr-eurostar-gtfs-2431.json
fr-grand-est-troyes-champagne-metropole-tcat-gtfs-2627
fr-grand-est-troyes-champagne-metropole-tcat-gtfs-2628
ie-dublin-bus-eireann-gtfs-2636
il-ministry-of-transport-and-road-safety-gtfs-2519
jp-aomori-aomori-city-bus-gtfs-2607
ro-buzau-transbus-buzau-gtfs-2106
ro-dambovita-servicii-publice-municipale-targoviste-gtfs-2107
ro-prahova-transport-calatori-express-ploiesti-gtfs-2108
us-california-alameda-contra-costa-transit-district-ac-transit-gtfs-2455
us-california-county-connection-gtfs-2421
us-california-regional-transportation-commission-of-southern-nevada-rtc-gtfs-110
us-california-santa-maria-area-transit-gtfs-26
us-california-south-county-transit-link-gtfs-2203
us-california-taft-maricopa-area-transit-gtfs-821
us-california-tri-delta-transit-gtfs-1974
us-florida-gainesville-regional-transit-system-gtfs-2412
us-hawaii-hawaii-mass-transit-agency-hele-on-bus-gtfs-2608
us-illinois-danville-mass-transit-gtfs-2363
us-kansas-salina-gtfs-1867
us-massachusetts-pioneer-valley-transit-authority-pvta-gtfs-2416
us-utah-cache-valley-gtfs-1906
us-virginia-arlington-transit-gtfs-485
us-virginia-fairfax-cue-bus-cue-gtfs-2609
us-virginia-fredericksburg-regional-transit-gtfs-2430
us-washington-coast-transportation-gtfs-2162
us-washington-columbia-county-public-transportation-gtfs-2168
us-washington-community-in-motion-gtfs-2163
us-washington-eastside-friends-of-seniors-gtfs-2166
us-washington-hopelink-transportation-gtfs-2167
us-washington-intercity-transit-gtfs-2289
us-washington-paratransit-services-gtfs-2176
us-washington-puget-sound-educational-service-district-gtfs-2177
us-washington-sound-generations-hyde-shuttle-gtfs-2183

⏱️ Performance Assessment

📈 Validation Time

Assess the performance in terms of seconds taken for the validation process.

Time Metric Dataset ID Reference (s) Latest (s) Difference (s)
Average -- 3.78 3.89 ⬆️+0.12
Median -- 1.36 1.45 ⬆️+0.09
Standard Deviation -- 10.75 10.87 ⬆️+0.12
Minimum in References Reports us-oregon-high-desert-point-gtfs-636 0.45 0.54 ⬆️+0.10
Maximum in Reference Reports gb-unknown-uk-aggregate-feed-gtfs-2014 254.16 257.98 ⬆️+3.82
Minimum in Latest Reports ar-buenos-aires-subterraneos-de-buenos-aires-subte-gtfs-6 0.47 0.50 ⬆️+0.02
Maximum in Latest Reports gb-unknown-uk-aggregate-feed-gtfs-2014 254.16 257.98 ⬆️+3.82
📜 Memory Consumption
Metric Dataset ID Reference (s) Latest (s) Difference (s)
Average -- 465.51 MiB 471.54 MiB ⬆️+6.03 MiB
Median -- 331.93 MiB 337.93 MiB ⬆️+6.00 MiB
Standard Deviation -- 732.43 MiB 748.78 MiB ⬆️+16.34 MiB
Minimum in References Reports us-connecticut-middletown-area-transit-gtfs-576 39.45 MiB 39.52 MiB ⬆️+67.99 KiB
Maximum in Reference Reports ch-unknown-swiss-federal-railways-sbb-gtfs-2144 7.79 GiB 8.30 GiB ⬆️+516.97 MiB
Minimum in Latest Reports us-mississipi-jtran-gtfs-155 395.93 MiB 38.92 MiB ⬇️-357.01 MiB
Maximum in Latest Reports ch-unknown-swiss-federal-railways-sbb-gtfs-2144 7.79 GiB 8.30 GiB ⬆️+516.97 MiB

Copy link
Member

@davidgamez davidgamez left a comment

Choose a reason for hiding this comment

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

LGTM

@jcpitre jcpitre merged commit a2e5962 into master Jun 10, 2025
134 checks passed
@jcpitre jcpitre deleted the 146-Migrate-maven-repository branch June 10, 2025 15:07
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.

Release maven snapshot versions after PRs are merged
2 participants