-
Notifications
You must be signed in to change notification settings - Fork 1
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
[MPDX-8446] Automate translation download and extraction #1209
Conversation
Bundle sizes [mpdx-react]Compared against 34edc48 No significant changes found |
Preview branch generated at https://8446-automate-translations.d3dytjb8adxkk5.amplifyapp.com |
Have we tested what happens when we get a timeout from OneSky? |
@wrandall22 Not specifically. I tested the case where the environment variables aren't provided and it logs a 401 message and terminates with a successful error code. Are you afraid of it hanging forever if OneSky doesn't respond? |
Right, my concern would be it hanging forever or making the deployment timeout. |
@wrandall22 OK, I set it up to timeout after one minute. It takes 10 seconds to run locally on my machine, so that should be plenty of time. I tested in a branch that |
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.
This is looking great! I left some comments
env: | ||
# Disable git hooks because we are only modifying translation files | ||
HUSKY: 0 | ||
with: |
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.
Do we want to add reviewers to this?
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.
What are your thoughts about adding delete-branch: true
to delete thre branch after each merge and so the branch is only around if changes are to be made.
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.
What are your thoughts about adding
delete-branch: true
to delete thre branch after each merge and so the branch is only around if changes are to be made.
We have this repo configured to automatically delete branches from merged PRs, so that shouldn't be an issue
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.
Do we want to add reviewers to this?
Adding team reviewers requires a Personal Access Token with repo
scope or making a GitHub App with those permissions (https://github.com/peter-evans/create-pull-request/tree/v7/#action-inputs). If we use a PAT, we have to deal with rotating it when it expires and having to get someone else to create one if the person who created it leaves our GitHub org or the web-engineering-js
team. It's also less secure to use a long-lived PAT instead of the short-lived automatic GITHUB_TOKEN
. Making a GitHub App for this also doesn't feel worth it.
If the goal is to be alerted when this PR gets created, I think we can mention @CruGlobal/web-engineering-js
in the PR body, and we'll all get a notification.
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.
Thank you for making this! Lets test it out and review after some time
7547442
to
687b86d
Compare
@dr-bizz Yes, it would be good to revisit this maybe in the new year to see if we would like to make any adjustments. |
Description
yarn extract
before uploading labels to OneSky. That way translation can begin immediately on any new labels instead of needing to wait forpublic/locales/en/translation.json
to be updated. (The extracted labels are not committed and are discarded when the action terminates)yarn onesky:download
to deploy the app with the latest labels from OneSky. I tested that if that command fails for any reason, the deployment will still continue successfully.ONESKY_*
environment variables to Amplify.yarn extract
oryarn onesky:download
. Here is an example from my fork of the PR that will be created: [no-Jira] Update translations canac/mpdx-react#5. If the PR hasn't merged, the action will rebase and force-push any new labels to the branch.MPDX-8446
Checklist: