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

feat: Isolate job output in cli #528

Merged
merged 6 commits into from
Mar 5, 2025

Conversation

hollygrimm
Copy link
Contributor

Summary

This pull request makes the following changes:

  • Add JobOfferSubscription struct to support optional job ID filtering
  • Modify SubscribeToJobOfferUpdates to return an unsubscribe function
  • Introduce new SubscribeToJobOfferUpdatesWithFilter method
  • Update job offer update mechanism to respect job ID filters
  • Refactor JobCreator to use an interface for better extensibility

By isolating job output, tools like the Discord Observer can run jobs in parallel and get the appropriate job output.

Task/Issue reference

Closes: 404

Test plan

  1. Start the stack. Run the integration tests: ./stack integration-tests

  2. Run a job and compare the logs in the cli with the logs in this pull request.

…upport

- Add JobOfferSubscription struct to support optional job ID filtering
- Modify SubscribeToJobOfferUpdates to return an unsubscribe function
- Introduce new SubscribeToJobOfferUpdatesWithFilter method
- Update job offer update mechanism to respect job ID filters
- Refactor JobCreator to use an interface for better extensibility
- Modify job offer update subscription to use filtered subscription
- Add support for optional event subscriber
- Enhance logging with job container ID
- Print data ID immediately upon job result
…calling AddJobOffer, improving the reliability of job tracking.
@hollygrimm hollygrimm requested a review from a team as a code owner March 5, 2025 17:25
@cla-bot cla-bot bot added the cla-signed label Mar 5, 2025
@hollygrimm hollygrimm changed the title Feat: Isolate job output in cli feat: Isolate job output in cli Mar 5, 2025
Copy link
Contributor

@bgins bgins left a comment

Choose a reason for hiding this comment

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

Looks good! Left a couple comments with some suggested changes.

@hollygrimm
Copy link
Contributor Author

@bgins yes, since there is only ever one subscription per job id, it makes sense that we remove the nextSubID counter. thanks for your review

@hollygrimm hollygrimm merged commit 56b2789 into main Mar 5, 2025
5 checks passed
@hollygrimm hollygrimm deleted the hollygrimm/feat-isolate-job-output-in-cli branch March 5, 2025 21:26
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.

2 participants