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

deployctl uses a list organizations endpoint that isn't part of the OpenAPI Schema #329

Open
rawkode opened this issue Oct 4, 2024 · 5 comments

Comments

@rawkode
Copy link

rawkode commented Oct 4, 2024

Can you please add this to the schema?

@magurotuna
Copy link
Member

We include only stable endpoints in the OpenAPI schema, but some APIs used by deployctl may have breaking change in future so not included.

@rawkode
Copy link
Author

rawkode commented Oct 4, 2024

I understand. This is making it rather difficult for me to automate my deployments, as each service relies on project level secrets.

I could solve this with deployment level secrets, but those are applied after the deployment has taken; which is failing because the secrets don't exist.

Catch 22

@arnauorriols
Copy link
Member

I could solve this with deployment level secrets, but those are applied after the deployment has taken; which is failing because the secrets don't exist.

I see what you mean. When using deployctl deploy --env, it deploys once only with the project envs and then redeploys with a mix of the project env variables and the env variables provided). We are aware that this is suboptimal because of the scenario you described. However, when using the public API you can create deployments with specific env variables. Deployments created with the API will boot with the env variables already present, and your catch 22 situation should not take place.

I'm not sure I understand why you need the list_organizations endpoint though, can you clarify?

@rawkode
Copy link
Author

rawkode commented Oct 18, 2024

@arnauorriols Creating a deployment with the API needs the project ID, which I was going to find by listing projects within an organization, and I need to find the organization ID first.

I could get around this with hard coding some IDs, but I'd like to make this a reusable module I can deploy all my projects with.

@arnauorriols
Copy link
Member

The reason we don't provide a API to list organizations is because it is considered that all automatisms should be performed within the realm of a single organization. Creating an organization is expected to be a manual and infrequent procedure. Maybe you can get by keeping a mapping of organization ids in a config file or something similar?

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

3 participants