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

[QC-1201] Consider replacing the merged object with the input if it has higher run number #2443

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

justonedev1
Copy link
Collaborator

is this the way how to do the ticket goal correctly? I have yet to add tests, so I am making draft first, so you can tell me if this is not it

<< ENDM;
reportedMismatchingRunNumbers = true;
otherMO->Copy(*targetMO);
Copy link
Collaborator

Choose a reason for hiding this comment

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

regarding the Copy, yes, i think this is the way.

@@ -46,16 +45,19 @@ void MonitorObjectCollection::merge(mergers::MergeInterface* const other)
if (!otherMO || !targetMO) {
throw std::runtime_error("The target object or the other object could not be casted to MonitorObject.");
}
if (!reportedMismatchingRunNumbers && targetMO->getActivity().mId != otherMO->getActivity().mId) {

if (otherMO->getActivity().mId > targetMO->getActivity().mId) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

yes, but we should still produce a warning and ignore an input object if it's run number is lower, and as before, avoid flooding the IL for the rest of otherCollection. In this version of the code, you would simply merge such input anyway.

<< targetMO->GetName() << "' (" << targetMO->getActivity().mId
<< "). Trying to continue, but THIS SHOULD BE IMMEDIATELY ADDRESSED IN PRODUCTION. "
<< "QC objects from other setups are reaching this one. Will not report more mismatches in this collection."
<< "). I am switching these objects, but THIS SHOULD BE IMMEDIATELY ADDRESSED IN PRODUCTION. "
Copy link
Collaborator

Choose a reason for hiding this comment

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

"I am switching these objects" is not clear to me, how about "Replacing the merged object with input"?

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.

2 participants