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 Conditions to Projects #2401

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

hiddeco
Copy link
Contributor

@hiddeco hiddeco commented Aug 7, 2024

Continues on #2239

This PR implements status conditions for Project resources, replacing the existing Phase and Message fields with a more structured and granular approach to reporting a Project's state.

A new Stalled condition indicates when a resource reconciliation has halted due to an issue requiring manual intervention.

It also updates the CLI to display Project status using conditions instead of Phase. The kargo get projects command now shows a "Ready" column instead of "Phase", and includes a "Status" column with the condition message.


Condition logic

  • When initializing a Project:
    • Set Reconciling to True with Reason Initializing
    • Set Ready to False with Reason Initializing
  • When namespace initialization fails:
    • Set Stalled to True with Reason ExistingNamespaceMissingLabel
    • Set Ready to False with Reason NamespaceInitializationFailed
  • When permissions initialization fails:
    • Set Ready to False with Reason PermissionsInitializationFailed
  • When default roles initialization fails:
    • Set Ready to False with Reason RolesInitializationFailed
  • After successful initialization:
    • Remove the Reconciling condition
    • Set Ready to True with Reason Initialized

Copy link

netlify bot commented Aug 7, 2024

Deploy Preview for docs-kargo-akuity-io ready!

Name Link
🔨 Latest commit 152c4fe
🔍 Latest deploy log https://app.netlify.com/sites/docs-kargo-akuity-io/deploys/66b352ec60bc8f0008747944
😎 Deploy Preview https://deploy-preview-2401.kargo.akuity.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@hiddeco hiddeco changed the title feat: add Conditions to Projects feat: add Conditions to Projects Aug 7, 2024
Copy link

codecov bot commented Aug 7, 2024

Codecov Report

Attention: Patch coverage is 85.93750% with 18 lines in your changes missing coverage. Please review.

Project coverage is 48.70%. Comparing base (06f6ad8) to head (152c4fe).
Report is 1 commits behind head on main.

Files Patch % Lines
internal/cli/cmd/get/projects.go 0.00% 8 Missing ⚠️
...nternal/controller/management/projects/projects.go 94.82% 4 Missing and 2 partials ⚠️
api/v1alpha1/project_types.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2401      +/-   ##
==========================================
+ Coverage   48.43%   48.70%   +0.26%     
==========================================
  Files         245      245              
  Lines       17697    17809     +112     
==========================================
+ Hits         8572     8673     +101     
- Misses       8709     8719      +10     
- Partials      416      417       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@krancour krancour changed the title feat: add Conditions to Projects feat!: add Conditions to Projects Aug 15, 2024
@krancour krancour modified the milestones: v0.9.0, v0.10.0 Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants