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

Retry upload codecov when rate limit is hit. #7787

Closed
kaovilai opened this issue May 9, 2024 · 6 comments
Closed

Retry upload codecov when rate limit is hit. #7787

kaovilai opened this issue May 9, 2024 · 6 comments
Labels
github_actions Pull requests that update GitHub Actions code Help wanted staled

Comments

@kaovilai
Copy link
Contributor

kaovilai commented May 9, 2024

What steps did you take and what happened:

Following happened.

info - 2024-05-08 19:47:47,812 -- The PR is happening in a forked repo. Using tokenless upload.
info - 2024-05-08 19:47:48,001 -- Process Commit creating complete
debug - 2024-05-08 19:47:48,001 -- Commit creating result --- {"result": "RequestResult(error=RequestError(code='HTTP Error 429', params={}, description='{\"detail\":\"Tokenless has reached GitHub rate limit. Please upload using a token: https://docs.codecov.com/docs/adding-the-codecov-token. Expected available in 197 seconds.\"}'), warnings=[], status_code=429, text='{\"detail\":\"Tokenless has reached GitHub rate limit. Please upload using a token: https://docs.codecov.com/docs/adding-the-codecov-token. Expected available in 197 seconds.\"}')"}

What did you expect to happen:
This rate limit to not fail Run CI job.

Expected available in 197 seconds. from log can be used to wait before retrying again.

Anything else you would like to add:

Could potentially be solved via Codecov CLI repo codecov/codecov-cli#441

codecov/feedback#358

Environment:

  • Velero version (use velero version):
  • Velero features (use velero client config get features):
  • Kubernetes version (use kubectl version):
  • Kubernetes installer & version:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

  • 👍 for "I would like to see this bug fixed as soon as possible"
  • 👎 for "There are more important bugs to focus on right now"
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. If a Velero team member has requested log or more information, please provide the output of the shared commands.

@kaovilai
Copy link
Contributor Author

@github-actions github-actions bot removed the staled label Jul 16, 2024
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. If a Velero team member has requested log or more information, please provide the output of the shared commands.

@kaovilai
Copy link
Contributor Author

Should be solved with codecov/codecov-action@7594baa

Already using v4 so should be fine.

@christianwgd
Copy link

christianwgd commented Sep 29, 2024

The update doesn't fix anything for me. Does anyone know an alternative solution for codecov? Doesn't even have to be such a full blown solution.

@mateusoliveira43
Copy link
Contributor

we could use Go provided tools

Example command in Makefile

COVERAGE_THRESHOLD=80

.PHONY: check-coverage
check-coverage: ## Check if test coverage threshold was reached.
	@{ \
	set -e ;\
	current_coverage=$(shell go tool cover -func=cover.out | grep total | grep -Eo "[0-9]+\.[0-9]+") ;\
	if  [ "$$(echo "$$current_coverage < $(COVERAGE_THRESHOLD)" | bc -l)" -eq 1 ];then \
		echo "Current coverage ($$current_coverage%) is below project threshold of $(COVERAGE_THRESHOLD)%" ;\
		exit 1 ;\
	fi ;\
	echo "Coverage threshold of $(COVERAGE_THRESHOLD)% reached: $$current_coverage%" ;\
	}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update GitHub Actions code Help wanted staled
Projects
None yet
Development

No branches or pull requests

4 participants