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

Server-side concurrent maven-metadata.xml file updater #1940

Open
SpaceWalkerRS opened this issue Sep 21, 2023 · 3 comments
Open

Server-side concurrent maven-metadata.xml file updater #1940

SpaceWalkerRS opened this issue Sep 21, 2023 · 3 comments
Labels
feature New feature request

Comments

@SpaceWalkerRS
Copy link

What happened?

When multiple publications are added to the repository simultaneously, the metadata is not always updated properly, leading to one of the versions being missing from the metadata.

Reposilite version

3.x

Relevant log output

No response

@SpaceWalkerRS SpaceWalkerRS added the bug Bugs & errors found in Reposilite label Sep 21, 2023
@dzikoysk
Copy link
Owner

You shouldn't deploy the same artifact simultaneously. The metadata file is generated by the client, not Reposilite. Concurrent deployments are not supported by default by Maven/Gradle plugins - a proper impl would require a dedicated plugin, just like e.g. Nexus does to handle staging (a set of changes to apply). With a default setup we can't even make an efficient locking per deployed version, because a client may fail at any time and Reposilite won't receive any information about that - it means that we should use some kind of a strange time-based locking that can lead to further deployment failures even tho they should be accepted.

Is it something you'd be interested in as a feature request or it won't work either in your case?

@dzikoysk dzikoysk added question Questions about project and how to use it and removed bug Bugs & errors found in Reposilite labels Sep 22, 2023
@SpaceWalkerRS
Copy link
Author

You shouldn't deploy the same artifact simultaneously.

Sorry I wasn't very clear. The issue is when deploying even multiple different artifacts simultaneously. For more context, I have a GitHub workflow that runs a matrix that publishes some artifacts to a repository. Thus several (different) artifacts are published more or less simultaneously. What I noticed is that some versions are not added to the metadata even though the artifacts are present on the repository.

The metadata file is generated by the client, not Reposilite.

Ah I see, so this is not a Reposilite issue then.

Concurrent deployments are not supported by default by Maven/Gradle plugins - a proper impl would require a dedicated plugin [...] Is it something you'd be interested in as a feature request or it won't work either in your case?

I think that wouldn't work in my case, since the concurrency arises in multiple processes. I will need to find a way to run them one-by-one, or otherwise manually update the metadata or something.

I'll close this issue as it's clearly not a Reposilite bug. Sorry for wasting your time.

@dzikoysk
Copy link
Owner

I think that wouldn't work in my case, since the concurrency arises in multiple processes. I will need to find a way to run them one-by-one, or otherwise manually update the metadata or something.

In theory, it could be possible if we'd implement some kind of metadata merge tool. We have a DeployEvent, so it could be processed by Reposilite/plugin. The metadata update tool could also be used to e.g. update metadata after deleting a version directory via UI/our custom API, etc.

I'll keep this open with a more adequate title, in the end it could be a useful enhancement.

@dzikoysk dzikoysk reopened this Sep 22, 2023
@dzikoysk dzikoysk changed the title Concurrent publications lead to invalid metadata Server-side concurrent maven-metadata.xml file updater Sep 22, 2023
@dzikoysk dzikoysk added feature New feature request and removed question Questions about project and how to use it labels Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request
Projects
None yet
Development

No branches or pull requests

2 participants