Skip to content
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

Transifex failing for LRMFE #113

Closed
hurtstotouchfire opened this issue Nov 28, 2022 · 12 comments
Closed

Transifex failing for LRMFE #113

hurtstotouchfire opened this issue Nov 28, 2022 · 12 comments
Labels
bug Report of or fix for something that isn't working as intended needs maintainer attention Issue or PR specifically needs the attention of the maintainer.

Comments

@hurtstotouchfire
Copy link
Member

The LRMFE’s translations job has been failing since October 16th.

See latest failure (Nov 14th): https://tools-edx-jenkins.edx.org/job/translations/job/frontend-app-learner-record-pull_translations/9/:

20:51:25 git diff --exit-code ./src/i18n
20:51:25 diff --git a/src/i18n/messages/ar.json b/src/i18n/messages/ar.json
20:51:25 index aa16a3d..463ebfe 100644
20:51:25 --- a/src/i18n/messages/ar.json
20:51:25 +++ b/src/i18n/messages/ar.json
20:51:25 @@ -4,7 +4,7 @@
20:51:25    "partially.completed.status.badge": "Partially Completed",
20:51:25    "link.back.to.records": "Back to My Records",
20:51:25    "records.list.error": "An error occurred attempting to retrieve your program records. Please try again later.",
20:51:25 -  "page.notfound.message": "الصفحة التي تبحث عنها غير متوفرة أو هناك خطأ في نص الرابط. رجاءً تحقق من الرابط و حاول مجدّدًا.",
20:51:25 +  "page.notfound.message": "الصفحة التي تبحث عنها غير متوفرة أو هناك خطأ في العنوان. رجاءً تحقق من العنوان و حاول مجددًا.",
20:51:25    "download.button.default": "Download program record",
20:51:25    "download.button.pending": "Downloading program record",
20:51:25    "download.button.complete": "Download complete",
20:51:25 Makefile:46: recipe for target 'detect_changed_source_translations' failed
20:51:25 make: *** [detect_changed_source_translations] Error 1
20:51:25 2022-11-13 20:51:25,860 INFO 13516 [utils.py:237] - Changes detected for [frontend-app-learner-record]. Pushing them to GitHub and opening a PR.
20:51:25 [transifex-bot-update-translations2022-11-13 30d9e4f] chore(i18n): update translations
20:51:25  1 file changed, 1 insertion(+), 1 deletion(-)
20:51:26 remote: Permission to edx/frontend-app-learner-record.git denied to edx-transifex-bot.
20:51:26 fatal: unable to access 'https://github.com/edx/frontend-app-learner-record.git/': The requested URL returned error: 403
20:51:26 Traceback (most recent call last):
20:51:26   File "transifex/pull.py", line 120, in <module>
20:51:26     pull(
20:51:26   File "transifex/pull.py", line 69, in pull
20:51:26     repo.commit_push_and_open_pr(skip_check_changes)
20:51:26   File "/edx/var/jenkins/jobs/translations/jobs/frontend-app-learner-record-pull_translations/workspace/ecommerce-scripts/transifex/utils.py", line 239, in commit_push_and_open_pr
20:51:26     self.push()
20:51:26   File "/edx/var/jenkins/jobs/translations/jobs/frontend-app-learner-record-pull_translations/workspace/ecommerce-scripts/transifex/utils.py", line 272, in push
20:51:26     subprocess.run(['git', 'push', '-u', 'origin', self.branch_name], check=True)
20:51:26   File "/usr/lib/python3.8/subprocess.py", line 516, in run
20:51:26     raise CalledProcessError(retcode, process.args,
20:51:26 subprocess.CalledProcessError: Command '['git', 'push', '-u', 'origin', 'transifex-bot-update-translations2022-11-13']' returned non-zero exit status 128.
20:51:26 Build step 'Execute shell' marked build as failure
20:51:26 Archiving artifacts
20:51:26 Sending e-mails to: [email protected]
20:51:27 Finished: FAILURE
@hurtstotouchfire hurtstotouchfire added the bug Report of or fix for something that isn't working as intended label Nov 28, 2022
@hurtstotouchfire
Copy link
Member Author

From @justinhynes:

I think this has something to do with the repo transitioning from the edx GitHub org to the openedx GitHub org.

I assumed I would have to make a change to add the transifex account/bot with permissions to the repo, but I can’t seem to access the settings page of the LR MFE (but I have access to all the other MFE repos in the openedx org).

I wonder if the edx-admin team hasn’t been added to the MFE’s settings.

Otherwise, I don’t think there is anything we can do to fix this ourselves right now. We may have to open up a ticket with tCRIL to (a) restore our admin access to the repo, or (b) have tCRIL fix this issue for us.

@hurtstotouchfire
Copy link
Member Author

@nedbat is this something you can fix?

@nedbat
Copy link
Contributor

nedbat commented Nov 30, 2022

@Carlos-Muniz ?

@Carlos-Muniz
Copy link

20:51:26 remote: Permission to edx/frontend-app-learner-record.git denied to edx-transifex-bot.
20:51:26 fatal: unable to access 'https://github.com/edx/frontend-app-learner-record.git/': The requested URL returned error: 403

I think this may be the culprit. I've created openedx/axim-engineering#567 so tCRIL on-call can fix it.

@Carlos-Muniz
Copy link

@nedbat @hurtstotouchfire
edx-transifex-bot should now have the necessary permissions now. Please let me know if this didn't fix it.

@hurtstotouchfire
Copy link
Member Author

Here's the new error:

16:22:42 Traceback (most recent call last):
16:22:42   File "transifex/pull.py", line 120, in <module>
16:22:42     pull(
16:22:42   File "transifex/pull.py", line 86, in pull
16:22:42     repo.merge_pr()
16:22:42   File "/edx/var/jenkins/jobs/translations/jobs/frontend-app-learner-record-pull_translations/workspace/ecommerce-scripts/transifex/utils.py", line 373, in merge_pr
16:22:42     raise RuntimeError('Pending status checks or other failure prevented this PR from being automatically merged')
16:22:42 RuntimeError: Pending status checks or other failure prevented this PR from being automatically merged
16:22:42 Build step 'Execute shell' marked build as failure
16:22:42 Archiving artifacts
16:22:42 Sending e-mails to: [email protected]
16:22:43 Finished: FAILURE

@hurtstotouchfire hurtstotouchfire moved this from Backlog to In Progress in Aperture-Maintained Dec 2, 2022
@justinhynes
Copy link
Contributor

Hi @Carlos-Muniz,

I had a thought about the most recent reported failure. IIRC, I believe the transifex user, edx-transifex-bot, also needs to have at least write access to the repo for the translations jobs to work correctly. This is the level of access that user has for most of the IDAs (ecommerce, edx-platform, credentials, edx-analytics-dashboard, etc.). I remember solving a similar translations issue in Credentials after the transition of the project to the openedx org.

I can't point to the exact line, but I think it has something to do with a check in the transifex scripts in the ecommerce-scripts repo (that all the other IDAs also use to push/pull translations from Transifex). I think it can open the PR but can't merge the PR without write access?

Anyway, if it's helpful, I can reach out to you via the Open edX Slack and provide some more in depth logs.

Thanks for your help!

@Carlos-Muniz
Copy link

@justinhynes Thanks for the ping.
We've already given the edx-transifex-bot write access to this repository. Not sure what else might be the problem, but I suspect more in depth logs will be needed.

@hurtstotouchfire hurtstotouchfire moved this from In Progress to Triage in Aperture-Maintained Oct 19, 2023
@hurtstotouchfire hurtstotouchfire added the needs maintainer attention Issue or PR specifically needs the attention of the maintainer. label Oct 19, 2023
@hurtstotouchfire
Copy link
Member Author

Is this still failing?

@justinhynes
Copy link
Contributor

Our internal Transifex job succeeded on Oct 10th for the first time as of early July. A PR was created and merged successfully: #198

However, upon further inspection, it was not merged automatically by the bot. It looks like there was some manual intervention to approve the PR that allowed it to be merged.

IIRC, the desired state is that a human isn't required to pull new translations from Transifex.

There are no pending changes/new translations at this time, so I wouldn't be surprised if it ends up failing again in the future.

@deborahgu
Copy link
Member

hmm, this should have been fixed by axim-engineering #940, but clearly wasn't (the job still requires manual approval as far as I can tell).

@deborahgu deborahgu moved this from Triage to Backlog in Aperture-Maintained Oct 31, 2023
@deborahgu
Copy link
Member

This is gotten fixed in the interim

@github-project-automation github-project-automation bot moved this from Backlog to Closed in Frontend Working Group Jan 3, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in Aperture-Maintained Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report of or fix for something that isn't working as intended needs maintainer attention Issue or PR specifically needs the attention of the maintainer.
Projects
Status: Done
Status: Closed
Development

No branches or pull requests

5 participants