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

Validate updates to productionenv for a Lagoon project #3553

Open
seanhamlin opened this issue Sep 24, 2023 · 1 comment
Open

Validate updates to productionenv for a Lagoon project #3553

seanhamlin opened this issue Sep 24, 2023 · 1 comment
Labels
1-api-auth API & Authentication subsystem bug

Comments

@seanhamlin
Copy link
Contributor

Describe the bug

I am currently looking at a Lagoon project that looks like this:

$ lagoon get project -p PROJECT --output-json | jq '.data[].productionenv'
" production -b (feature|release|hotfix)/|(dev|test|develop|master|main|sandbox)$ -m false"

Clearly this will never map to a valid git branch. The impact is that the branch called production is not actually production. This has flow on impacts for monitoring and scaling.

To Reproduce

Update productionenv with a non-valid git branch.

Expected behavior

Lagoon validates productionenv to ensure it is possible to push a git branch with that name.

@seanhamlin seanhamlin added bug 1-api-auth API & Authentication subsystem labels Sep 24, 2023
@rocketeerbkw
Copy link
Member

Branches aren't the only thing that can deploy to an environment. A promote flow would not require that the production environment name be a valid git branch.

There is probably a middle ground between "any string" and "git branch regex" though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-api-auth API & Authentication subsystem bug
Projects
None yet
Development

No branches or pull requests

2 participants