chore: osv-worker deployment#4175
Open
joanagmaia wants to merge 1 commit into
Open
Conversation
Signed-off-by: Joana Maia <jmaia@contractor.linuxfoundation.org>
Contributor
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a dedicated Temporal worker service (osv-worker) for OSV advisory sync within the packages_worker app, moving OSV scheduled workflow executions off the shared packages-worker queue.
Changes:
- Route the OSV sync schedule to the
osv-workerTemporal task queue. - Add a new
osv-workerentrypoint plusstart/devscripts to run it. - Add Docker Compose service definitions and include
osv-workerin the packages build service list.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| services/apps/packages_worker/src/osv/schedule.ts | Updates the OSV schedule’s taskQueue to osv-worker. |
| services/apps/packages_worker/src/bin/osv-worker.ts | Adds a dedicated worker entrypoint that initializes the service, registers the OSV schedule, then starts the worker. |
| services/apps/packages_worker/package.json | Adds start:osv-worker, dev:osv-worker, and dev:osv-worker:local scripts. |
| scripts/services/osv-worker.yaml | Adds compose definitions for osv-worker and osv-worker-dev. |
| scripts/builders/packages.env | Adds osv-worker to the packages services build list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
58
to
62
| action: { | ||
| type: 'startWorkflow', | ||
| workflowType: osvSync, | ||
| taskQueue: 'packages-worker', | ||
| taskQueue: 'osv-worker', | ||
| // Headroom for npm (~1 hour today) + Maven (~5 minutes) + derive |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for a new
osv-workerservice in the packages infrastructure. The main changes include adding Docker and service configuration for the new worker, updating build scripts, and integrating new start and development scripts. Additionally, the OSV sync workflow is updated to use its dedicated task queue.New osv-worker service integration:
osv-worker.yaml) to define theosv-workerandosv-worker-devservices, including environment variables, build context, and volume mounts for development.packages.envto includeosv-workerfor Docker builds.Script and workflow updates:
package.jsonfor starting and developing theosv-worker, including local development variants. [1] [2]taskQueueinscheduleOsvSyncfrompackages-workertoosv-workerto route OSV sync jobs to the new worker.Note
Medium Risk
Routing the OSV schedule to
osv-workerrequires that worker to be running in each environment; otherwise scheduled sync workflows will not execute until deployment catches up.Overview
Splits OSV advisory sync onto its own Temporal worker so it no longer shares the
packages-workerqueue.Adds
osv-workerto the packages Docker build list, a Compose file for prod (osv-worker) and dev (osv-worker-dev) with theosv-workertask queue, andstart/dev/dev:localnpm scripts plussrc/bin/osv-worker.tsthat initializes the service, registers the OSV schedule, then starts the worker.scheduleOsvSyncnow startsosvSyncon task queueosv-workerinstead ofpackages-worker.Reviewed by Cursor Bugbot for commit f580bd7. Bugbot is set up for automated code reviews on this repo. Configure here.