freeCodeCamp
freeCodeCamp copied to clipboard
Discussion around handling English fallback of i18n challenges
This came up in our issue triage meeting, but to prevent the conversation getting lost I'm creating an issue thread.
Current Issue
When we modify the order of the English curriculum in a way that results in new files being added, running an i18n build will error out if the changes haven't been synced to that language. This means we can not rely on our CI on the main
branch to indicate the safety of running a deployment.
This only affects superblocks that are marked as isAudited
, as far as I know.
Potential Fixes
I had a couple of thoughts on how to address this.
Sync the Files
We could write an action that runs when new files are added on main
and have that action trigger the Crowdin upload/download flows.
Test the Files
If we'd rather just have an indication that the build will not succeed, and want to save some action runner hours, we could add a CI on main
that confirms all files in the English challenges are also in the audited i18n challenges.
We could write an action that runs when new files are added on
main
and have that action trigger the Crowdin upload/download flows.
If we'd rather just have an indication that the build will not succeed, and want to save some action runner hours, we could add a CI on
main
that confirms all files in the English challenges are also in the audited i18n challenges.
I think both of these are reasonable.
Plus, I think with the ongoing decoupling and containerization, we do not have to build all the languages in lockstep with one another like we are with our Pipelines right now.
We could write an action that runs when new files are added on main and have that action trigger the Crowdin upload/download flows.
I don't think that alone is enough. The problem last time was that the new challenge did not have a 100% proofread version, so the sync did nothing.
We can change that in the configuration to allow non-translated files to download, but it'll slow things down.
If it's not prohibitively slow, that's probably the way to go. If it is slow, how about doing it on demand when we want to clear a path for deployment?
https://github.com/freeCodeCamp/freeCodeCamp/runs/7566402154?check_suite_focus=true
The validation seems to be working as intended. Do we want to explore further solutions or are we satisfied enough to close this issue?
I guess so. To be clear, if I understand this correctly:
- Once the said workflow fails, we need the languages to catch up before deploying. While the languages can take a while to get caught up, the Crowdin workflows will at least get us the replacement files needed for the builds.
- If we need to deploy urgently, we should run the Crowdin upload/download workflows first.
- Alternatively, we just wait for the daily cron-based triggers, which will do step 2 above.
If we need to deploy urgently, we should run the Crowdin upload/download workflows first.
Kind of. As Naomi said, we need to change the config for that to work. A separate config that doesn't skip untranslated files should be enough, but we should test next time we insert a new step.
OK - in that case, @naomi-lgbt can you please update the workflow to also run specifically on PRs created by Camperbot for the Curriculum files for gatekeeping the main
branch? Also while you are at it we could do an @mention
to i18n team in the Crowdin PR when the check fails.