You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5963f46
Browse filesBrowse the repository at this point in the historyBrowse files
fix(marketplace): address review of tap auto-register
- Do not auto-install a privileged variant on connect (no confirmation exists
there); leave it unregistered and surface a Warning Event.
- Auto-register only the default variant, with an empty Package.Spec.Variant, so
the install target is deterministic instead of the first-listed variant.
- Delete the tap-managed registration Package when its PackageSource is pruned or
its tap is torn down, so a removed package leaves the catalog.
- Key Package ownership on the label AND the tap-source annotation
(collision.Owns), so a name a later tap reuses is not adopted or deleted by an
earlier one; verify an already-existing Package is ours before treating the
registration as done.
- Correct the cozypkg tap help (apps register on connect) and log a failed
de-register at a visible level.
- Tests: privileged skip, untap teardown (extracted runUntap), add idempotency,
Package dry-run propagation, and ownership on both delete paths.
Signed-off-by: IvanHunters <[email protected]>
returnfmt.Errorf("package %s is still installed from this source; delete it with 'cozypkg del %s' first, or pass --yes to untap anyway (the Package stays installed)", name, name)
376
-
}
377
-
}
369
+
srcName:=""
370
+
ifps.Spec.SourceRef!=nil {
371
+
srcName=ps.Spec.SourceRef.Name
372
+
}
378
373
379
-
srcName:=""
380
-
ifps.Spec.SourceRef!=nil {
381
-
srcName=ps.Spec.SourceRef.Name
374
+
// The registration Package (auto-created on connect, tap-managed)
375
+
// de-registers the repository's apps and is removed with the untap. Deleting
376
+
// it garbage-collects its registration HelmReleases and the
377
+
// ApplicationDefinitions they render. It is removed only when it belongs to
378
+
// THIS source (label AND source annotation); a Package a later tap created
379
+
// under a reused name, or a foreign Package, is left in place and blocks the
returnfmt.Errorf("package %s is still installed from this source; delete it with 'cozypkg del %s' first, or pass --yes to untap anyway (the Package stays installed)", name, name)
382
390
}
391
+
}
383
392
384
-
iferr:=k8sClient.Delete(ctx, ps); err!=nil {
385
-
returnfmt.Errorf("failed to delete PackageSource %s: %w", name, err)
0 commit comments