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

helper: repo_sync: improve timeout diagnostics #354

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

quaresmajose
Copy link
Member

@quaresmajose quaresmajose commented Oct 3, 2024

  • exit after finishing all timeout attempts
  • add sleep proportional to the number of attempts before the next sync
  • run repo with verbose after some failure

@quaresmajose quaresmajose requested review from a team, doanac and vanmaegima October 3, 2024 15:36
@quaresmajose quaresmajose force-pushed the repo_sync branch 2 times, most recently from 8eeb414 to 2d814cb Compare October 7, 2024 12:15
@quaresmajose quaresmajose changed the title helper: repo_sync: exit after finishing all timeout attempts helper: repo_sync: improve timeout diagnostics Oct 7, 2024
for i in $(seq 4); do
run repo init --repo-rev=v2.35 --no-clone-bundle -u $* ${REPO_INIT_OVERRIDES} && break
run repo init $_repo_extra_args --repo-rev=v2.35 --no-clone-bundle -u $* ${REPO_INIT_OVERRIDES} && break
_repo_extra_args = "--verbose"
Copy link
Member

Choose a reason for hiding this comment

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

What is the downside of always running with verbose?

Copy link
Member Author

Choose a reason for hiding this comment

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

basically it just generates less noise, as the first time it almost always works

- exit after finishing all timeout attempts
- add sleep proportional to the number of attempts before the next sync
- run repo with verbose after some failure

Signed-off-by: Jose Quaresma <[email protected]>
for i in $(seq 4); do
run timeout 4m repo sync && break
run timeout 4m repo sync $_repo_extra_args && break
_repo_extra_args = "--verbose"
Copy link
Member

Choose a reason for hiding this comment

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

clever

Copy link
Contributor

@MrCry0 MrCry0 left a comment

Choose a reason for hiding this comment

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

LGTM. Cool!

Copy link
Member

@ricardosalveti ricardosalveti left a comment

Choose a reason for hiding this comment

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

LGTM

@doanac doanac merged commit 652f49e into foundriesio:master Oct 10, 2024
2 checks passed
@quaresmajose quaresmajose deleted the repo_sync branch October 10, 2024 12:28
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.

5 participants