Skip to content

Avoid learning the same job multiple times #53

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

Merged
merged 1 commit into from
Dec 15, 2020

Conversation

pietroalbini
Copy link
Member

The current learning implementation was designed with Travis CI in mind, where a single check was sent when the job ended. Because of that, when a successful build was detected all the successful job outputs were learned. This assumption doesn't hold anymore for GitHub Actions though.

GHA sends a check for every job in the matrix, and that causes RLA to learn a successful job every time one of the following jobs in the same build finishes, learning it multiple times. For example, if a build contains 60 jobs, the first job to finish will be learned 60 times.

This fixes the problem by remembering which job IDs we learned before, and skipping the learning process if the ID was previously seen. Along with that the code to remember IDs was refactored.

r? @Mark-Simulacrum

Copy link
Member

@Mark-Simulacrum Mark-Simulacrum left a comment

Choose a reason for hiding this comment

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

r=me, primarily only care about the method rename though

The current learning implementation was designed with Travis CI in mind,
where a single check was sent when the job ended. Because of that, when
a successful build was detected all the successful job outputs were
learned. This assumption doesn't hold anymore for GitHub Actions though.

GHA sends a check for every job in the matrix, and that causes RLA to
learn a successful job every time one of the following jobs in the same
build finishes, learning it multiple times. For example, if a build
contains 60 jobs, the first job to finish will be learned 60 times.

This fixes the problem by remembering which job IDs we learned before,
and skipping the learning process if the ID was previously seen. Along
with that the code to remember IDs was refactored.
@pietroalbini
Copy link
Member Author

Addressed all the feedback.

@pietroalbini pietroalbini merged commit 20eacda into rust-lang:master Dec 15, 2020
@pietroalbini pietroalbini deleted the multiple-learning branch December 15, 2020 14:48
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.

2 participants