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

You can mis-deploy a heritage into the wrong district #617

Open
davidsiaw opened this issue Sep 10, 2020 · 1 comment · Fixed by #659
Open

You can mis-deploy a heritage into the wrong district #617

davidsiaw opened this issue Sep 10, 2020 · 1 comment · Fixed by #659

Comments

@davidsiaw
Copy link
Contributor

davidsiaw commented Sep 10, 2020

If you have district A and district B, it is possible to go

bcn create -e prod -d A

and then go

bcn create -e prod -d B

This is due to the fact that names are global but they can only be in one district. Deleting the heritage in B leaves the heritage in A still running but in barcelona its considered deleted. You can salvage this by creating the heritage in A again.

This does not cause trouble however until you use secret keys. If you create the heritage A and then set a secret key, creating the heritage in B will make the container fail to deploy. It will also cause you to not be able to run bcn run and instead get this error: AccessDenied: Access Denied

This problem is related to #616. We need to create a new API that requires both heritage and district names and deprecate the old one. This also means we need to modify the Barcelona CLI to provide both names.

Possible fix

For now we need to prevent heritages of the same name created from being created.

The next thing we need to do is make barcelona handle heritages keyed by district. This means barcelona needs to complain if it is asked to perform operations on a heritage name which is shared by two heritages in different districts.

@davidsiaw
Copy link
Contributor Author

Reopening because merged PR does not fix the problem.

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 a pull request may close this issue.

1 participant