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

#189 add average_build_mttr into QoS #317

Merged
merged 8 commits into from
Aug 29, 2024
Merged

Conversation

Suban05
Copy link
Contributor

@Suban05 Suban05 commented Aug 26, 2024

Closes #189

@Suban05
Copy link
Contributor Author

Suban05 commented Aug 26, 2024

@Yegorov @tank-bohr please review

Copy link
Contributor

@Yegorov Yegorov left a comment

Choose a reason for hiding this comment

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

@Suban05 There are several points

judges/quality-of-service/quality-of-service.rb Outdated Show resolved Hide resolved
judges/quality-of-service/quality-of-service.rb Outdated Show resolved Hide resolved
judges/quality-of-service/quality-of-service.rb Outdated Show resolved Hide resolved
Fbe.unmask_repos.each do |repo|
Fbe.octo.repository_workflow_runs(repo, created: ">#{f.since.utc.iso8601[0..9]}")[:workflow_runs].each do |json|
workflow_id = json[:workflow_id]
if json[:conclusion] == 'failure'
Copy link
Contributor

Choose a reason for hiding this comment

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

@Suban05 What if the status is failure several times in a row. E. g.:

id workflow_id status
1 1 success
2 1 failure
3 1 failure
4 1 success

last_failed_at - should be the first or last (id: 2 or 3 ) failure of workflow run?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Yegorov good point, thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Yegorov added changes and a test, take a look, please

Copy link
Contributor

@Yegorov Yegorov Aug 26, 2024

Choose a reason for hiding this comment

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

@Suban05 Probably here we need the opinion of @yegor256 , we must rewrite failed time or leave the first failed time?
I think we must leave the first failed time.
E. g.

if json[:conclusion] == 'failure' && mttr[workflow_id].nil?

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe we must take the first failure. MTTR means "mean time to repair."

Fbe.unmask_repos.each do |repo|
Fbe.octo.repository_workflow_runs(repo, created: ">#{f.since.utc.iso8601[0..9]}")[:workflow_runs].each do |json|
workflow_id = json[:workflow_id]
if json[:conclusion] == 'failure'
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe we must take the first failure. MTTR means "mean time to repair."

judges/quality-of-service/quality-of-service.rb Outdated Show resolved Hide resolved
@Suban05
Copy link
Contributor Author

Suban05 commented Aug 27, 2024

@Yegorov @tank-bohr updated

@Suban05
Copy link
Contributor Author

Suban05 commented Aug 27, 2024

@Yegorov updated
tests fail, need this pr zerocracy/fbe#84

Copy link
Contributor

@Yegorov Yegorov left a comment

Choose a reason for hiding this comment

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

@Suban05 Looks good!

@Suban05
Copy link
Contributor Author

Suban05 commented Aug 29, 2024

@yegor256 please check

@yegor256 yegor256 merged commit 78f5a44 into zerocracy:master Aug 29, 2024
8 checks passed
@yegor256
Copy link
Member

@Suban05 thanks!

@0crat
Copy link

0crat commented Aug 29, 2024

@tank-bohr Hey there, awesome job on the review! 🎉 You've snagged +4 points, which is pretty cool considering all the factors that go into calculating these bonuses. Your total score is now sitting at a sweet +137. Keep up the great work, and remember, more detailed reviews with plenty of comments could boost your points even higher next time!

@0crat
Copy link

0crat commented Aug 29, 2024

@Yegorov Great job on the review! 🎉 You've earned +15 points: +4 base, +5 for reviewing 501 hits-of-code (capped at 16), and +5.5 for 22 comments (capped at 8). No deductions applied as you met all criteria. Your new balance is +445. Keep up the excellent work!

@0crat
Copy link

0crat commented Aug 29, 2024

@Suban05 Hey there, awesome job on your contribution! 👍 You've earned +4 points, which is our base reward. We had to deduct 8 points because your code was quite hefty (501 hits-of-code, over our 200 limit), and another 4 points due to the high number of review comments (23). But don't worry, we added 13 points to make sure you get something for your hard work. Your total balance is now +565. Remember, quality over quantity is key. Keep those contributions coming, and aim for more concise, well-reviewed code next time!

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.

average_build_mttr into QoS
5 participants