Skip to content

feat: force-conflicts in pc-application install#473

Open
liamhess wants to merge 2 commits into
mainfrom
liam/pc-apps-force-conflicts
Open

feat: force-conflicts in pc-application install#473
liamhess wants to merge 2 commits into
mainfrom
liam/pc-apps-force-conflicts

Conversation

@liamhess

Copy link
Copy Markdown
Member

We had mutliple failed master deploys with the pc-application install conflicting on SSA managed fields.

Since the oms installer should have higher authority than the argo app controller it should be able to force field ownership to itself in the install step.

So we expose a force-conflicts option that alreay exists in the helm client to be used in the oms cli.

@liamhess liamhess self-assigned this Jun 11, 2026
@liamhess liamhess requested a review from schrodit June 11, 2026 09:12
Signed-off-by: liamhess <me@liamhess.de>
@liamhess liamhess force-pushed the liam/pc-apps-force-conflicts branch from 0074f2f to 04d3520 Compare June 11, 2026 09:13
Signed-off-by: liamhess <49128538+liamhess@users.noreply.github.com>
@liamhess liamhess requested review from OliverTrautvetter and removed request for schrodit June 11, 2026 09:39

@OliverTrautvetter OliverTrautvetter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good in general, some small comments 👍

})
})

Context("ForceConflicts", func() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ForceConflicts test only covers the fresh install path -> fake client has no existing Helm release -> UpgradeChart with InstallIfNotExist: true falls through to InstallChart

So please add a second It block that seeds a fake release

Expect(err).ToNot(HaveOccurred())
})

It("returns an error when UpgradeChart fails", func() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It uses mock.Anything for all UpgradeChart parameters.

If ForceConflicts changes from false to true the test would still pass silently

Comment thread cli/cmd/pc_apps.go
Registry credentials and chart URL are read automatically from the
Kubernetes secret "argocd-codesphere-oci-read" in the argocd namespace.
This secret is created by "oms beta install argocd --deploy-dc-config".`),
Example: formatExamples("beta install pc-apps", []packageio.Example{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should add some example for the new flag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants