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

fix broken CI script #1254

Merged
merged 1 commit into from
Jun 7, 2024
Merged

fix broken CI script #1254

merged 1 commit into from
Jun 7, 2024

Conversation

k-yle
Copy link
Collaborator

@k-yle k-yle commented Jun 6, 2024

See JamesIves/github-pages-deploy-action#1589 for more info. The 'deploy' pipeline has been broken for the past 2 weeks

Copy link

github-actions bot commented Jun 6, 2024

🍱 You can preview the tagging presets of this pull request here.

Copy link
Collaborator

@tordans tordans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Only way to test it is to merge, right? So lets try this…

@tordans tordans merged commit bc78010 into openstreetmap:main Jun 7, 2024
5 checks passed
@tordans
Copy link
Collaborator

tordans commented Jun 7, 2024

Only way to test it is to merge, right?

Well, not really :-D

This job was skipped

Maybe something checks if the right files where changed and only then allows the Action to run. But re-running the last action https://github.com/openstreetmap/id-tagging-schema/actions/workflows/deploy.yml does not work either, it shows the same error (I thought it would use the current code to run but maybe it uses the specific commit…).

=> We will just have to wait until we merge something else, I guess.

@tordans
Copy link
Collaborator

tordans commented Jun 7, 2024

@k-yle the prettier merge just now ran the script in https://github.com/openstreetmap/id-tagging-schema/actions/runs/9411968617 and it still fails. Did not look into it more.

Btw, there is another info about outdated node being used by the action which we fixed with FixMyBerlin/atlas-app@e9e260f in a different project. We might want to lookout for that as well.

@k-yle k-yle deleted the kh/deploy-bug branch June 7, 2024 05:42
@k-yle
Copy link
Collaborator Author

k-yle commented Jun 7, 2024

@tordans it's a different error now, because pushing directly to the main branch is no longer allowed:

image

One solution is to make the bot automatically opens a PR instead of committing to main, but @tyrasd should probably make a decision about what to do.

For completeness: another solution would be to store the dist files in a dedicated branch, instead of a folder on the main branch. This is the more standard, but it would be a major breaking change

@tordans
Copy link
Collaborator

tordans commented Jun 7, 2024

pushing directly to the main branch is no longer allowed

Martin can probably add the Action to an allow list that allows it to push to main and bypass the branch protection.

@k-yle
Copy link
Collaborator Author

k-yle commented Jun 7, 2024

Martin can probably add the Action to an allow list that allows it to push to main and bypass the branch protection.

I'm interested to know if this is possible, because last time I checked, it was only possible to make exceptions for Users/Bots/GitHub Apps, but not GitHub Actions12, since actions use the repository's GITHUB_TOKEN.

Footnotes

  1. https://github.blog/changelog/2022-05-17-consistently-allow-github-apps-as-exceptions-to-branch-protection-rules/

  2. community/discussions#13836

@tyrasd
Copy link
Member

tyrasd commented Aug 7, 2024

Martin can probably add the Action to an allow list that allows it to push to main and bypass the branch protection.

I did a bit of research and as far as I see, there is no good way to make this work (see also this short discussion on the repo of the github action we use in the workflow), at least not easily. 🤷

We could either disable the branch protection rules again (and manually check that our "branch/PR rules" are followed), or otherwise make sure that the necessary "deploy" routine is performed when each PR is merged.

My quick opinion would be that the second option might be more error-prone in the long term than the first. What do you think?

@tyrasd
Copy link
Member

tyrasd commented Aug 7, 2024

A third option would be to do the "deploy" of the interim folder into a separate branch, which would not have to be protected. Then we only need to adjust the respective scripts in iD and transifex to point to the new branch. That's probably the better solution here.

//edit: iD and transifex now point to the new branch for this. next step would be to drop the interim directory in the main branch: let's do this after the upcoming release

@tyrasd tyrasd mentioned this pull request Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants