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

Should a line that doesn't parse as a review be ignored? #15

Open
Ekleog opened this issue Oct 12, 2018 · 5 comments
Open

Should a line that doesn't parse as a review be ignored? #15

Ekleog opened this issue Oct 12, 2018 · 5 comments
Labels
needs-impl Needs someone to actually write the spec

Comments

@Ekleog
Copy link
Contributor

Ekleog commented Oct 12, 2018

Raised in #6 (comment) was the issue of lines that don't even parse as a review in the review branch.

Should they be ignored, or trigger a fatal error? My current feeling is that it's better if they are ignored, because it's not possible to recover from someone having done a mistake otherwise, and it will allow a smoother upgrade path to new versions that may break the review format.

What do you think about it?

@Ekleog Ekleog mentioned this issue Oct 12, 2018
@oxij
Copy link
Member

oxij commented Oct 12, 2018

And what if somebody commits an invalid commit into review-branch (made by hand, but signed and all)? IMHO if anything that bad happens everything should stop until things get cleaned up and everyone agrees that the resulting review-branch state is correct. The cleanup itself is pretty simple, just force push an earlier revision, let everyone pull and accept that and then make everyone rebase reviews they added since with amended dates.

"Be strict towards data you produce, be lenient towards data you consume" produces data formats with HTML quality, IMO.

@Ekleog
Copy link
Contributor Author

Ekleog commented Oct 13, 2018

“Just force push” sounds like something that's likely to pose huge problems for things the size of nixpkgs. That'd mean (tens of?) thousands of people having to force-pull. Sure, it's not supposed to happen… but having a way to recover from compromise sounds required to me.

Actually, that's the reason why we introduced the with keyword in the first place: to recover from Bad Things™ happening in the “code” branch. I think the “review” branch shouldn't really be considered as impossible to fail, and force-pushing to it would be just as bad as force-pushing to the “code” branch.

I agree that the “strict in what you produce, lenient in what you consume” has drawbacks, but it's incredibly resilient, and it also resulted in RFC532[12]. In the absence of security issues, I'd think it's better to be resilient than to force-fail :)

@lrvick
Copy link

lrvick commented Oct 23, 2018

Most simple implementations (like bash) will read one line from a note at a time and validate them as independant objects. Forcing buffering adds complexity.

Under this, I think we parse one line at a time, but only return 0 if conditions are met. If someone appends a line of whitespace to an otherwise valid file it should not break the whole thing imo.

I favor resiliency here.

@oxij
Copy link
Member

oxij commented Oct 24, 2018 via email

@Ekleog
Copy link
Contributor Author

Ekleog commented Oct 24, 2018 via email

@Ekleog Ekleog added the needs-impl Needs someone to actually write the spec label Oct 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-impl Needs someone to actually write the spec
Projects
None yet
Development

No branches or pull requests

3 participants