Skip to content
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

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

Merged
merged 2 commits into from
May 8, 2024

Conversation

Skarlso
Copy link
Contributor

@Skarlso Skarlso commented May 7, 2024

Description

Closes open-component-model/ocm-project#37

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

  • πŸ• Feature
  • πŸŽ‡ Restructuring
  • πŸ› Bug Fix
  • πŸ“ Documentation Update
  • 🎨 Style
  • πŸ§‘β€πŸ’» Code Refactor
  • πŸ”₯ Performance Improvements
  • βœ… Test
  • πŸ€– Build
  • πŸ” CI
  • πŸ“¦ Chore (Release)
  • ⏩ Revert

Related Tickets & Documents

  • Related Issue # (issue)
  • Closes # (issue)
  • Fixes # (issue)

Remove if not applicable

Screenshots

Added tests?

  • πŸ‘ yes
  • πŸ™… no, because they aren't needed
  • πŸ™‹ no, because I need help
  • Separate ticket for tests # (issue/pr)

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?

  • πŸ“œ README.md
  • πŸ™… no documentation needed

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@github-actions github-actions bot added the size/s Small label May 7, 2024
Copy link
Contributor

github-actions bot commented May 7, 2024

Mend Scan Summary: ❌

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

Copy link
Contributor

ocmbot bot commented May 7, 2024

Integration Tests for 8a4d919 run with result: Success βœ…!

@Skarlso Skarlso requested a review from hilmarf May 7, 2024 14:41
@Skarlso
Copy link
Contributor Author

Skarlso commented May 7, 2024

./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
Copy link
Member

hilmarf commented May 7, 2024

@robertwol - what did you have in mind for the --silent flag? What should happen?
open-component-model/ocm-project#37

@Skarlso
Copy link
Contributor Author

Skarlso commented May 7, 2024

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
Copy link
Contributor Author

Skarlso commented May 7, 2024

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

@hilmarf hilmarf enabled auto-merge (squash) May 8, 2024 13:14
@hilmarf hilmarf added this to the 2024-Q2 milestone May 8, 2024
Copy link
Contributor

ocmbot bot commented May 8, 2024

Integration Tests for b44a489 run with result: Success βœ…!

@hilmarf hilmarf merged commit 850b785 into main May 8, 2024
15 checks passed
@hilmarf hilmarf deleted the add-moar-flags branch May 8, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/s Small
Projects
Status: πŸ”’Closed
Development

Successfully merging this pull request may close these issues.

Add option and flags to OCM CLI: uninstall, --silent, -o YAML
2 participants