Replace odo deploy/undeploy commands with native TypeScript implement…#5944
Draft
vrubezhny wants to merge 1 commit into
Draft
Replace odo deploy/undeploy commands with native TypeScript implement…#5944vrubezhny wants to merge 1 commit into
vrubezhny wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5944 +/- ##
===========================================
+ Coverage 32.37% 49.10% +16.73%
===========================================
Files 85 113 +28
Lines 6505 10269 +3764
Branches 1349 2296 +947
===========================================
+ Hits 2106 5043 +2937
- Misses 4399 5223 +824
- Partials 0 3 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ation This change removes the dependency on the external odo binary for deploy and undeploy operations by implementing them natively in TypeScript. New files: - src/devfile/applyCommand.ts - Executes apply commands from devfiles, loads Kubernetes manifests from inlined YAML or URIs, and applies them to the cluster using oc apply - src/devfile/deploy.ts - Main deployment orchestration that resolves devfiles, finds deploy commands, executes them, and tracks deployed resources in .odo/deploystate.json - src/devfile/undeploy.ts - Resource cleanup using deploystate.json tracking or label-based fallback for orphaned resources Modified files: - src/odo/componentTypeDescription.ts - Added DeployedResource and DeployState types, extended Kubernetes interface with inlined/uri - src/devfile/variableResolver.ts - Added resolveApply() and resolveKubernetesContent() methods - src/devfile/devfileCommandRunner.ts - Added apply command handling - src/openshift/component.ts - Replaced deploy/undeploy implementations, added DEP_STARTING and DEP_STOPPING states - src/odo/command.ts - Removed deploy() and undeploy() methods - src/util/childProcessUtil.ts - Renamed OdoChannel to OpenshiftChannel - src/odo/odoWrapper.ts - Updated to use OpenshiftChannel Added unit tests for variable resolution, deploy/undeploy command logic, and YAML resource parsing. Key features: - Idempotent operations (oc apply) - safe to retry on failure - State tracking via .odo/deploystate.json for undeploy - Label-based cleanup fallback for orphaned resources - Proper state management (DEP -> DEP_STARTING -> DEP_RUNNING) - Variable resolution in URIs and manifest content - HTTP URI support for remote manifests Follows the same pattern as PR redhat-developer#5843 (odo run replacement) Issue: https://redhat.atlassian.net/browse/CRW-10962 Issue: redhat-developer#4482 Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com> Assisted-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1db251e to
8a0ba34
Compare
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.
…ation
This change removes the dependency on the external odo binary for deploy and undeploy operations by implementing them natively in TypeScript.
New files:
Modified files:
Added unit tests for variable resolution, deploy/undeploy command logic, and YAML resource parsing.
Key features:
Follows the same pattern as PR #5843 (odo run replacement)
Issue: https://redhat.atlassian.net/browse/CRW-10962
Issue: #4482
Assisted-By: Claude Sonnet 4.5 noreply@anthropic.com