fix: Docker default non-interactive mode for Cloud instances #796
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.
Relates to:
No linked issue.
Risks
Risk Level: Low
Adding a new flag
non-interactive
that defaults to skippingchat()
should not affect existing functionality unless explicitly enabled. The main risk is around unintended bypass of user input under edge cases.Background
What does this PR do?
This PR adds a
non-interactive
flag to prevent running thechat()
function and avoid waiting for user input. This is particularly useful for environments such as Cloud platforms where interactive sessions are not feasible and can cause the application to hang.Additionally, the
non-interactive
flag is added to theCMD
in the Dockerfile as the default.What kind of change is this?
Features (non-breaking change which adds functionality)
Why are we doing this? Any context or related work?
Running the application in a non-interactive environment such as Cloud platforms caused the process to hang due to waiting for terminal input. Adding this flag makes the application more robust for deployment in such scenarios.
Documentation changes needed?
My changes do not require a change to the project documentation.
Testing
Where should a reviewer start?
Dockerfile
for the updatedCMD
with thenon-interactive
flag./agent/src/index.ts
where thenon-interactive
flag is implemented and its logic for skippingchat()
.Detailed testing steps
non-interactive
flag and verify thatchat()
runs as expected.non-interactive
flag and confirm it bypasseschat()
and does not wait for user input.non-interactive
flag is applied by default and prevents hanging in Cloud environments.Deploy Notes
No special deployment steps are required. Ensure the updated Docker image is pushed to the appropriate registry.
Database changes
None.
Deployment instructions
Build and deploy the updated Docker image as usual.
Let me know if anything else needs tweaking! 😊