You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Snippet overrides get reordered on every sync, creating huge PR diffs #66
Every PR shows thousands of changed lines in fern/apis/*/openapi-overrides.yml, even when the content is the same.
Cause
tools/generate_snippet_overwrites.py builds the SDK list with glob.glob("snippets/*"), which returns directories in filesystem order. That order differs between machines and CI runners, so each sync writes the code samples in a different order. The preview.yml workflow runs the sync on every PR and auto-commits the result.
Proposed fix
Sort the list:
- all_sdks = [sdk.split('/')[-1] for sdk in glob.glob("snippets/*")]+ all_sdks = sorted(sdk.split('/')[-1] for sdk in glob.glob("snippets/*"))
Then regenerate the overrides once so the stable order is committed. That one change is a large reorder-only diff (content is identical when compared order-insensitively). Code samples would become alphabetical (csharp, curl, go, java, python, rust, typescript) instead of starting with java, which may change the language tab order in the docs.
A draft (#65) was closed so this can wait until after the 1.20 release, together with #64.
Related
preview.yml also pulls the latest upstream master OpenAPI spec into every PR, so unrelated spec changes land in PRs. Consider moving the sync out of the preview workflow and leaving it to the manual sync.yml.
Activity