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

removes nextRuns in the past when job skipped by locker #828 #829

Merged
merged 2 commits into from
Feb 17, 2025

Conversation

manuelarte
Copy link
Contributor

What does this do?

It proposes a possible solution for the bug described in #828

Which issue(s) does this PR fix/relate to?

Resolves #828

List any changes that modify/break current functionality

no breaking of current functionality

Have you included tests for your changes?

Will include them after we agree on the solution

Did you document any new/modified functionality?

  • Updated example_test.go
  • Updated README.md

Notes

@manuelarte manuelarte marked this pull request as draft February 13, 2025 18:56
@manuelarte
Copy link
Contributor Author

manuelarte commented Feb 13, 2025

Some somments:

I added a new channel to "update" the nextScheduled array. In the current draft I decided to create a new channel and a new method to handle this update of the nextScheduled, but there are other places where the nextScheduled array is updated and I am not reusing code.

I decided to create a new channel, but maybe it makes sense to modify the method selectExecJobsOutForRescheduling and also "remove" the old entries in nextScheduled.

Or any other solution that I don't see right now.

What do you guys think?

@JohnRoesler JohnRoesler changed the title Possible solution for #828 removes nextRuns in the past when job skipped by locker #828 Feb 17, 2025
@JohnRoesler JohnRoesler marked this pull request as ready for review February 17, 2025 21:42
@JohnRoesler
Copy link
Contributor

hey @manuelarte

I considered a few options, and without changing any other behavior, this seems like a reasonable route to go. Thanks for digging in and putting forth a fix.

@JohnRoesler JohnRoesler merged commit 2769f09 into go-co-op:v2 Feb 17, 2025
4 checks passed
@manuelarte manuelarte deleted the fix-next-run-locker branch February 17, 2025 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] - NextRun() method returning a value in the past when using a locker.
2 participants