Skip to content

Conversation

@hehoon
Copy link
Collaborator

@hehoon hehoon commented Dec 11, 2025

I have JIRA issue created

  • branch and/or PR name(s) includes JIRA ID
  • issue has "Fix version" assigned
  • issue "Status" is set to "In review"
  • PR labels are selected
  • FLP integration tests were ran successful
  • The method retrieveRunStatus is renamed to retrieveRunInformation
  • The method now returns an object with established run information:
    • runStatus: this is the field created right now by QCG and should be kept to ensure front-end compatibility
    • time at which the run has started - startTime
    • time at which the run has run ended - endTime
    • the run belongs to a partition also known as environment: environmentId
    • the run also is defined by multiple properties. Depending on which oneas are used the run has a definition: definition
    • the run has a quality that decides if it should be stored or not for long time: runQuality
    • run normally runs only during an LHC beam mode: lhcBeamMode
    • A run has multiple detectors taking data, thus we should also get the list of detectors and qualityies: detectorQualities
  • All methods making use of this have been updated accordingly:
    • Methods in FilterService
    • Methods in FilterController

@hehoon
Copy link
Collaborator Author

hehoon commented Dec 12, 2025

The failing test is resolved in: #3230

@hehoon hehoon marked this pull request as ready for review December 12, 2025 10:55
@hehoon hehoon requested a review from graduta as a code owner December 12, 2025 10:55
@hehoon hehoon changed the title [OGUI-1840] Refactor the response object of retrieveRunStatus [OGUI-1840 & OGUI-1841] Refactor the response object of retrieveRunStatus Dec 12, 2025
@hehoon hehoon requested a review from graduta December 12, 2025 21:31
Copy link
Member

@graduta graduta left a comment

Choose a reason for hiding this comment

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

Nice progress! I added some comments for you to review

Copy link
Member

Choose a reason for hiding this comment

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

Given that Bookkeeping service is now returning more information, your tests should also be testing that.
Try to update the mock responses with fields that are not to be used so that you test here that your method only keeps fields that are intended

* - RunStatus.ONGOING if the run is ongoing
* - RunStatus.ENDED if the run has completed (has timeO2End)
* - RunStatus.NOT_FOUND if there was an error or data is not available
* @returns {Promise<object>} - Returns a promise that resolves to the run information:
Copy link
Member

Choose a reason for hiding this comment

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

This return doc would go well in a typedef file

definition,
runQuality,
lhcBeamMode,
detectorQualities,
Copy link
Member

Choose a reason for hiding this comment

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

As detectorQualities will probably be used with a map function to map to components, I think it would be good to add a default of [] in case bookkeeping fails to return you an expected value

@hehoon hehoon marked this pull request as draft December 16, 2025 12:52
@hehoon hehoon marked this pull request as ready for review December 16, 2025 20:09
@hehoon hehoon requested a review from graduta December 16, 2025 20:09
@graduta graduta merged commit 1da5d94 into dev Dec 17, 2025
10 checks passed
@graduta graduta deleted the feature/QCG/OGUI-1840/Refactor-the-response-object-of-retrieveRunStatus branch December 17, 2025 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants