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

Promote composition functions to v1 #799

Merged
merged 6 commits into from
Aug 23, 2024

Conversation

negz
Copy link
Member

@negz negz commented Aug 17, 2024

This is related to #791 and crossplane/crossplane#5885.

I don't intend to truly make our docs "functions first" with this PR. Instead the plan is to take the first baby steps. Those will be:

  • Update all Composition examples to use function-patch-and-transform
  • Ensure all the getting started guides mention installing function-patch-and-transform
  • Remove the notices that functions are beta
  • Move everything patch-and-transform related to a guide on function-patch-and-transform

I'd also like to add a brief guide on migrating a function from v1beta1 to v1 (it's basically s/v1beta1/v1 on the imports), but I think I'll do that in a separate PR in the interest of getting this merged and unblocking the Crossplane release.

Reviewer notes

This also removes the release notes from the docs. They're still available at https://github.com/crossplane/crossplane/releases. See the relevant commit message for details.

Vale is failing, but only for content I didn't touch in this PR. I'm guessing the problem is that I touched pages with pre-existing content that doesn't pass the linter.

Copy link

netlify bot commented Aug 17, 2024

Deploy Preview for crossplane ready!

Name Link
🔨 Latest commit dd01aa1
🔍 Latest deploy log https://app.netlify.com/sites/crossplane/deploys/66c8e38f06673600098b4510
😎 Deploy Preview https://deploy-preview-799--crossplane.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 79 (no change from production)
Accessibility: 90 (🔴 down 2 from production)
Best Practices: 83 (no change from production)
SEO: 93 (no change from production)
PWA: 70 (no change from production)
View the detailed breakdown and full score reports

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


### Include the composite resource

Composition functions can only change the `status` field of a composite
Copy link
Collaborator

@bobh66 bobh66 Aug 20, 2024

Choose a reason for hiding this comment

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

I'll do another full pass through but I think this limitation needs to be called out more specifically at a higher level. It was common to use XR metadata.annotations and labels to store information, and there were examples in the docs showing this pattern, so breaking that pattern needs to be more clearly documented. This also has impacts on the migration from legacy P&T to functions, since the existing compositions that patch into metadata need to be rewritten to use status instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

I definitely agree, but I'd rather raise a tracking issue for that and follow up ASAP rather than tackle it in this PR.

To get this PR finished as quickly as possible I'd like to keep it focused on the promotion to GA. I'm only adding new content where it pertains to the fact that functions are now GA, and native P&T is deprecated.

to a
[Composition pipeline function]({{< ref "../concepts/compositions#use-composition-functions" >}}).
or a legacy Composition using `mode: Resources` to a
[Composition pipeline function]({{< ref "../concepts/compositions" >}}).
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should probably make clear that legacy Compositions that patch information into the XR metadata will not work properly after conversion and will need to be updated to use status instead.

@bobh66
Copy link
Collaborator

bobh66 commented Aug 20, 2024

Tagging crossplane/crossplane#5434 here as a bread crumb - the resolution of that issue will determine what the documentation updates need to be.

@negz negz force-pushed the its-happening-dot-gif branch 3 times, most recently from b3d34f0 to 01794b1 Compare August 23, 2024 02:40
I don't think any of the maintainers are passionate about keeping these.
We already didn't do them for the v1.16 release.

They have a bunch of brittle links from /v1.XX dirs to /master, which
right now are blocking my PR. I don't want to go update all the links so
I'm just deleting them.

Signed-off-by: Nic Cope <[email protected]>
@negz negz marked this pull request as ready for review August 23, 2024 04:03
Copy link
Collaborator

@jeanduplessis jeanduplessis left a comment

Choose a reason for hiding this comment

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

Just a few nits, nothing blocking. LGTM 👍

content/master/cli/command-reference.md Outdated Show resolved Hide resolved
content/master/cli/command-reference.md Outdated Show resolved Hide resolved
content/master/cli/command-reference.md Outdated Show resolved Hide resolved
content/master/concepts/compositions.md Outdated Show resolved Hide resolved
content/master/concepts/compositions.md Show resolved Hide resolved
Crossplane calls {{<hover label="double" line="10">}}function-cue{{</hover>}} to
create an S3 bucket. Crossplane then passes the bucket to
{{<hover label="double" line="23">}}function-auto-ready{{</hover>}}, which marks the
composite resource as ready when the bucket becomes ready.
Copy link
Member

Choose a reason for hiding this comment

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

nit: function-auto-ready could be confusing for someone learning Crossplane / compositions, e.g. why do I need to mark it to ready again with a separate function, if it is already ready :) It would demonstrate the idea better if the second function adds a common label/annotation etc.

Copy link
Member Author

Choose a reason for hiding this comment

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

This content is pre-existing so I'm going to leave it as is.

@negz negz merged commit cc11303 into crossplane:master Aug 23, 2024
6 of 7 checks passed
@negz negz deleted the its-happening-dot-gif branch August 23, 2024 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants