Repository navigation
feat(seer): Rename agentic_triage_v2 to scheduled_investigation #132182
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
Draft
trevor-e
wants to merge
49
commits into
master
Choose a base branch
from
claude/project-thread-m5jbyn
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+163
−103
Draft
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
1c812c2
feat(seer): Add schema for scheduled and versioned automations
trevor-e ea9cf1f
ref(seer): Compose automations from a trigger and an action
trevor-e 8ad24a6
ref(seer): Inline config creation into SeerWorkflow.create
trevor-e 3d1f2f9
ref(seer): Keep monitor cleanup out of the automation refactor
trevor-e 8cbe112
ref(seer): Always create a metric automation's backing workflow
trevor-e 9f11752
ref(seer): Keep the scheduled entry point in scheduled.py
trevor-e edd7789
Merge remote-tracking branch 'origin/master' into telkins/seer-workfl…
trevor-e ed68b1a
ref(seer): Keep the breached_metrics module name
trevor-e 3d1d9c9
ref(seer): Trim comments and simplify the scheduled entry point
trevor-e a0a94a8
ref(seer): Tie each strategy to its scope type in SeerWorkflow.create
trevor-e fd5be74
Merge remote-tracking branch 'origin/telkins/seer-workflow-trigger-ac…
trevor-e 4efcd11
ref(seer): Version trigger and action settings instead of new config …
trevor-e b910825
ref(seer): Combine the automation schema migrations into one
trevor-e d97da22
fix(seer): Create the config version foreign key with its table
trevor-e 4f7a0ce
ref(seer): Rename trigger and action interfaces to Automation*
trevor-e bacd1b0
fix(seer): Pause a metric automation's alert workflow with it
trevor-e b55b4ef
ref(seer): Return parsed settings from validate_settings
trevor-e 0264fe7
ref(seer): Report a disabled automation as config_disabled
trevor-e 39008ad
ref(seer): Merge the schedule trigger into scheduled.py
trevor-e c5832ea
Merge branch 'telkins/seer-workflow-trigger-action' of github.com:get…
trevor-e 2c6e190
Merge commit 'f4d4dce3fe5' into telkins/seer-automation-schedule-schema
trevor-e 4461a35
Merge branch 'master' of github.com:getsentry/sentry into telkins/see…
trevor-e 6b95fab
Merge branch 'master' of github.com:getsentry/sentry into telkins/see…
trevor-e f0a5003
Merge remote-tracking branch 'origin/master' into telkins/seer-automa…
trevor-e 9f3202e
feat(seer): Add schema for scheduled and versioned automations
claude 38f9ed5
feat(seer): Add schema for scheduled and versioned automations
claude a01c4d8
Merge branch 'claude/project-thread-m5jbyn' of https://github.com/get…
claude 5dd47b3
feat(seer): Rename agentic_triage_v2 to scheduled_investigation
claude 913e509
Merge remote-tracking branch 'origin/master' into schema-update
claude e60a26c
Merge the schema branch
claude 3316912
ref(seer): Drop the agentic_triage_v2 strategy value
claude f414a7d
ref(seer): Leave the one-active-run constraint for a follow-up
claude a30a6fd
ref(seer): Leave cron timezones for a follow-up
claude 648e232
Merge branch 'schema-update' into claude/project-thread-m5jbyn
claude 8b9dbae
ref(seer): Leave automation config versions for later
claude eda8589
Merge branch 'schema-update' into claude/project-thread-m5jbyn
claude 9125665
ref(seer): Use the standard CharField length for run source
claude 6a5277e
Merge branch 'schema-update' into claude/project-thread-m5jbyn
claude 4e9d304
ref(seer): Name the seeded scheduled investigation's skill agentic_tr…
claude d395bb5
ref(seer): Trim comments in the scheduled investigation rename
trevor-e d41b5d7
Merge remote-tracking branch 'origin/master' into claude/project-thre…
claude abe2cc3
ref(seer): Drop the agentic_triage_v2 rename migration
claude 7128742
Merge remote-tracking branch 'origin/master' into claude/project-thre…
claude 5545485
ref(seer): Keep the rename PR to the strategy rename
claude 8d361c5
ref(seer): Rename existing agentic_triage_v2 configs to scheduled_inv…
claude 143ff2d
test(seer): Cover the agentic_triage_v2 rename migration
claude 3a70485
test(seer): Use updated_by as the untouched extra in the rename migra…
claude a8ad1e4
test(seer): Skip the 0050 migration test now that it has passed
claude f74bc0c
test(seer): Drop the 0050 migration test after verifying it
claude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
48 changes: 48 additions & 0 deletions
48
src/sentry/seer/migrations/0050_rename_agentic_triage_v2.py
This file contains hidden or 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,48 @@ | ||
| from django.db import migrations | ||
| from django.db.backends.base.schema import BaseDatabaseSchemaEditor | ||
| from django.db.migrations.state import StateApps | ||
|
|
||
| from sentry.new_migrations.migrations import CheckedMigration | ||
| from sentry.utils.query import RangeQuerySetWrapperWithProgressBar | ||
|
|
||
| OLD_STRATEGY = "agentic_triage_v2" | ||
| NEW_STRATEGY = "scheduled_investigation" | ||
|
|
||
|
|
||
| def rename_agentic_triage_v2(apps: StateApps, schema_editor: BaseDatabaseSchemaEditor) -> None: | ||
| SeerWorkflowConfig = apps.get_model("seer", "SeerWorkflowConfig") | ||
| for config in RangeQuerySetWrapperWithProgressBar( | ||
| SeerWorkflowConfig.objects.filter(strategy=OLD_STRATEGY) | ||
| ): | ||
| config.strategy = NEW_STRATEGY | ||
| if config.extras.get("seeded_default") == OLD_STRATEGY: | ||
| config.extras["seeded_default"] = NEW_STRATEGY | ||
| config.save(update_fields=["strategy", "extras"]) | ||
|
|
||
|
|
||
| class Migration(CheckedMigration): | ||
| # This flag is used to mark that a migration shouldn't be automatically run in production. | ||
| # This should only be used for operations where it's safe to run the migration after your | ||
| # code has deployed. So this should not be used for most operations that alter the schema | ||
| # of a table. | ||
| # Here are some things that make sense to mark as post deployment: | ||
| # - Large data migrations. Typically we want these to be run manually so that they can be | ||
| # monitored and not block the deploy for a long period of time while they run. | ||
| # - Adding indexes to large tables. Since this can take a long time, we'd generally prefer to | ||
| # run this outside deployments so that we don't block them. Note that while adding an index | ||
| # is a schema change, it's completely safe to run the operation after the code has deployed. | ||
| # Once deployed, run these manually via: https://develop.sentry.dev/database-migrations/#migration-deployment | ||
|
|
||
| is_post_deployment = False | ||
|
|
||
| dependencies = [ | ||
| ("seer", "0049_add_seerworkflowrun_source"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.RunPython( | ||
| rename_agentic_triage_v2, | ||
| reverse_code=migrations.RunPython.noop, | ||
| hints={"tables": ["seer_workflowconfig"]}, | ||
| ), | ||
| ] | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was only 1 active right now but figured would do a data migration anyway since it's trivial.