Changing localization.yml for proper authentication and translation#825
Open
pranjal-glowingstar wants to merge 16 commits intomasterfrom
Open
Changing localization.yml for proper authentication and translation#825pranjal-glowingstar wants to merge 16 commits intomasterfrom
pranjal-glowingstar wants to merge 16 commits intomasterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds verbose tracing/logging to the localization scripts to aid debugging and validation of localization runs.
Changes:
- Enable shell tracing with timestamped
PS4and add start/end banners and runtime metrics. - Add pre/post run “visibility” logs (env/git/status, directory listings, checksums).
- Refactor formatting in
GetLocalizedFiles.shand expand curl verbosity/output diagnostics.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 23 comments.
| File | Description |
|---|---|
| localize.sh | Adds extensive tracing and pre/post diagnostics; reformats and shortens localization fetch calls. |
| GetLocalizedFiles.sh | Adds tracing and more verbose curl diagnostics; refactors parsing/loop logic and changes file handling behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Removed oauthToken function implementation that fetched an OAuth token.
Updated script to use pre-fetched OIDC token instead of client ID and secret.
Updated the process for obtaining the TouchDown Build access token using GitHub OIDC federated token.
Updated the TouchDown Build access token exchange endpoint and added clarification in comments.
Added error handling for access token retrieval in localization workflow.
Updated the OAuth token exchange endpoint from v1.0 to v2.0 for improved compatibility.
Removed extensive logging and tracing from the script. Consolidated multiple calls to GetLocalizedFiles.sh into a single line for each localization.
Refactor logging and argument parsing in GetLocalizedFiles.sh. Update echo statements for better clarity and modify OAuth handling.
Updated GITHUB_TOKEN to use secrets.GH_TOKEN and modified pull request head reference.
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.
Problem
The pipeline for localization(localization.yml) was always giving error when running leading to no translations and no pull request raise.
Root cause
There were 3 main issues with the flow
The app registration for FluentUi-Android was not done. The previous app registration was deleted somehow due to which the authentication and authorization both were impacted. Application client ID and application client secret present in repository secrets were useless.
The authentication mechanism required change from client secret type to federated credentials. Instead of passing client ID and client secret, we are using OIDC mechanism to get a token in runtime and then authenticate ourselves.
The new team created required its client ID addition in touchdown build team to provide proper authorization and remove the 403 forbidden error.
Fix
We have added a new app registration with the same name(FluentUi-Android), added federated credentials, updated the repository secrets with correct client ID and added this tenant in touchdown build's team.
Validations
Pipeline running successfully, translations happening and PR begin raised automatically.
(how the change was tested, including both manual and automated tests)
Screenshots
Pull request checklist
This PR has considered: