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

ref(workflow_engine): Phase 1 Remove / Rename WorkflowActions #78272

Merged
merged 7 commits into from
Sep 27, 2024

Conversation

saponifi3d
Copy link
Contributor

Description

Pre-req for #78257 to be able to remove the workflow actions table.

@saponifi3d saponifi3d requested a review from a team as a code owner September 27, 2024 17:51
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 27, 2024
Copy link
Contributor

github-actions bot commented Sep 27, 2024

This PR has a migration; here is the generated SQL for src/sentry/workflow_engine/migrations/0007_loosen_workflow_action_relationship.py ()

--
-- Alter field workflow on workflowaction
--
SET CONSTRAINTS "workflow_engine_work_workflow_id_8ac3c188_fk_workflow_" IMMEDIATE; ALTER TABLE "workflow_engine_workflowaction" DROP CONSTRAINT "workflow_engine_work_workflow_id_8ac3c188_fk_workflow_";
--
-- Custom state/database change combination
--
-- (no-op)

Copy link
Member

@wedamija wedamija left a comment

Choose a reason for hiding this comment

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

You can also remove the workflow field from the state in this same pr, using the SeparateDatabaseAndState step here. This is safe because we remove the constraint when we run migrations, then deploy code.

Then you just need one more pr to actually delete the table

@saponifi3d saponifi3d requested a review from a team as a code owner September 27, 2024 18:20
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Sep 27, 2024
Copy link
Contributor

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

Copy link

codecov bot commented Sep 27, 2024

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
21681 2 21679 209
View the top 2 failed tests by shortest run time
tests.sentry.backup.test_releases.ReleaseTests test_at_head
Stack Traces | 53.8s run time
#x1B[1m#x1B[.../sentry/backup/test_releases.py#x1B[0m:90: in test_at_head
    self.insta_snapshot(
#x1B[1m#x1B[.../testutils/pytest/fixtures.py#x1B[0m:245: in inner
    is_unequal = inequality_comparator(refval, output)
#x1B[1m#x1B[.../sentry/backup/test_releases.py#x1B[0m:55: in snapshot_inequality_comparator
    result = validate(refval_json, output_json, get_default_comparators())
#x1B[1m#x1B[.../sentry/backup/validate.py#x1B[0m:183: in validate
    left_models, left_ordinal_counters = build_model_map(left_data, Side.left, findings)
#x1B[1m#x1B[.../sentry/backup/validate.py#x1B[0m:108: in build_model_map
    raise RuntimeError("Unknown model class")
#x1B[1m#x1B[31mE   RuntimeError: Unknown model class#x1B[0m
tests.sentry.backup.test_releases.ReleaseTests test_at_head
Stack Traces | 55.5s run time
#x1B[1m#x1B[.../sentry/backup/test_releases.py#x1B[0m:90: in test_at_head
    self.insta_snapshot(
#x1B[1m#x1B[.../testutils/pytest/fixtures.py#x1B[0m:245: in inner
    is_unequal = inequality_comparator(refval, output)
#x1B[1m#x1B[.../sentry/backup/test_releases.py#x1B[0m:55: in snapshot_inequality_comparator
    result = validate(refval_json, output_json, get_default_comparators())
#x1B[1m#x1B[.../sentry/backup/validate.py#x1B[0m:183: in validate
    left_models, left_ordinal_counters = build_model_map(left_data, Side.left, findings)
#x1B[1m#x1B[.../sentry/backup/validate.py#x1B[0m:108: in build_model_map
    raise RuntimeError("Unknown model class")
#x1B[1m#x1B[31mE   RuntimeError: Unknown model class#x1B[0m

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

@saponifi3d saponifi3d enabled auto-merge (squash) September 27, 2024 19:51
@saponifi3d saponifi3d merged commit 9b26ba4 into master Sep 27, 2024
50 checks passed
@saponifi3d saponifi3d deleted the jcallender/aci-delete-workflow-actions-1 branch September 27, 2024 20:05
@github-actions github-actions bot locked and limited conversation to collaborators Oct 13, 2024
@saponifi3d saponifi3d changed the title Phase 1 Remove / Rename WorkflowActions ref(workflow_engine): Phase 1 Remove / Rename WorkflowActions Nov 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants