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

Reusing stagingRepositoryId from close task bypasses retry mechanism and fails #44

Closed
szpak opened this issue Mar 19, 2017 · 1 comment
Labels
Milestone

Comments

@szpak
Copy link
Member

szpak commented Mar 19, 2017

When repository ID is read from server retry mechanism is able to wait for the repo to be effectively closed. This effectively breaks closeAndPromoteRepository task...

:closeRepository (Thread[Daemon worker Thread 9,5,main]) started.
:closeRepository
Putting task artifact state for task ':closeRepository' into context took 0.0 secs.
Executing task ':closeRepository' (up-to-date check took 0.0 secs) due to:
  Task has not declared any outputs.
Getting staging profile for package group 'io.gitlab.nexus-at'
Getting 'open' repository for staging profile '5027d084a01a3a'
Closing repository 'iogitlabnexus-at-1014' with staging profile '5027d084a01a3a'
Repository 'iogitlabnexus-at-1014' with staging profile '5027d084a01a3a' has been closed
:closeRepository (Thread[Daemon worker Thread 9,5,main]) completed. Took 5.408 secs.
:promoteRepository (Thread[Daemon worker Thread 9,5,main]) started.
:promoteRepository
Putting task artifact state for task ':promoteRepository' into context took 0.0 secs.
Executing task ':promoteRepository' (up-to-date check took 0.0 secs) due to:
  Task has not declared any outputs.
Using configured staging profile id: 5027d084a01a3a
Promoting repository 'iogitlabnexus-at-1014' with staging profile '5027d084a01a3a'
POST response failed. 500: Server Error, body: [errors:[[id:*, msg:Unhandled: Repository: iogitlabnexus-at-1014 has invalid state: open]]]
:promoteRepository FAILED
:promoteRepository (Thread[Daemon worker Thread 9,5,main]) completed. Took 1.531 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':promoteRepository'.
> 500: Server Error, body: [errors:[[id:*, msg:Unhandled: Repository: iogitlabnexus-at-1014 has invalid state: open]]]

This is a regression in 0.6.0 in which reusing repo id has been introduced - #36.

@szpak szpak added this to the 0.6.1 milestone Mar 19, 2017
@szpak szpak added the bug label Mar 19, 2017
szpak added a commit that referenced this issue Mar 20, 2017
Introduced with sharing stagingRepositoryId. Will be fixed by #21.
@szpak
Copy link
Member Author

szpak commented Mar 20, 2017

Reusing stagingRepositoryId has been temporary disabled as a workaround. The issue with be fixed by #21.

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

No branches or pull requests

1 participant