-
Notifications
You must be signed in to change notification settings - Fork 36
landoscript diffs should have sorted filenames #1231
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
Conversation
bhearsum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for putting this together! It looks largely fine modulo the few comments below.
Please also update https://github.com/mozilla-releng/scriptworker-scripts/blob/master/landoscript/src/landoscript/actions/android_l10n_import.py and https://github.com/mozilla-releng/scriptworker-scripts/blob/master/landoscript/src/landoscript/actions/version_bump.py to handle this correctly - thank you!
Also, while reviewing this I discovered an issue with the tests. That's being fixed in #1232. Once it lands you'll need to rebase your work on top of it to make sure it is tested properly.
| files_to_diff.append(("CLOBBER", orig_clobber_file, new_clobber_file)) | ||
|
|
||
| if not files_to_diff: | ||
| return [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is impossible to hit in reality at the moment (because the CLOBBER file is always in this list), but if we need to return early here, we must return actions, because there may be others added above. (This is different than in android_l10n_sync of course, where there's only one potential action.)
It would probably be cleaner to write this as a if files_to_diff block anyways, and leave the only return statement at the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense, I removed that.
0e5d61e to
3739b6a
Compare
landoscript/tests/conftest.py
Outdated
| continue | ||
|
|
||
| path_line = diff.split("\n")[0] | ||
| if path_line.startswith("diff --git"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, this misses all but the first file. Due to the way the diffs are split, we lose the diff in the in the subsequent sections.
You can probably fix this by adjusting diffs after the splitting happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct! I made changes.
Unrelated to that, I found and fixed some cases where the sorting order was incorrect
2c7ff35 to
1ebf35c
Compare
bhearsum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, thank you for working through all of this!
I'll look into this; I think it's possible for this type of contribution. |
|
@bhearsum thank you for you patience, and I appreciate your guidance! |
This is something I noticed was missing while reviewing the final form of mozilla-releng#1231.
This is something I noticed was missing while reviewing the final form of mozilla-releng#1231.
This is something I noticed was missing while reviewing the final form of #1231.
This addresses this bugzilla ticket: https://bugzilla.mozilla.org/show_bug.cgi?id=1967637: