Skip to content

Conversation

negz
Copy link
Contributor

@negz negz commented Jun 3, 2021

This is required to fix crossplane-contrib/provider-aws#697

In the vast majority of resources a spec is required, so I'd like to mark it as such. I believe that in the edge cases where the spec really contains only optional fields it's possible to write spec: {}.

We prefer not to mark status fields as required, since resources will always exist at some point without their status and we consider 'requiredness' to be more of a human-facing constraint than a software-facing constraint that our managed resource controllers should be subject to.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This is required to fix crossplane-contrib/provider-aws#697

In the vast majority of resources a spec is required, so I'd like to mark it as
such. I believe that in the edge cases where the spec really contains only
optional fields it's possible to write `spec: {}`.

We prefer not to mark status fields as required, since resources will always
exist at some point without their status and we consider 'requireness' to be
more of a human-facing constraint than a software-facing constraint that our
managed resource controllers should be subject to.

Signed-off-by: Nic Cope <[email protected]>
@ack-bot ack-bot requested review from a-hilaly and jaypipes June 3, 2021 21:39
@ack-bot
Copy link
Collaborator

ack-bot commented Jun 3, 2021

Hi @negz. Thanks for your PR.

I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@ack-bot ack-bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 3, 2021
@negz
Copy link
Contributor Author

negz commented Jun 3, 2021

CC @muvaf

@negz negz changed the title Mark spec as required, status.atProvider as optional [crossplane] Mark spec as required, status.atProvider as optional Jun 3, 2021
@negz negz changed the title [crossplane] Mark spec as required, status.atProvider as optional crossplane: Mark spec as required, status.atProvider as optional Jun 3, 2021
@RedbackThomson
Copy link
Contributor

/ok-to-test

@ack-bot ack-bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 3, 2021
@RedbackThomson
Copy link
Contributor

/test unit-test

negz added a commit to negz/provider-aws that referenced this pull request Jun 3, 2021
Fixes crossplane-contrib#697
Depends on aws-controllers-k8s/code-generator#81

In the vast majority of resources a spec is required, so I'd like to mark it as
such. I believe that in the edge cases where the spec really contains only
optional fields it's possible to write spec: {}.

We prefer not to mark status fields as required, since resources will always
exist at some point without their status and we consider 'requireness' to be
more of a human-facing constraint than a software-facing constraint that our
managed resource controllers should be subject to.

Signed-off-by: Nic Cope <[email protected]>
Copy link
Contributor

@muvaf muvaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@negz thanks for catching this!

@negz
Copy link
Contributor Author

negz commented Jun 3, 2021

/assign @a-hilaly

@a-hilaly
Copy link
Member

a-hilaly commented Jun 3, 2021

Thanks @negz !
/approve

@a-hilaly
Copy link
Member

a-hilaly commented Jun 3, 2021

/lgtm

@ack-bot ack-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 3, 2021
@ack-bot
Copy link
Collaborator

ack-bot commented Jun 3, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: A-Hilaly, muvaf, negz

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

The pull request process is described 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

@ack-bot ack-bot merged commit c459288 into aws-controllers-k8s:main Jun 3, 2021
negz added a commit to negz/provider-aws that referenced this pull request Jun 4, 2021
aws-controllers-k8s/code-generator#81

This commit includes the above PR, which makes all extant ACK generated
CRDs conformant according to https://github.com/crossplane/conformance.

Signed-off-by: Nic Cope <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

All provider-aws CRDs should be conformant

5 participants