Skip to content
Snippets Groups Projects
Commit 2cc3ef2d authored by Nathan Hertz's avatar Nathan Hertz
Browse files

Change [SendMessage: qa_ready] action to new [AnnounceQa] action that

will correctly announce that QA is ready using REST
parent 95bc450c
No related branches found
No related tags found
1 merge request!649WS-290: Fix QA
This commit is part of merge request !649. Comments created here will be created in the context of that merge request.
"""change SendMessage qa_ready action to AnnounceQa action
Revision ID: ced8e001d262
Revises: acfdeb6777cb
Create Date: 2021-11-10 10:16:09.070171
"""
from alembic import op
# revision identifiers, used by Alembic.
revision = "ced8e001d262"
down_revision = "acfdeb6777cb"
branch_labels = None
depends_on = None
def upgrade():
"""
Modify action that gets triggered on QA workflow complete;
Change it to perform the AnnounceQa action instead of attempting to SendMessage with arguments qa_ready
"""
op.execute(
"""
UPDATE capability_state_actions SET action_type = 'AnnounceQa', arguments = null
WHERE action_type = 'SendMessage'
AND arguments = 'qa_ready'
AND transition_id = (
SELECT transition_id FROM capability_state_transitions
WHERE pattern = 'type == workflow-complete'
AND capability_name = 'std_calibration'
)
"""
)
def downgrade():
"""
Undo above change
"""
op.execute(
"""
UPDATE capability_state_actions SET action_type = 'SendMessage', arguments = 'qa_ready'
WHERE action_type = 'AnnounceQa'
AND arguments IS null
AND transition_id = (
SELECT transition_id FROM capability_state_transitions
WHERE pattern = 'type == workflow-complete'
AND capability_name = 'std_calibration'
)
"""
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment