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

Clean up ArtifactBundle(FlatFile)Index, step 3 #66208

Merged
merged 1 commit into from Mar 6, 2024

Conversation

Swatinem
Copy link
Member

@Swatinem Swatinem commented Mar 4, 2024

This is the third step, following #66206 and #66207:

In step 3, we fully drop the obsolete columns and tables after they have been removed from the migration state in prior steps.

@Swatinem Swatinem self-assigned this Mar 4, 2024
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 4, 2024
Copy link
Contributor

github-actions bot commented Mar 4, 2024

This PR has a migration; here is the generated SQL for src/sentry/migrations/0659_artifactbundleindex_cleanup.py src/sentry/migrations/0660_artifactbundleindex_cleanup_step2.py src/sentry/migrations/0661_artifactbundleindex_cleanup_step3.py ()

--
-- Raw SQL operation
--

            DROP TABLE "sentry_artifactbundleflatfileindex";
            
--
-- Raw SQL operation
--

            DROP TABLE "sentry_flatfileindexstate";
            
--
-- Raw SQL operation
--

                ALTER TABLE "sentry_artifactbundleindex" DROP COLUMN "release_name";
                ALTER TABLE "sentry_artifactbundleindex" DROP COLUMN "dist_name";
                ALTER TABLE "sentry_artifactbundleindex" DROP COLUMN "date_last_modified";

@Swatinem Swatinem force-pushed the swatinem/abi-cleanup-step2 branch 2 times, most recently from 2afd2c3 to 164e231 Compare March 5, 2024 09:01
Base automatically changed from swatinem/abi-cleanup-step2 to master March 5, 2024 09:28
@Swatinem Swatinem marked this pull request as ready for review March 5, 2024 09:44
@Swatinem Swatinem requested a review from a team as a code owner March 5, 2024 09:44
Copy link
Contributor

github-actions bot commented Mar 5, 2024

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

--
-- Raw SQL operation
--

            DROP TABLE "sentry_artifactbundleflatfileindex";
            
--
-- Raw SQL operation
--

            DROP TABLE "sentry_flatfileindexstate";
            
--
-- Raw SQL operation
--

                ALTER TABLE "sentry_artifactbundleindex" DROP COLUMN "release_name";
                ALTER TABLE "sentry_artifactbundleindex" DROP COLUMN "dist_name";
                ALTER TABLE "sentry_artifactbundleindex" DROP COLUMN "date_last_modified";

Copy link
Member

@markstory markstory left a comment

Choose a reason for hiding this comment

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

Schema changes look good.

operations = [
migrations.RunSQL(
"""
DROP TABLE "sentry_artifactbundleflatfileindex";
Copy link
Member

Choose a reason for hiding this comment

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

There aren't any references to this model or table in the application code anymore 👍

Comment on lines 44 to 46
ALTER TABLE "sentry_artifactbundleindex" DROP COLUMN "release_name";
ALTER TABLE "sentry_artifactbundleindex" DROP COLUMN "dist_name";
ALTER TABLE "sentry_artifactbundleindex" DROP COLUMN "date_last_modified";
Copy link
Member

Choose a reason for hiding this comment

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

These columns don't exist in the model definition currently 👍

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.

lgtm, nice cleanup!

In step 3, we fully drop the obsolete columns and tables after they have been removed from the migration state in prior steps.
Copy link
Contributor

github-actions bot commented Mar 6, 2024

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

--
-- Raw SQL operation
--

            DROP TABLE "sentry_artifactbundleflatfileindex";
            
--
-- Raw SQL operation
--

            DROP TABLE "sentry_flatfileindexstate";
            
--
-- Raw SQL operation
--

                ALTER TABLE "sentry_artifactbundleindex" DROP COLUMN "release_name";
                ALTER TABLE "sentry_artifactbundleindex" DROP COLUMN "dist_name";
                ALTER TABLE "sentry_artifactbundleindex" DROP COLUMN "date_last_modified";

Copy link

codecov bot commented Mar 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.29%. Comparing base (fa73383) to head (c472247).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #66208   +/-   ##
=======================================
  Coverage   84.29%   84.29%           
=======================================
  Files        5309     5309           
  Lines      237222   237222           
  Branches    41038    41038           
=======================================
  Hits       199974   199974           
  Misses      37029    37029           
  Partials      219      219           

see 6 files with indirect coverage changes

@Swatinem Swatinem merged commit 313f9d7 into master Mar 6, 2024
49 checks passed
@Swatinem Swatinem deleted the swatinem/abi-cleanup-step3 branch March 6, 2024 09:38
aliu3ntry pushed a commit that referenced this pull request Mar 6, 2024
This is the third step, following
#66206 and
#66207:

In step 3, we fully drop the obsolete columns and tables after they have
been removed from the migration state in prior steps.
@github-actions github-actions bot locked and limited conversation to collaborators Mar 21, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants