-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix KeyError in promote endpoint #35
Conversation
While working on this fix and creating an empty migration, I noticed that there are other changes that didn't have any migration. So, one migration was created automatically by alembic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Mainly an issue that I caused before with unique index
backend/migrations/versions/2023_08_08_0944-451ec6d4c102_add_store_key_to_artefact_source.py
Outdated
Show resolved
Hide resolved
backend/migrations/versions/2023_08_08_0946-18b1066d92c3_add_store_key_to_artefact_source.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't feel I can sign-off the implementation, but the description of the changes sounds fine.
My only question is whether we should validate the value provided for store?
I’ve added the value validation locally. I’ll push them after fixing all the tests (or finally finding the reason why they fail) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job. Overall I think this approach of validation is better than the one baked in the DB. Just a few small comments, nothing major
backend/migrations/versions/2023_08_08_0946-18b1066d92c3_add_store_key_to_artefact_source.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This PR closes RTW-132
Here we use "ubuntu" as default snap store unless otherwise specified in artefact source. Also, I've added the test to make sure it works
Also, I've added the following migrations for the Artefact model:
Also, I've modified the tests and seed_data script to specify the "store" key in sample data.