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

✨Director-v2 computational scheduler: Persist mark for cancellation of runs #6653

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/postgres-database/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ setup-commit: install-dev up-pg ## sets up a database to create a new commit int
sleep 2
# discovering
sc-pg --help
sc-pg discover -u test -p test -d test
sc-pg discover -u test -p test -d test --host localhost
# upgrade
sc-pg upgrade
# some info
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"""added_cancellation_mark

Revision ID: 10097b74cf5a
Revises: fce5d231e16d
Create Date: 2024-11-01 17:24:21.002659+00:00

"""
import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "10097b74cf5a"
down_revision = "fce5d231e16d"
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column(
"comp_runs",
sa.Column(
"marked_for_cancellation",
sa.Boolean(),
server_default=sa.text("false"),
nullable=False,
),
)
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column("comp_runs", "marked_for_cancellation")
# ### end Alembic commands ###
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
""" Computational Runs Table

"""

import sqlalchemy as sa
from sqlalchemy.dialects.postgresql import JSONB
from sqlalchemy.sql import func
Expand Down Expand Up @@ -106,5 +107,12 @@
nullable=False,
doc="the run uses on demand clusters",
),
sa.Column(
"marked_for_cancellation",
sa.Boolean(),
server_default=sa.sql.expression.false(),
nullable=False,
doc="the run was marked for cancellation",
),
sa.UniqueConstraint("project_uuid", "user_id", "iteration"),
)
2 changes: 0 additions & 2 deletions services/director/requirements/_tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ pathspec==0.9.0
# via black
pep517==0.12.0
# via pip-tools
pip==24.3.1
# via pip-tools
pip-tools==6.4.0
# via -r requirements/_tools.in
pyyaml==5.4
Expand Down
Loading