Skip to content

Conversation

@markelliot
Copy link

@markelliot markelliot commented Oct 27, 2025

Fixes #284

Add a Maven registry backend for buffrs:

  • Extract a Registry trait
  • Encode registry type as a prefix in RegistryUri
  • Dispatch to the correct Registry implementation from RegistryUri

@markelliot markelliot marked this pull request as ready for review October 27, 2025 19:02
@mara-schulke mara-schulke self-requested a review October 30, 2025 09:10
@mara-schulke mara-schulke added integration Changes and ideas related to integrating buffrs with 3rd-party software or tools complexity::medium Issues or ideas which require some discussion, research and more implementation work type::feature Shipping or drafting a new feature for this product labels Oct 30, 2025
@mara-schulke mara-schulke added this to the Stabilization milestone Oct 30, 2025
@mara-schulke
Copy link
Contributor

Overall im very happy with the code quality and the implementation approach of this pr! Thank you! 😊

My two dots:

  1. This PR is missing tests, before merging i'd like to have end to end tests that ensure that: mixed maven and artifactory setups, maven publishing and maven installation are working as expected. You might need to change the e2e test setup slightly to account for having two registries.
  2. Left some comments on type organisation and the possibility to use a builder pattern. Would prefer if they get addressed but it's not a blocker to merging if you feel strongly about the current implementation.

@mara-schulke mara-schulke requested a review from markusz October 30, 2025 09:35
Markus Ziller added 2 commits November 1, 2025 09:54
…ace-support-maven

# Conflicts:
#	Cargo.toml
#	src/command.rs
#	src/resolver.rs
Copy link
Contributor

@markusz markusz left a comment

Choose a reason for hiding this comment

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

Hi Mark,

thanks a lot for your MR. Having Maven support would be awesome.

I can just echo what Mara said: Overall, this is a high quality MR already. I left a few comments (mostly nits).

The main thing would be to make tests work again and add new unit and e2e tests. The test harness of buffrs can be a bit hard to grok at first. I recently wrestled with it myself, so feel free to reach out if you need help.

I also want to point your attention to v0.12.0 which is soon going to be released (see MR). This change will cause merge conflicts with your current branch. I took the liberty to merge your branch back into a dedicated branch of v0.12.0 feature branch and resolve the conflicts to the best of my knowledge. This will hopefully make it easier to merge your changes back to main once finished.

Thanks again for your contribution

@markelliot
Copy link
Author

@mara-schulke @markusz ready for another look when you have a minute

@mara-schulke
Copy link
Contributor

There seems to be some CI issues and i have left a last comment, but this is wonderful, thank you mark!

@mara-schulke
Copy link
Contributor

@markusz is this good from your pov?:)

@markusz
Copy link
Contributor

markusz commented Dec 4, 2025

LGTM!

This is a fantastic addition. I really appreciate the clean implementation of the Maven support.I do want to highlight one important detail regarding compatibility that we should be loud about in the release notes:

If I interpret src/registry/mod.rs:L102-111 correctly, reading is backwards compatible, but writing is not. As soon as we write the Proto.lock or Proto.toml with this new version, it will prefix the registry URL with <reg_type>+.

Consider the following scenario:

  1. Alice upgrades buffrs to 0.13.0 and makes a change (unrelated to registries, e.g., buffrs add some_new_package).
  2. She pushes the changes and the updated lockfile.
  3. Bob (and potentially some automated tools like CI runner, etc.) still on 0.12.0 will be unable to use the new Proto.lock because the older client won't parse the prefix.

I think this sort of breaking change can't really be avoided in this case, but we should be very explicit in the docs that this update requires a lockstep upgrade for teams sharing a repo.

@mara-schulke

@markelliot
Copy link
Author

If you want we can probably make the writer always emit no regtype for artifactory?

@markusz
Copy link
Contributor

markusz commented Dec 5, 2025

Valid point, but I feel we should value internal consistency over backwards compatibility in this case. Introducing a one-time breaking change as discussed above imo is more digestible than having this long term inconsistency in the Proto files.

Another option would be to make this somehow optional (CLI flag, ENV variable, ..) but that opens another can of worms.

I'm inclined to merge and be very vocal about the change

@markelliot @mara-schulke WDYT?

@markusz
Copy link
Contributor

markusz commented Dec 5, 2025

Ah, I forgot: Cargo.toml needs to be adapted to reflect the new version. Should we go for 0.13.0? I'm a bit undecided on this. In the narrow SemVer sense this contains a breaking change and should become 1.0.0, but that feels wrong. It's certainly not a patch release either, so I guess 0.13.0 is the best option?

@mara-schulke
Copy link
Contributor

mara-schulke commented Dec 5, 2025

Thank you, this is a good catch @markusz - I'd argue we open a tracking issue for 1.0 in GitHub and note this as a breaking change to make in there. From my pov this is would be a breaking change without a strong requirement to be one which seems to push friction downstream for no apparent reason beyond minimally cleaner code.

buffrs is for the most part stable and only missing an advanced dependency resolution mechanism (think pubgrub) for us to make it to 1.0, id like to batch this change with other breaking changes towards the 1.0 release:)

@markelliot
Copy link
Author

Let me know if there's anything else on this one

@markelliot
Copy link
Author

@mara-schulke @markusz do you want to proceed here?

@mara-schulke
Copy link
Contributor

Hi @markelliot, yes of course! Sorry I have missed this. Can you confirm that the default behavior is this to omit the artifactory prefix when writing? I'm happy with merging this:)

@markelliot
Copy link
Author

That’s not the default behavior, it can be. If I do that cleanup and resolve the new merge conflicts will you be ready to merge then?

@mara-schulke
Copy link
Contributor

yes!

@mara-schulke
Copy link
Contributor

Hi @markelliot can i help you with getting this over the line?:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

complexity::medium Issues or ideas which require some discussion, research and more implementation work integration Changes and ideas related to integrating buffrs with 3rd-party software or tools type::feature Shipping or drafting a new feature for this product

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Maven registry backend

3 participants