-
Notifications
You must be signed in to change notification settings - Fork 120
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
Prow accepted invalid OWNERS_ALIASES change and broke approvals #360
Comments
/kind bug |
Can I assign this to myself? Prima facie, seems like a missed edge case, |
/assign @nikhilkumar13199 Any help would be appreciated, Prow is needing contributors! |
I see possible problems. One thing is with |
Thanks for taking a look! Can you edit the PR description to include Fixes: #368 so the issue/PR get linked to each other? |
@petr-muller That is a yaml error, so it is already caught by the existing logic. But I will add this to my unit test cases in the PR. |
I have opened a revert #381 so we'll reopen the issue as well (I'll do that once the revert merges). #360 (comment) was actually a lead. It is a YAML error and it did fail to parse, but unfortunately prow/pkg/plugins/verify-owners/verify-owners.go Lines 272 to 277 in 15dd4c2
So the Treatment of empty aliases is then a followup - |
/reopen @nikhilnishad-goog FYI :( Do want to follow up? |
@petr-muller: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@petr-muller Thanks for detecting and reverting. Yes, I will raise another PR today or tomorrow, only for the case where |
@nikhilnishad-goog I think the main change necessary will be for |
@petr-muller Among the following -
INVALID CASES -> (throw errors)
For sure, we should error out for the last case when
|
@nikhilnishad-goog sorry, I was not able to look at your PR yet, but leaving some high-level thoughts here
I think this all leads to the state where parsing method for WDYT? |
I agree. Well summarized all-around IMO. I had similar thoughts during review of the initial PR too. |
@petr-muller @tuminoid Thanks a lot for the in-detail explanation. I think I agree on all points. As I understand it, right now, standard prow functionality should never throw errors except when the YAML couldn't be unmarshalled at all. That makes sense, i will update my PR so that the errors discussed in my previous comments... INVALID CASES -> (throw errors)
... are no longer breaking for any case of I think I can update the github client interface in Consequently, both standard prow functionality (like apporve plugin) and verify-owners will not see new errors (right now the only failure they expect from repoowners.go is when unmarshalling fails). Only some added labels and comments. |
That should not be necessary, I don't think that's something |
Ahh, I see. Makes more sense now. But now this problem gets challenging, Any ideas on how that can be achieved, without making a change in |
Hard to achieve without changing the function signature, but the function is not used at too many places so the toil does not seem to be that big, The callsites will need to change anyway, because they will need to process the enhanced error reporting data? Hypothetically you could implement a rich type that implements |
/area plugins |
Issue
We use OWNERS file that points to aliases listed in OWNERS_ALIASES.
We promoted all of our reviewers to approvers in this PR, which then caused Prow to stop accepting approves, such as here and here.
Expected outcome
When merging PR116, Prow should've labeled the PR as "do-not-merge/invalid-owners-file" and blocked it.
Actual outcome
Prow/tide did not complain, we merged it, and noticed that approving was broken. Had to manually merge a fix PR, which then solved the situation right away.
Looking at the verify-owners_test.go:
{}
to signal empty group, which is valid YAML, but maybe not expected by Prow?Logs
There was no error logs in Prow, just regular comment/approval handling logs, that did not indicate OWNERS was broken. It just claimed "comment did not result in approval".
The text was updated successfully, but these errors were encountered: