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

Adding logic to delete environments to rest api and ui #154

Merged
merged 19 commits into from
Sep 18, 2021

Conversation

costrouc
Copy link
Member

Closes #124

Adding the ability to entirely delete an environment

@costrouc costrouc changed the title Adding logic to delete environments to rest api Adding logic to delete environments to rest api and ui Sep 17, 2021
@costrouc
Copy link
Member Author

Currently getting a few errors on not clean sqlalchemy deletion. Need to investigate further.

conda-store-worker_1  | sqlalchemy.exc.IntegrityError: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occurring prematurely)
conda-store-worker_1  | (psycopg2.errors.ForeignKeyViolation) update or delete on table "build" violates foreign key constraint "environment_current_build_id_fkey" on table "environment"
conda-store-worker_1  | DETAIL:  Key (id)=(4) is still referenced from table "environment".
conda-store-worker_1  | 

And several other similar errors I'm seeing

@costrouc
Copy link
Member Author

Sometimes it eventually works for deletion. This still needs to be fixed.

@costrouc
Copy link
Member Author

costrouc commented Sep 18, 2021

Not too confident on post_update=True but for now this works. Looks to be fixed.

@costrouc costrouc merged commit 7cb300a into main Sep 18, 2021
@costrouc costrouc deleted the delete-environment branch September 18, 2021 15:56
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 this pull request may close these issues.

a DELETE Environment API endpoint is needed
1 participant