Skip to content

migration: backfill apitoken last characters - #63342

Merged
mdtro merged 3 commits into
masterfrom
mdtro/apitoken-backfill-last-chars
Jan 17, 2024
Merged

mdtro merged 3 commits into
masterfrom
mdtro/apitoken-backfill-last-chars

Conversation

@mdtro

@mdtro mdtro commented Jan 17, 2024 •

Copy link
Copy Markdown
Contributor

Backfills the token_last_characters column on existing ApiTokens.

As of #62972, new ApiTokens are being created with this column already populated with the correct values. This backfill will only impact old tokens created prior.

Tracking Issue: #58918
Related RFC: getsentry/rfcs#32

@mdtro
mdtro requested a review from a team as a code owner January 17, 2024 17:27
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 17, 2024
@github-actions

Copy link
Copy Markdown
Contributor

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

--
-- MIGRATION NOW PERFORMS OPERATION THAT CANNOT BE WRITTEN AS SQL:
-- Raw Python operation
--

@mdtro
mdtro force-pushed the mdtro/apitoken-backfill-last-chars branch from e95805a to c9bb0ac Compare January 17, 2024 17:31
@mdtro mdtro changed the title migration: backfill apitoken last chars migration: backfill apitoken last characters Jan 17, 2024
@codecov

codecov Bot commented Jan 17, 2024 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a2f2cd8) 56.54% compared to head (32ee72c) 81.34%.
Report is 1 commits behind head on master.

❗ Current head 32ee72c differs from pull request most recent head 12130cb. Consider uploading reports for the commit 12130cb to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #63342       +/-   ##
===========================================
+ Coverage   56.54%   81.34%   +24.80%     
===========================================
  Files        5196     5208       +12     
  Lines      230738   231097      +359     
  Branches    39867    39934       +67     
===========================================
+ Hits       130460   187993    +57533     
+ Misses      96256    37325    -58931     
- Partials     4022     5779     +1757     

see 1830 files with indirect coverage changes

@markstory markstory left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me.

@mdtro
mdtro force-pushed the mdtro/apitoken-backfill-last-chars branch from 32ee72c to 496a112 Compare January 17, 2024 22:22
@github-actions

Copy link
Copy Markdown
Contributor

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

--
-- MIGRATION NOW PERFORMS OPERATION THAT CANNOT BE WRITTEN AS SQL:
-- Raw Python operation
--

@mdtro
mdtro enabled auto-merge (squash) January 17, 2024 22:45
@mdtro
mdtro merged commit e1cf672 into master Jan 17, 2024
@mdtro
mdtro deleted the mdtro/apitoken-backfill-last-chars branch January 17, 2024 22:46
trillville pushed a commit that referenced this pull request Jan 19, 2024
Backfills the `token_last_characters` column on existing `ApiToken` entries.

As of #62972, new `ApiToken` entries
are being created with this column already populated with the correct
values. This backfill will only impact old tokens created prior.

Tracking Issue: #58918
Related RFC: getsentry/rfcs#32
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 2, 2024
@mdtro mdtro linked an issue Feb 2, 2024 that may be closed by this pull request

This branch was successfully deployed

1 active deployment
Preview — 12130cbc Deployed Jan 17, 2024 by vercel[bot]
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.

feat: add name and token_last_characters to ApiToken

2 participants