open-component-model / ocm

Open Component Model (Software Bill of Delivery Toolset)
https://ocm.software
Apache License 2.0
31 stars 19 forks source link

feat: add silent flag and fix dry run with prerequisites #767

Closed Skarlso closed 2 months ago

Skarlso commented 2 months ago

Description

Closes https://github.com/open-component-model/ocm-project/issues/37

What type of PR is this? (check all applicable)

Related Tickets & Documents

Screenshots

Added tests?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Added to documentation?

Checklist:

github-actions[bot] commented 2 months ago

Mend Scan Summary: :x:

Repository: open-component-model/ocm

VIOLATION DESCRIPTION NUMBER OF VIOLATIONS
HIGH/CRITICAL SECURITY VULNERABILITIES 1
MAJOR UPDATES AVAILABLE 0
LICENSE REQUIRES REVIEW 4
HIGH RISK LICENSES 9
RESTRICTIED LICENSE FOR ON-PREMISE DELIVERY 0

Detailed Logs: mend-scan-> Generate Report Mend UI

ocmbot[bot] commented 2 months ago

Integration Tests for 8a4d9192ede06a32c789d813e6100942c70144ea run with result: Success ✅!

Skarlso commented 2 months ago
./bin/ocm controller uninstall -p
β–Ί uninstalling ocm-controller with version latest
β–Ί got latest version "v0.21.1"
βœ” successfully fetched install file
β–Ί applying to cluster...
β–Ί waiting for ocm deployment to be deleted
βœ” ocm-controller successfully uninstalled
β–Ί uninstalling cert-manager and issuers
β–Ί uninstalling cert-manager with version v1.13.2
β–Ί remove certificate for internal registry
Error: βœ— failed to uninstall pre-requesits: βœ— failed to create registry certificate: failed to delete manifests: delete failed, errors: ClusterIssuer/ocm-issuer query failed: no matches for kind "ClusterIssuer" in version "cert-manager.io/v1";Certificate/ocm-system/ocm-registry-certificate query failed: no matches for kind "Certificate" in version "cert-manager.io/v1";

➜  ocm git:(add-moar-flags) ./bin/ocm controller uninstall --silent -p
β–Ί uninstalling ocm-controller with version latest
β–Ί got latest version "v0.21.1"
βœ” successfully fetched install file
β–Ί applying to cluster...
β–Ί waiting for ocm deployment to be deleted
βœ” ocm-controller successfully uninstalled
β–Ί uninstalling cert-manager and issuers
β–Ί uninstalling cert-manager with version v1.13.2
β–Ί remove certificate for internal registry
hilmarf commented 2 months ago

@robertwol - what did you have in mind for the --silent flag? What should happen? https://github.com/open-component-model/ocm-project/issues/37

Skarlso commented 2 months ago

Robert said this:

Screenshot 2024-05-07 at 16 59 02

In my opinion silent usually suppresses logs but Robert specifically said exit status so... :) That's what I did. :D

Skarlso commented 2 months ago

Oh, and -o yaml is already done by dry run which just outputs the manifests it would have applied.

ocmbot[bot] commented 2 months ago

Integration Tests for b44a4890a2cbd6c706fbd9b08a158ac6cb175c61 run with result: Success ✅!