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

fix(scripts): improve inactive account uids script #17951

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

chenba
Copy link
Contributor

@chenba chenba commented Oct 31, 2024

Because:

  • there were a few small issues with the inactive account uids script

This commit:

  • stops opening an output file in dry run mode
  • fixes an import so that the tsc'd js won't error
  • eliminates the accounts with Stripe subscriptions in the initial query

@chenba chenba requested a review from a team as a code owner October 31, 2024 20:53
@@ -161,19 +159,25 @@ const init = async () => {
])
.as('securityEventUids');

const accountCustomerUids = AccountCustomers.query()
.distinct('uid')
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there non-distinct uids?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I just got copy-paste happy. Thank you for catching that.

@@ -231,6 +230,8 @@ const init = async () => {
return 0;
}

const fd = fs.openSync(filepath, 'a');
Copy link
Contributor

Choose a reason for hiding this comment

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

node:fs/promises supports async/await for file io, not that it really matters here.

Copy link
Contributor

@dschom dschom left a comment

Choose a reason for hiding this comment

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

LGTM

Because:
 - there were a few small issues with the inactive account uids script

This commit:
 - stops opening an output file in dry run mode
 - fixes an import so that the tsc'd js won't error
 - eliminates the accounts with Stripe subscriptions in the initial
   query
@chenba chenba merged commit 520e5e3 into main Nov 5, 2024
8 of 12 checks passed
@chenba chenba deleted the FXA-10610-little-things branch November 5, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants