-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store downstream Koji builds in DB (#2244)
TODO: - [x] Openshift tests - [x] TODO in code - [ ] followup dashboard PR (the API was changed so this breaks dashboard) Fixes #1889 Fixes #2243 Merge after packit/packit#2146 --- RELEASE NOTES BEGIN The downstream Koji builds are now stored in the database as well and exposed via `/api/koji-builds` endpoint. RELEASE NOTES END
- Loading branch information
Showing
24 changed files
with
696 additions
and
310 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
alembic/versions/99841c3f8ba8_adjust_kojibuildtargetmodel.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
"""Adjust KojiBuildTargetModel | ||
Revision ID: 99841c3f8ba8 | ||
Revises: db64a37ff1c6 | ||
Create Date: 2023-11-02 15:19:28.923208 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = "99841c3f8ba8" | ||
down_revision = "db64a37ff1c6" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.alter_column("koji_build_targets", "build_id", new_column_name="task_id") | ||
op.execute( | ||
"ALTER INDEX ix_koji_build_targets_build_id RENAME TO ix_koji_build_targets_task_id" | ||
) | ||
op.add_column( | ||
"koji_build_targets", sa.Column("build_logs_urls", sa.JSON(), nullable=True) | ||
) | ||
# we can drop this, the logs URLs pointed to invalid URLs | ||
op.drop_column("koji_build_targets", "build_logs_url") | ||
|
||
|
||
def downgrade(): | ||
op.alter_column("koji_build_targets", "task_id", new_column_name="build_id") | ||
op.execute( | ||
"ALTER INDEX ix_koji_build_targets_task_id RENAME TO ix_koji_build_targets_build_id" | ||
) | ||
op.add_column( | ||
"koji_build_targets", | ||
sa.Column("build_logs_url", sa.VARCHAR(), autoincrement=False, nullable=True), | ||
) | ||
op.drop_column("koji_build_targets", "build_logs_urls") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.