-
Notifications
You must be signed in to change notification settings - Fork 242
FOUR-28426: Add custom executor in microservices feature #8651
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
base: develop
Are you sure you want to change the base?
Conversation
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on December 21. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
Fix declare http client Refactor how to get instance uuid Remove instance uuid variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| config('script-runner-microservice.base_url') . '/custom/' . $this->getInstanceUuid() . '/scripts'; | ||
|
|
||
| if (!$custom && Cache::has('script-runner-microservice.script-runner')) { | ||
| return Cache::get('script-runner-microservice.script-runner.' . $language); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cache key mismatch causes cache to never hit
The cache key used in Cache::has() on line 111 is 'script-runner-microservice.script-runner' (without language suffix), but the key used in Cache::get() on line 112 and Cache::put() on line 127 includes the language suffix ('script-runner-microservice.script-runner.' . $language). This mismatch means the has check will never find the cached value, causing every call to getScriptRunner() for non-custom scripts to make an unnecessary HTTP request to the microservice instead of using the cached result.
Additional Locations (1)
| ScriptExecutorDeleted::dispatch($scriptExecutor->getAttributes()); | ||
| } else { | ||
| $service->deleteCustomExecutor($scriptExecutorUUID); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete order causes inconsistency if microservice call fails
The delete method destroys the local database record on line 266 before attempting to delete from the microservice on line 271. If deleteCustomExecutor() throws an exception (e.g., network error, microservice unavailable), the local record is already permanently deleted while the remote executor still exists. This creates a data inconsistency where the microservice has orphaned executors that can't be managed. The microservice deletion needs to happen before or atomically with the local database deletion.
|





Issue & Reproduction Steps
Describe the issue this ticket solves and describe how to reproduce the issue (please attach any fixtures used to reproduce the issue).
Solution
How to Test
Describe how to test that this solution works.
Related Tickets & Packages
Code Review Checklist
Note
Introduces a microservice-based path for custom script executors, gated by
config('script-runner-microservice.enabled').ScriptMicroserviceServicehandles Keycloak auth (cached), tenant ensure, executor CRUD (createCustomExecutor,updateCustomExecutor,deleteCustomExecutor), runner discovery, request dispatch, andinstance_uuidgeneration.store/update/deletenow conditionally call the service for microservice mode; fallback to existing events/jobs in non-microservice mode. Delete uses executor UUID for remote cleanup.ScriptMicroserviceRunnernow delegates token/requests to the service, resolves runner (built-in vs custom), and enriches metadata (executor_uuid,executor_type,instance_uuid).ScriptRunnerroutes to microservice runner when enabled.script_microservice_enabledandscript_microservice_instance_uuidto Vue. Vue listens to Echo channelbuild-image-{instance_uuid}for build logs/events when microservice is enabled; retains legacy user channel otherwise.Written by Cursor Bugbot for commit dc801e3. This will update automatically on new commits. Configure here.