Skip to content

DO NOT MERGE/gather event ids to repair #3149

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Courey
Copy link
Contributor

@Courey Courey commented Jun 10, 2025

Description

This is a script that uses the subject matchers in the app to go through the archive and find circulars that need to have their eventId's updated or corrected. Detailed instructions on how to use this script are found at the top of the script file.

Related Issue(s)

Resolves #3061

Testing

I have run this locally.

Copy link

codecov bot commented Jun 10, 2025

Codecov Report

Attention: Patch coverage is 0% with 25 lines in your changes missing coverage. Please review.

Project coverage is 6.48%. Comparing base (a6060c6) to head (bb39efc).
Report is 21 commits behind head on main.

Files with missing lines Patch % Lines
app/migrations/updates/index.ts 0.00% 25 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main   #3149      +/-   ##
========================================
- Coverage   6.56%   6.48%   -0.08%     
========================================
  Files        176     180       +4     
  Lines       4389    4439      +50     
  Branches     481     489       +8     
========================================
  Hits         288     288              
- Misses      4099    4149      +50     
  Partials       2       2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Courey Courey requested a review from lpsinger June 10, 2025 14:55
Copy link
Member

@lpsinger lpsinger left a comment

Choose a reason for hiding this comment

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

What is the purpose of this PR? Are we sure that there are no events with manually configured event IDs that this would reset? Why exclude GRBs specifically?

function processFiles() {
const folderPath = './app/archive.json'
const results = [] as UpdateData[]
fs.readdir(folderPath, (err, files) => {
Copy link
Member

Choose a reason for hiding this comment

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

Please use the fs/promises module and async/await syntax over the fs module and callback syntax.

console.error('Error reading directory:', err)
return
}
files.forEach((file) => {
Copy link
Member

Choose a reason for hiding this comment

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

Please use:

result = input.map((item) => ...)

rather than:

const results = []
input.forEach((...) => {results.push(...)})

}

function processFiles() {
const folderPath = './app/archive.json'
Copy link
Member

Choose a reason for hiding this comment

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

Where does this file, archive.json, come from? Our downloadable archive is a tarball of JSON files, not one big JSON file.

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.

create a script that would gather circular data to be updated via api
2 participants