Repository navigation
fix(landing): authenticate the team page GitHub fetch in CI - #673
Merged
Merged
Conversation
The e2e suite's browser requests to api.github.com use up the runner's 60-request unauthenticated quota. The singleCss landing build that runs after it then gets a rejected /users request, the team page throws during prerender, vinext skips /team, and the route manifest check fails the publish job on main. Send GITHUB_TOKEN when it is set and pass it to the landing build steps. Authenticated requests use the token's own quota. The token is read by a server component at build time; it does not appear in dist/ or out/. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Contributor
Changepacks@devup-ui/wasm@1.0.80 → 1.0.81 - bindings/devup-ui-wasm/package.jsonPatch
@devup-ui/bun-plugin@1.0.19 → 1.0.20 - packages/bun-plugin/package.jsonPatch
@devup-ui/components@0.1.57 → 0.1.58 - packages/components/package.jsonPatch
@devup-ui/next-plugin@1.0.87 → 1.0.88 - packages/next-plugin/package.jsonPatch
@devup-ui/rsbuild-plugin@1.0.64 → 1.0.65 - packages/rsbuild-plugin/package.jsonPatch
@devup-ui/vite-plugin@1.0.70 → 1.0.71 - packages/vite-plugin/package.jsonPatch
@devup-ui/webpack-plugin@1.0.68 → 1.0.69 - packages/webpack-plugin/package.jsonPatch
|
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
문제
#672를 머지한 뒤 main의
publishjob이 두 번 연속Run E2E Tests (singleCss)에서 실패했다. 그래서 changepacks 단계까지 가지 못해 배포가 막혔다.첫 번째 landing 빌드는 68개 라우트를 모두 prerender했다. 반면 singleCss 빌드는
Prerendered 67 routes (1 skipped)로/team을 건너뛰었다.원인
TeamCard는 빌드 시점에https://api.github.com/users/owjs3901을 인증 없이 호출하고, 응답이 실패하면 throw한다. 그러면 vinext는 해당 라우트의 prerender를 건너뛴다.api.github.com을 실제로 호출해, runner IP의 비인증 한도(시간당 60회)를 다 써버린다.Prerendered 67 routes (1 skipped),/team이 skip된다. 재현을 확인했다.수정
TeamCard:GITHUB_TOKEN이 있으면Authorization: Bearer헤더를 붙인다. 없으면(로컬 빌드) 기존처럼 비인증으로 호출한다.publish.yml: landing 빌드 스텝 4개(Build Landing,Build Landing (singleCss),Build Landing (Next),Build Landing (Next, singleCss))에만GITHUB_TOKEN을 넘긴다. 인증된 요청은 토큰 자체 한도를 쓰므로 브라우저 호출에 영향받지 않는다.검증 (로컬, 비인증 한도 0 상태)
Prerendered 67 routes (1 skipped),/teamskip (CI 실패 재현)Prerendered 68 routes (0 skipped),dist/client/team.html생성build:next+ 토큰: 69/69 페이지,out/team.html생성dist/,out/전체에서 토큰 문자열 0건. server component에서만 읽고, 빌드 결과물에는 남지 않는다bun run lint통과,bun run test5204 pass / 0 fail