Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: exclude canceled job offers #363

Merged
merged 2 commits into from
Sep 17, 2024
Merged

Conversation

walkah
Copy link
Collaborator

@walkah walkah commented Sep 16, 2024

Summary

This PR adds a GetJobOffer query filter to exclude cancelled jobs by default (can be overridden with query.IncludeCancelled.

Task/Issue reference

Closes: https://github.com/Lilypad-Tech/internal/issues/297

Test plan

  • Using main, run a targetted job against a non-existent address. Then run another job (you should see a bunch of "Job cancelled" errors).
  • Do the same thing again with this PR - should be resolved.

@walkah walkah requested a review from a team as a code owner September 16, 2024 15:57
@cla-bot cla-bot bot added the cla-signed label Sep 16, 2024
@github-actions github-actions bot added the fix label Sep 16, 2024
Copy link
Collaborator

@narbs91 narbs91 left a comment

Choose a reason for hiding this comment

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

Tested and LGTM! Plus is spits out an error message too, small nit pick would be to add some context to the error message (i.e why was it cancelled) but functionally this change seems to work. Did you also test with running the onchain job execution?

image

@narbs91
Copy link
Collaborator

narbs91 commented Sep 16, 2024

Also seeing this WRN popup now after a successful and unsuccessful job:

2024-09-16T10:22:59-07:00 WRN pkg/system/context.go:66 > CleanupManager: Cleanup called again after already called

@walkah
Copy link
Collaborator Author

walkah commented Sep 16, 2024

2024-09-16T10:22:59-07:00 WRN pkg/system/context.go:66 > CleanupManager: Cleanup called again after already called

yep, unrelated https://github.com/Lilypad-Tech/internal/issues/296

@walkah
Copy link
Collaborator Author

walkah commented Sep 16, 2024

Did you also test with running the onchain job execution?

on chain jobs don't currently have a mechanism for targetting (i believe that would require a smart contract update)

@narbs91 narbs91 merged commit 8b2784f into main Sep 17, 2024
4 checks passed
@narbs91 narbs91 deleted the walkah/fix-cancelled-job-offers branch September 17, 2024 18:24
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants