Skip to content

ref: create project_id index for organizationonboardingtask #91918

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
May 20, 2025

Conversation

asottile-sentry
Copy link
Member

the index is (manually) present in US in production and mandated by the current model definition. it was missed when converting from an integer column to a primary key

the index is (manually) present in US in production and mandated by the current model definition.  it was missed when converting from an integer column to a primary key
@asottile-sentry asottile-sentry requested a review from a team as a code owner May 20, 2025 01:21
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label May 20, 2025

operations = [
SafeRunSQL(
'CREATE INDEX CONCURRENTLY "sentry_organizationonboardingtask_project_id_bba0eae8" ON "sentry_organizationonboardingtask" ("project_id");',
Copy link
Member Author

Choose a reason for hiding this comment

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

this is what django thinks it should be called (forced by removing and re-adding db_index=...)

Copy link
Contributor

This PR has a migration; here is the generated SQL for src/sentry/migrations/0904_onboarding_task_project_id_idx.py

for 0904_onboarding_task_project_id_idx in sentry

--
-- Raw SQL operation
--
CREATE INDEX CONCURRENTLY "sentry_organizationonboardingtask_project_id_bba0eae8" ON "sentry_organizationonboardingtask" ("project_id");
--
-- Raw SQL operation
--
DROP INDEX CONCURRENTLY IF EXISTS sentry_organizationonboardingtask_project_id_jtcunning;

Copy link

codecov bot commented May 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

⚠️ Parser warning

The parser emitted a warning. Please review your JUnit XML file:

Warning while parsing testcase attributes: Limit of string is 1000 chars, for name, we got 2083 at 1:157237 in /home/runner/work/sentry/sentry/.artifacts/pytest.junit.xml
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #91918      +/-   ##
==========================================
- Coverage   87.63%   87.62%   -0.01%     
==========================================
  Files       10356    10356              
  Lines      587192   587192              
  Branches    22585    22585              
==========================================
- Hits       514558   514555       -3     
- Misses      72206    72209       +3     
  Partials      428      428              

@asottile-sentry asottile-sentry merged commit b93eef1 into master May 20, 2025
61 checks passed
@asottile-sentry asottile-sentry deleted the asottile-onboardingtask-project-id branch May 20, 2025 13:23
jan-auer added a commit that referenced this pull request May 20, 2025
* master: (58 commits)
  link: cleanup link (#91687)
  ref: create project_id index for organizationonboardingtask (#91918)
  storybook: smaller last edited (#91875)
  issues: fix chonk stacktrace alignment (#91891)
  alert: drop custom alert (#91892)
  insights: fix bar height (#91895)
  ref(span-buffer): Move max-memory-percentage to right CLI (#91924)
  ref(js): Factor button functionality (#91763)
  tests(resolve_groups): Clean up the tests (#91779)
  ref(span-buffer): Add backpressure (#91707)
  fix(nextjs-insights): project id is not passed to explore link (#91920)
  fix(crons): Floor seconds / microsecond on recorded dateClock (#91890)
  fix(uptime): Fix bug with the uptime_checks dataset in the events endpoint (#91824)
  ref: add state-only migration to reflect existing indexes in prod (#91901)
  ref: remove unnecssary metaclass (#91906)
  fix(stats): use data category title name (#91913)
  feat(issues): Add success messages to some actions (#91899)
  test(taskworker): Lower exec time (#91907)
  chore(aci): manually add spans for delayed workflow processing (#91908)
  chore(aci): remove uses of WorkflowFireHistory rollout columns (#91904)
  ...
andrewshie-sentry pushed a commit that referenced this pull request May 20, 2025
the index is (manually) present in US in production and mandated by the
current model definition. it was missed when converting from an integer
column to a primary key

<!-- Describe your PR here. -->
@github-actions github-actions bot locked and limited conversation to collaborators Jun 5, 2025
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants