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

aio app delete service does not fully update .env #622

Open
MichaelGoberling opened this issue Nov 30, 2022 · 2 comments
Open

aio app delete service does not fully update .env #622

MichaelGoberling opened this issue Nov 30, 2022 · 2 comments

Comments

@MichaelGoberling
Copy link
Contributor

MichaelGoberling commented Nov 30, 2022

The command updates .aio but it does not remove the service scope from the ..._meta__scopes environment variable in .env.

Example

_meta__scopes=["asset_compute_meta","ent_audiencemanagerplatform_sdk","ent_places_sdk"]

User removes Asset Compute Service

_meta__scopes=["asset_compute_meta","ent_audiencemanagerplatform_sdk","ent_places_sdk"]

The "asset_compute_meta" value above should be removed.

@purplecabbage
Copy link
Member

This is difficult because we only know the scope<>service relation at the time they are added.
Do you have a solution? Or should we just document that there may be left over un-needed scopes and the developer should remove them manually.

@MichaelGoberling
Copy link
Contributor Author

@purplecabbage I have a POC working locally where I'm basically mimicking what aio app add service does to update the local env here, which is just to re-download the project's config from Console

However, one quirk is that when going from 1 service to 0, the meta scopes env var is set to the following:

_meta__scopes=["example_sdk"]

Which does not seem to be what we want. Tracing the code up through the console libs, I don't see anywhere where we are adding this if meta scopes is null or something like that, so it must be what the Console API itself is returning

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