-
Notifications
You must be signed in to change notification settings - Fork 37
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
A new report listing API versions that are old enough to be removed #3899
Conversation
Does the PR have any schema changes?Looking good! No breaking changes found. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall approach looks sensible 👍
The main algorithm could do with a couple of comments helping explain the rational of each major step.
Also, looks like there's a diff in the generated file in CI that we'll need to resolve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, minor nit inline, also could add a line to the reports/README.md
to explain the purpose of the new report.
aff35af
to
af0e097
Compare
Co-authored-by: Daniel Bradley <[email protected]>
af0e097
to
748290f
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3899 +/- ##
==========================================
- Coverage 57.21% 57.05% -0.16%
==========================================
Files 78 78
Lines 12436 12469 +33
==========================================
- Hits 7115 7114 -1
- Misses 4774 4808 +34
Partials 547 547 ☔ View full report in Codecov by Sentry. |
This PR has been shipped in release v2.85.0. |
#3899 introduced a report of all API versions, per module, that are older than the lowest default version of that module in the previous major version. This PR takes that report for v2 -> v3 and merges it into v3-removed.json, to remove these old API versions. The size of the `sdk/` folder went from 3g to 1.4g on my machine. Applying oldApiVersions.json to v3-removed.json was done with a little program generated by Cursor: ```py import json # Load the JSON files with open('reports/oldApiVersions.json', 'r') as old_file: old_versions = json.load(old_file) with open('versions/v3-removed.json', 'r') as v3_file: v3_versions = json.load(v3_file) # Merge the dictionaries for key, versions in old_versions.items(): if key in v3_versions: # Merge and sort the version arrays v3_versions[key] = sorted(set(v3_versions[key] + versions)) else: # Add new key and versions v3_versions[key] = sorted(versions) # Write the merged dictionary back to v3-removed.json with open('v3-removed.json', 'w') as v3_file: json.dump(v3_versions, v3_file, indent=2) ```
Part of #3422. Determine API versions that are older than any previous default version in a module. These are good candidates for removal.