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

Use declarative conditions for the CRE status. #168

Closed

Conversation

VannTen
Copy link
Member

@VannTen VannTen commented Jan 16, 2023

We reduce the API surface with less conditions, trying to describe the
state of our resource.
The API is built around the assumption that client only cares about
three things:

  • Is there a built image available ? (-> can I run it ?)
  • Is the image up to date ? (-> are my last changes in it ?)
  • Is there an error ? (-> are my changes correct / is the cluster not
    working ?)

Open questions:

  • I wonder if we need a fourth "transient" condition, BuildScheduled/equivalent ?
    Is there an use case (aka, a API client who cares) for it ?

This is only the API side, on which we should agree before adapting the reconciliation loop inside the controller.

I left out Thoth-related conditions for now, this should be additive and not modify the core logic of CRE, I think.

@goern @codificat

Related Issues and Dependencies

fixes: #130

This introduces a breaking change

  • Yes

This should yield a new module release

  • Yes

@sesheta sesheta added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 16, 2023
@sesheta
Copy link
Member

sesheta commented Jan 16, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@sesheta
Copy link
Member

sesheta commented Jan 16, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from vannten by writing /assign @vannten in a comment. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sesheta sesheta added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 16, 2023
@goern
Copy link
Member

goern commented Jan 16, 2023

How would we indicate, that the secret required for importing an image is not present, or if it is present, an auth failed?
Ready would be set to False, how would we show the reason why? via Condition.Reason?

What is the rationale for not having more fine-grain condition constants?

@VannTen
Copy link
Member Author

VannTen commented Jan 16, 2023 via email

We reduce the API surface with less conditions, trying to describe the
state of our resource.
The API is built around the assumption that client only cares about
three things:
- Is there a built image available ? (-> can I run it ?)
- Is the image up to date ? (-> are my last changes in it ?)
- Is there an error ? (-> are my changes correct / is the cluster not
  working ?)
This is a better way to signal failure of the build pipeline

Co-authored-by: KPostOffice <k.postlethwait24@gmail.com>
@VannTen
Copy link
Member Author

VannTen commented Jan 25, 2023

@goern Is your question answered ?

Should we move forward with this API ?

@goern
Copy link
Member

goern commented Jan 25, 2023

/lgtm

@sesheta sesheta added the lgtm Indicates that a PR is ready to be merged. label Jan 25, 2023
@goern
Copy link
Member

goern commented May 29, 2023

/close

@op1st-prow op1st-prow bot closed this May 29, 2023
@op1st-prow
Copy link

op1st-prow bot commented May 29, 2023

@goern: Closed this PR.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CNBi conditions are not declarative
4 participants