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

update_bench_status should check whether status is valid before querying GitHub. #283

Open
Zimmi48 opened this issue May 22, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Zimmi48
Copy link
Member

Zimmi48 commented May 22, 2023

In update_bench_status, there are a few statuses ("created", "pending"...) that won't trigger any status check creation on GitHub:

bot/src/actions.ml

Lines 505 to 508 in a660554

| "created" ->
Lwt_io.printlf "Bench job has been created, ignoring info update."
| _ ->
Lwt_io.printlf "Unknown state for bench job: %s" state ) )

But we query GitHub in all cases, only to discard the result of the query in the cases mentioned above:

GitHub_queries.get_repository_id ~bot_info ~owner:gh_owner ~repo:gh_repo

We should check that we are in one of the cases where a status check will be created on GitHub before doing anything else.

@ticket-tagger ticket-tagger bot added the bug Something isn't working label May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant