Skip to content

update only running AWs #562

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

Merged
merged 4 commits into from
Aug 11, 2023

Conversation

asm582
Copy link
Member

@asm582 asm582 commented Aug 10, 2023

Issue link

#561

What changes have been made

Verification steps

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • Testing is not required for this change

@asm582 asm582 marked this pull request as ready for review August 10, 2023 15:46
@asm582
Copy link
Member Author

asm582 commented Aug 10, 2023

all test cases pass locally
refact_uqj.log

Copy link
Collaborator

@metalcycling metalcycling left a comment

Choose a reason for hiding this comment

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

I'm confused about what we are trying to do here. Some things I notice:

  • In line 1467 we check if the newjob exists in the eventQueue, if it does then we continue. If it doesn't exist, then we will eventually get to line 1476 and delete it from the eventQueue, even though it doesn't exists there.
  • Line 1478 adds newjob back in the event queue

So ok. If the job exists in the event queue or job queue then nothing happens, if it doesn't then it deletes it (maybe) and adds it to the event queue. I'm not sure what this is supposed to accomplish. In the previous version there were some changes to the newjob object, but this one doesn't. I just want to make sure I understand the logic of this function.

@asm582
Copy link
Member Author

asm582 commented Aug 10, 2023

I'm confused about what we are trying to do here. Some things I notice:

  • In line 1467 we check if the newjob exists in the eventQueue, if it does then we continue. If it doesn't exist, then we will eventually get to line 1476 and delete it from the eventQueue, even though it doesn't exists there.
  • Line 1478 adds newjob back in the event queue

So ok. If the job exists in the event queue or job queue then nothing happens, if it doesn't then it deletes it (maybe) and adds it to the event queue. I'm not sure what this is supposed to accomplish. In the previous version there were some changes to the newjob object, but this one doesn't. I just want to make sure I understand the logic of this function.

Thanks for the review @metalcycling , Multiple threads compete to add objects to the event queue, we want to make sure updatequeuejob thread adds the latest object from etcd into the event queue, I agree this is a best-effort solution.

@z103cb
Copy link
Contributor

z103cb commented Aug 11, 2023

There's a small nitpick with a log message that needs to be addressed and that prevents me from approving this PR.

I think changes from this PR are long overdue.

If this the nitpick is addressed and there are no other objections I will approve this on Monday.

/LGTM

@openshift-ci openshift-ci bot removed the lgtm label Aug 11, 2023
Copy link
Collaborator

@metalcycling metalcycling left a comment

Choose a reason for hiding this comment

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

LGTM

@openshift-ci
Copy link

openshift-ci bot commented Aug 11, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: metalcycling

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit c3bd25c into project-codeflare:main Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants