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

Fix artefact build uniqueness #30

Merged
merged 7 commits into from
Jun 22, 2023
Merged

Conversation

omar-selo
Copy link
Collaborator

@omar-selo omar-selo commented Jun 20, 2023

This resolves RTW-112. Specifically, it uses Postgres' NULLS NOT DISTINCT. Note that this feature has just been added to SQLAlchemy (more information can be found in the original issue, pr and release notes). But since it's just been added, alembic doesn't have a command or option for it. Therefore I wrote a plain SQL command as migration.

Also had to remove create_artefact_builds helper as it could occasionally break uniqueness constraint. So tests can fail randomly.

@omar-selo omar-selo requested a review from nadzyah June 20, 2023 10:58
Copy link
Collaborator

@nadzyah nadzyah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for these changes, just few minor things

backend/tests/controllers/promoter/test_promoter.py Outdated Show resolved Hide resolved
backend/tests/helpers.py Show resolved Hide resolved
@omar-selo omar-selo requested a review from nadzyah June 21, 2023 11:08
@omar-selo omar-selo merged commit 62d45fd into main Jun 22, 2023
5 checks passed
@omar-selo omar-selo deleted the fix-artefact-build-uniqueness branch June 22, 2023 06:05
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.

2 participants