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

Propagate master only when analysis changes #206

Merged

Conversation

kit-ty-kate
Copy link
Contributor

Alternative to #204 cc @art-w
We just have to wait for ocurrent/ocurrent#330 to be merged and this is good to go.

Already being tested in production.

@art-w
Copy link
Contributor

art-w commented Jan 30, 2023

Yes this is a much better fix! Thanks :)

Comment on lines +339 to +340
and> meta = Current.Analysis.metadata x in
Result.iter (fun x -> prev := Ok x, meta) x;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There seem to be some issues here. The metadata and the state aren't in sync which can cause problem:
scrn-2023-01-30-19-58-47
Here is the log (and previous working logs): https://opam-repo-ci.ci3.ocamllabs.io/job/2023-01-30/183948-opam-ci-analyse-9093d6

Analyse.examine ~master src
|> Current.cutoff (* keep the old master if the analysis hasn't changed *)
~eq:(fun (_, old_analysis) (_, new_analysis) ->
Analyse.Analysis.equal old_analysis new_analysis)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I'm seeing something rather annoying with this change.
The old behaviour is:

  • if a PR fails with something unrelated
  • and we open and merge a new PR to fix those unrelated issues
  • we expect the new master commit to be used when clicking the rebuild button on the first PR

However with this change it seems that the old master commit remain and thus the change isn't taken into account.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@kit-ty-kate kit-ty-kate force-pushed the stop-recreate-graph-on-analysis-build branch from 5575d4c to 9854379 Compare January 31, 2023 17:47
@kit-ty-kate kit-ty-kate force-pushed the stop-recreate-graph-on-analysis-build branch from 9854379 to 1513f43 Compare February 28, 2023 14:43
@kit-ty-kate kit-ty-kate marked this pull request as ready for review February 28, 2023 14:43
@kit-ty-kate
Copy link
Contributor Author

Tested successfully (so far) live

@kit-ty-kate kit-ty-kate merged commit 9e55f8a into ocurrent:master Feb 28, 2023
@kit-ty-kate kit-ty-kate deleted the stop-recreate-graph-on-analysis-build branch February 28, 2023 14:45
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.

2 participants