Skip to content

Conversation

@justonedev1
Copy link
Collaborator

INVARIANT status is introduced to fix OCTRL-948. INVARIANT is overwritten by any other status in status product (X() function). We are taking account the criticality of the role when merging. If all roles are noncritical we are returning INVARIANT. If there is any critical role(s) we are merging and returning their status, which shouldn't be INVARIANT. All roles except taskRole and callrole are taken as critical

})

When("Aggregate role is merged with any status (except UNDEFINED) status", func() {
It("becomes UNDEFINED", func() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume this is expected because the aggregator role is empty? If so, perhaps make it clearer in "When("Empty aggregate role is...".

},
},
}
ar.status.merge(task.INACTIVE, ar)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since task.INACTIVE is basically ignored, perhaps add a short comment that this is expected (here and in further cases down). I understand this behaviour does not come in this PR, but it is quite counter-intuitive, so we should avoid our own confusion later.

@justonedev1
Copy link
Collaborator Author

I addressed the comments and also did the tests on staging. But if you aprove this, dont merge I need to squash the fixup commit

@justonedev1 justonedev1 requested a review from knopers8 April 2, 2025 07:39
Copy link
Collaborator

@knopers8 knopers8 left a comment

Choose a reason for hiding this comment

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

thank you!

INVARIANT status is introduced to fix OCTRL-948. INVARIANT is
overwritten by any other status in status product (X() function). We are
taking account the criticality of the role when merging. If all roles
are noncritical we are returning INVARIANT. If there is any critical
role(s) we are merging and returning their status, which shouldn't be
INVARIANT. All roles except taskRole and callrole are taken as critical
@justonedev1 justonedev1 merged commit 77bdd3a into master Apr 2, 2025
2 checks passed
@justonedev1 justonedev1 deleted the OCTRL-948 branch April 2, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants