-
Notifications
You must be signed in to change notification settings - Fork 3
ci: Mitigate translation download 429 errors #320
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
Changes from all commits
744eac8
1cefb70
feaa832
2c5d488
b4b291f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,11 @@ env: | |
|
|
||
| steps: | ||
| - label: ':react: Build React App' | ||
| command: make build REFRESH_L10N=1 REFRESH_JS_BUILD=1 | ||
| key: build-react | ||
| command: | | ||
| make build REFRESH_L10N=1 REFRESH_JS_BUILD=1 STRICT_L10N=1 | ||
| tar -czf dist.tar.gz dist/ | ||
| buildkite-agent artifact upload dist.tar.gz | ||
|
Comment on lines
+9
to
+13
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Upload the build artifact for later tasks to avoid unnecessary duplicate builds. |
||
| plugins: &plugins | ||
| - $CI_TOOLKIT_PLUGIN | ||
| - $NVM_PLUGIN | ||
|
|
@@ -20,8 +24,12 @@ steps: | |
| plugins: *plugins | ||
|
|
||
| - label: ':android: Publish Android Library' | ||
| depends_on: build-react | ||
| command: | | ||
| make build REFRESH_L10N=1 REFRESH_JS_BUILD=1 | ||
| buildkite-agent artifact download dist.tar.gz . | ||
| tar -xzf dist.tar.gz | ||
| rm -rf ./android/Gutenberg/src/main/assets/ | ||
| cp -r ./dist/. ./android/Gutenberg/src/main/assets | ||
|
Comment on lines
+27
to
+32
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rely upon the single build created by an earlier task. |
||
| echo "--- :android: Publishing Android Library" | ||
| ./android/gradlew -p ./android :gutenberg:prepareToPublishToS3 $(prepare_to_publish_to_s3_params) :gutenberg:publish | ||
| agents: | ||
|
|
||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Expand the script robustness to include more sophisticated backoff logic when 429 errors occur. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,7 +16,7 @@ | |
| "generate-version": "node bin/generate-version.js", | ||
| "lint:js": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", | ||
| "lint:js:fix": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0 --fix", | ||
| "postinstall": "patch-package && npm run prep-translations && npm run generate-version", | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove the default translation downloads that occur in The downside is that someone running The upside is that avoiding unnecessary or duplicative translation string fetches is far simpler. |
||
| "postinstall": "patch-package && npm run generate-version", | ||
| "prep-translations": "node bin/prep-translations.js", | ||
| "preview": "vite preview --host", | ||
| "test:unit": "vitest run", | ||
|
|
||
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.
Add
STRICT_L10N=1to ensure the release build fails if downloading translation strings fails. Otherwise, the release may lack expected translations.