-
Notifications
You must be signed in to change notification settings - Fork 9
fix 模块 pod 替换导致 JVM 进程内模块实例消失 #18
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
Conversation
WalkthroughAdds BizModelVersion support across deploy and undeploy: new CLI flags, propagation through parsing and payload construction, and inclusion in Ark BizModel JSON for install/uninstall (including K8s pod operations). Updates help/examples accordingly. Also bumps the exported Version constant from 0.2.3 to 0.2.5. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User (CLI)
participant DC as DeployCmd
participant UC as UndeployCmd
participant Ark as Ark Service (Local/K8s Pod)
rect rgba(230,240,255,0.5)
note over U,DC: Deploy flow with optional BizModelVersion
U->>DC: deploy --biz-model-version V?
DC->>DC: parse BizModel
alt flag provided
DC->>DC: override BizModel.BizModelVersion = V
end
DC->>Ark: uninstallBiz {bizModelVersion}
Ark-->>DC: uninstall result
DC->>Ark: installBiz {bizModelVersion}
Ark-->>DC: install result
end
rect rgba(240,230,255,0.5)
note over U,UC: Undeploy flow with BizModelVersion
U->>UC: undeploy --biz-model-version V?
UC->>Ark: uninstallBiz {bizModelVersion: V}
Ark-->>UC: uninstall result
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 0
🧹 Nitpick comments (4)
v1/cmd/undeploy/undeploy.go (1)
135-136: Polish help text for clarity.Minor grammar improvement.
- UnDeployCmd.Flags().StringVar(&bizModelVersionFlag, "biz-model-version", "", "the biz model version of ark container") + UnDeployCmd.Flags().StringVar(&bizModelVersionFlag, "biz-model-version", "", "biz model version used to identify the biz model in the ark container")v1/cmd/deploy/deploy.go (3)
85-87: Fix typos in Scenario 4 example.“witch” → “which”; capitalize Kubernetes; small phrasing tweak.
-Scenario 4: Build and deploy a bundle at current dir to a remote running ark container in k8s cluster with biz model version witch is pod key from kubernetes: - arkctl deploy --pod ${namespace}/${name} --biz-model-version ${your-biz-model-version} +Scenario 4: Build and deploy a bundle at the current dir to a remote ark container in a K8s cluster with a biz model version (a pod key from Kubernetes): + arkctl deploy --pod ${namespace}/${name} --biz-model-version ${your-biz-model-version}
88-89: Grammar: “an maven” → “a Maven”; hyphenate multi‑module.-Scenario 5: Build an maven multi module project and deploy a sub module to a running ark container: +Scenario 5: Build a Maven multi‑module project and deploy a sub‑module to a running ark container:
469-472: Tighten flag help text.Minor clarity/tense tweak.
-DeployCommand.Flags().StringVar(&bizModelVersionFlag, "biz-model-version", "", ` -If provided, arkctl will use this biz model version to deploy the biz module. -`) +DeployCommand.Flags().StringVar(&bizModelVersionFlag, "biz-model-version", "", ` +If provided, arkctl uses this biz model version during uninstall/install operations. +`)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
v1/cmd/deploy/deploy.go(6 hunks)v1/cmd/undeploy/undeploy.go(3 hunks)v1/constant/constant.go(1 hunks)v1/service/ark/types.go(1 hunks)
🔇 Additional comments (8)
v1/service/ark/types.go (1)
111-112: Add BizModelVersion to BizModel — LGTM; confirm server honors it.Field/tag placement is fine and omitempty avoids noise. Please confirm Ark-side endpoints accept and use
bizModelVersion.If Ark server is in another repo, add a quick integration note or link in the PR description for traceability.
v1/cmd/undeploy/undeploy.go (2)
35-36: New flag wire-up — LGTM.Flag variable introduction is straightforward and scoped correctly.
80-83: Propagate BizModelVersion in UnInstall payload — LGTM.This keeps undeploy behavior consistent with deploy.
v1/cmd/deploy/deploy.go (4)
44-45: Flag added — LGTM.Consistent naming with undeploy.
191-193: Override BizModelVersion from flag — LGTM.Keeps CLI authoritative; safe with
omitempty.
260-265: Include BizModelVersion in uninstall (K8s) payload — LGTM.Matches server contract implied by types.
309-315: Include BizModelVersion in install (K8s) payload — LGTM.Consistent with uninstall path.
v1/constant/constant.go (1)
21-21: Version bump to 0.2.5 — repo search clean; confirm release artifactsv1/constant/constant.go:21 contains Version = "0.2.5"; no other pinned version literals or '0.2.3' occurrences found in repository. Approve changes; manually verify docs, release tags/changelog, and packaging/published artifacts reflect 0.2.5.
Derrickers
left a comment
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.
LGTM
koupleless/koupleless#405
Summary by CodeRabbit