refactor: Better separation between Cycles and NominalCycles#9264
Conversation
|
@basvandijk Seems there were some Java exceptions when running all tests, can you restart the job? |
|
Seems But strange the |
Hmm, it seems that Btw, I am not sure how to easily fish out the actual error messages from the usually quite long output. There were indeed about 50 or so java exceptions that seemed to be what the issue was about (also given that I saw nothing else fail). |
Yeah good point. It would be great if we could make BuildBuddy public. I'll bring it up in our next IDX meeting. |
alin-at-dfinity
left a comment
There was a problem hiding this comment.
Just some nitpicks / questions, otherwise LGTM.
Review dismissed by automation script.
|
@alin-at-dfinity Assuming the approval meant that there are no other concerns. Since I merged master and fixed some stuff after merging, your approval is required again. Please also kickstart CI and add the PR to the merge queue if no more concerns. |
|
Apologies for the late response, got carried away with other stuff. Triggered presubmit tests and auto-merge, let's see if it just works. I'll check back later. |
Review dismissed by automation script.
|
@alin-at-dfinity I am not sure CI was started properly. You should see a message like this one if it's properly triggered. |
1 similar comment
|
Sorry about all that, I believe I got it all figured out now (with a lot of handholding). |
|
No worries. I see you started 3 of them -- at least we'll have some fault tolerance in case we hit some flaky tests :) |
|
Problem is, for the first couple of them I used the GitHub commit URL instead of just the commit SHA. And couldn't understand why they kept failing. |
Review dismissed by automation script.
|
@alin-at-dfinity I had to fix some things after merging master which contained some latest changes. Please restart things when you get a chance. |
This PR is a first step towards implementing what's sketched out in #9063.
Specifically, in this PR we make some cycles metrics private to
ReplicatedStateso that we force callers to always use APIs that require specific types to be passed in as well as convert some other APIs to acceptNominalCyclesinstead of simplyCycles. This allows the removal of the functions that allow direct conversion fromCyclestoNominalCyclesand wherever this is needed we can convert from the raw amount (this is mostly tests and one case inCyclesAccountManagerwhich will be further improved in a follow-up).Follow-up PR(s) will implement the remaining parts of the solution, namely a new type that captures both the real amount and the one to update metrics and further locking down access patterns via public APIs with explicit types on them.