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

Idempotency of backend-locks #431

Closed
rndmh3ro opened this issue Mar 1, 2017 · 4 comments
Closed

Idempotency of backend-locks #431

rndmh3ro opened this issue Mar 1, 2017 · 4 comments

Comments

@rndmh3ro
Copy link
Contributor

rndmh3ro commented Mar 1, 2017

I'm using the typo3 console to lock and unlock backend access in my automated jenkins deployment.
There I'm deploying a new version of typo3 and change symlinks during the process. In this time I want to lock the backend before and unlock it afterwards automatically.

This works without a problem, however sometimes there's a problem in the deployment and I have to re-run it. Now if the backend is already locked, the typo3 console throws an error.

In my opinion the command should be idempotent, e.g. if the backend is locked and it should be locked again, this should not produce an error. Easy fix would be to set $this->sendAndExit(0); here, here, here and here.

I could make a PR for this.

Maybe this could also be an option to activate. However here I would not know what to do.

What do you think?

@mbrodala
Copy link
Contributor

mbrodala commented Mar 1, 2017

I agree that it is no error if the expected state is already achieved, the warning can be kept as is.

So yes, please open a PR. Please also update Travis and AppVeyor to make each of these calls twice.

@rndmh3ro
Copy link
Contributor Author

rndmh3ro commented Mar 1, 2017

Okay, should I remove $this->sendAndExit(1); entirely or replace it with $this->sendAndExit(0);?

@mbrodala
Copy link
Contributor

mbrodala commented Mar 1, 2017

The latter, otherwise the following code would be executed.

mbrodala pushed a commit that referenced this issue Mar 1, 2017
@mbrodala
Copy link
Contributor

mbrodala commented Mar 1, 2017

Fixed by #433

@mbrodala mbrodala closed this as completed Mar 1, 2017
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

No branches or pull requests

2 participants