-
Notifications
You must be signed in to change notification settings - Fork 455
Fix rpc not transferring promotion warnings to the client #12604
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
base: main
Are you sure you want to change the base?
Fix rpc not transferring promotion warnings to the client #12604
Conversation
| |> List.concat_map ~f:(fun (dst, srcs) -> | ||
| List.map srcs ~f:(fun (src, staging) -> { File.src; staging; dst })) | ||
| in | ||
| let sorted_missing = List.rev missing in |
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.
group_by_targets will sort all files, but the fold above reverses the list of missing files.
The absence of this reverse is what had lead to a swap in test-cases/promote/old-tests.t that was present in this PR before I noticed
7346050 to
0d45f52
Compare
2b5ad52 to
c6e4024
Compare
|
I just rebased on main. |
rgrinberg
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.
Haven't looked too closely, but everything seems sensible at first glance.
| dump_db db | ||
| ;; | ||
|
|
||
| (* Returns the list of files that were in [files_to_promote] |
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.
Thanks for adding the comments!
69ba843 to
3ad52a5
Compare
|
I think it would be better to split the two changes here. I'm fairly certain the promotion database clearing bug has been solved here, so I think that can be reviewed and merged quickly. The warning forwarding however has some potential issues and I think need a more careful review. |
6c4c3b8 to
2bd4cfe
Compare
|
I just did a pass, moving the warning state from a variant in I tested locally and it doesn't seem to be the fold problem mentionned above (#12604 (comment))... |
|
@ElectreAAS in that case it sounds like there is some racy behaviour. Could you intersperse some |
2bd4cfe to
b9e2d95
Compare
cce0ebf to
4c08842
Compare
|
The fact that it looked like we solved the promotion database clearing bug was due to weird races happening. I changed the test to make it clear that we are testing the warnings, not this other behaviour. |
6d924e4 to
3b007fc
Compare
3b007fc to
a24e500
Compare
|
We did a pass with @Alizter yesterday (thanks again btw) to not break the hashes in |
bin/rpc/rpc_common.ml
Outdated
| (match lock_held_by with | ||
| | Dune_util.Global_lock.Lock_held_by.Unknown -> "" | ||
| | Pid_from_lockfile pid -> sprintf " (pid: %d)" pid) | ||
| |> Pp.tag User_message.Style.Warning |
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.
We already add the tag in User_warning.emit for the Warning: text. Otherwise this entire message will be purple which I don't think we want.
…rget Signed-off-by: Ambre Austen Suhamy <[email protected]>
Signed-off-by: Ambre Austen Suhamy <[email protected]>
Signed-off-by: Ambre Austen Suhamy <[email protected]>
Signed-off-by: Ambre Austen Suhamy <[email protected]>
Signed-off-by: Ambre Austen Suhamy <[email protected]>
Signed-off-by: Ambre Austen Suhamy <[email protected]>
Signed-off-by: Ambre Austen Suhamy <[email protected]>
a24e500 to
8e2f1c6
Compare
|
@Alizter are you OK with the state of this? Anything needed for a ✔️ |
|
I will give it another review. |
Fixes #12578, and only looks like it fixes #12577, but doesn't, it was a red herring. See discussion on latter PR.
What was missing