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

Increase WOODPECKER_FORGE_TIMEOUT to fix config fetching for GitLab #4262

Merged
merged 3 commits into from
Oct 27, 2024

Conversation

pat-s
Copy link
Contributor

@pat-s pat-s commented Oct 27, 2024

fix #4260

Config fetching on GL takes a bit longer due to the subgroup fetching and permissions checks.
In my case, I had 1/6 repos failing with the default of 3s. The repo only had two workflow files. Both were somewhat complex.

I assume that the workflow parsing combined with the subgroup checks exceeded the 3s here.
After bumping WOODPECKER_FORGE_TIMEOUT to 5s, it worked.
Getting the initial config fetched seems to speed up future config pull as afterwards I was able to reduce WOODPECKER_FORGE_TIMEOUT again to 3s.

However, to avoid such issues for users I think the default value should be bumped to (at least) 5s.

Additionally, I improved some of the log/trace outputs which helped me a bit along the way.

@pat-s pat-s added bug Something isn't working forge/gitlab gitlab forge related build_pr_images If set, the CI will build images for this PR and push to Dockerhub labels Oct 27, 2024
Copy link

codecov bot commented Oct 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 26.52%. Comparing base (ddd55ee) to head (dfc3420).
Report is 26 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4262      +/-   ##
==========================================
+ Coverage   26.47%   26.52%   +0.05%     
==========================================
  Files         376      377       +1     
  Lines       27465    27451      -14     
==========================================
+ Hits         7270     7282      +12     
+ Misses      19530    19504      -26     
  Partials      665      665              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pat-s pat-s changed the title GitLab: fix config fetching from forge Increase WOODPECKER_FORGE_TIMEOUT to fix config fetching for GitLab Oct 27, 2024
@pat-s pat-s marked this pull request as ready for review October 27, 2024 09:54
@pat-s pat-s added the server label Oct 27, 2024
@woodpecker-bot
Copy link
Contributor

woodpecker-bot commented Oct 27, 2024

Deployment of preview was successful: https://woodpecker-ci-woodpecker-pr-4262.surge.sh

@6543 6543 enabled auto-merge (squash) October 27, 2024 10:15
@pat-s
Copy link
Contributor Author

pat-s commented Oct 27, 2024

Hmm while the build now starts, the webhook execution in this repo still fails with

image

and GL disables the webhook after a few executions which resulted in a timeout.

@6543
Copy link
Member

6543 commented Oct 27, 2024

still we can increase it a bit more ...

@6543 6543 merged commit 785f2e6 into main Oct 27, 2024
7 checks passed
@6543 6543 deleted the fix/gitlab-config-from-forge branch October 27, 2024 10:21
@pat-s
Copy link
Contributor Author

pat-s commented Oct 27, 2024

image

I don't think the timeout is the issue here. Even with 20s the GL webhook quits after ~ 10s.
I assume something is broken with the response?

The build is starting nevertheless, so only the response to the webhook is somehow not being sent back in time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build_pr_images If set, the CI will build images for this PR and push to Dockerhub forge/gitlab gitlab forge related server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GitLab: push triggers error with [generic]could not load config from forge
3 participants