Skip to content

Update Crossplane dependencies to get the new APIs module#293

Merged
adamwg merged 2 commits intocrossplane:mainfrom
adamwg:awg/update-xp-apis
Apr 22, 2026
Merged

Update Crossplane dependencies to get the new APIs module#293
adamwg merged 2 commits intocrossplane:mainfrom
adamwg:awg/update-xp-apis

Conversation

@adamwg
Copy link
Copy Markdown
Member

@adamwg adamwg commented Apr 16, 2026

Description of your changes

The core Crossplane resource APIs have moved from crossplane-runtime to the new crossplane/apis module. Update our references to use the new paths.

I have:

  • Read and followed Crossplane's [contribution process].
  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

Existing unit tests.

adamwg added 2 commits April 16, 2026 14:39
The core Crossplane resource APIs have moved from crossplane-runtime to the new
crossplane/apis module. Update our references to use the new paths.

Signed-off-by: Adam Wolfe Gordon <awg@upbound.io>
Signed-off-by: Adam Wolfe Gordon <awg@upbound.io>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 16, 2026

Warning

Rate limit exceeded

@adamwg has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 54 minutes and 38 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 54 minutes and 38 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3d8fc0bf-4d75-46e9-98c6-4b46227b75f8

📥 Commits

Reviewing files that changed from the base of the PR and between 5cf834f and d79127a.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
📝 Walkthrough

Walkthrough

This pull request migrates Crossplane API type usage from v1 common types to v2 core types across composed and composite resource implementations, updating method signatures and internal status handling while preserving existing control flow.

Changes

Cohort / File(s) Summary
Composed resource types
resource/composed/composed.go, resource/composed/testresource_test.go
Replaced v1 common types with v2 core equivalents: condition types in GetCondition/SetConditions, secret references in GetWriteConnectionSecretToReference/SetWriteConnectionSecretToReference, and observed status in generation accessors. Test resource struct fields updated to use xpv2.ManagedResourceSpec and xpv2.ManagedResourceStatus.
Composite resource types
resource/composite/composite.go
Migrated to v2 core types across all accessor/mutator methods: composition update policy, secret references, conditions, and observed status tracking. Internal type conversions updated accordingly.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Breaking Changes ❌ Error Pull request introduces breaking changes to public API methods without the required 'breaking-change' label. Add 'breaking-change' label and include migration guidance in release notes explaining the xpv1 to xpv2 type migration.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: updating Crossplane API references from v1 to v2 modules, which is evident across all three modified files.
Description check ✅ Passed The description clearly explains that Crossplane resource APIs have moved from crossplane-runtime to a new crossplane/apis module and this PR updates the references accordingly.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

package composed

import (
xpv2 "github.com/crossplane/crossplane/apis/v2/core/v2"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

compared to xpv1 "github.com/crossplane/crossplane-runtime/v2/apis/common/v1" is this the same ? or we stop supporting v1 ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good question. Before the move, common/v1 and common/v2 were the same except for namespaced resource support - callers needed to use v1 types for cluster-scoped and v2 types for namespace-scoped. Since v2 actually supports both, we've combined them into core/v2 (naming the duplicate types to indicate cluster-scoped vs. namespaced) and removed the v1 package.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Means we need to document this behaviour Change with the next release

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't think there are any behavioral changes for function-sdk-go, but we definitely need to document the change in package organization for the next crossplane and crossplane-runtime release.

@adamwg adamwg merged commit 1c756d2 into crossplane:main Apr 22, 2026
9 of 10 checks passed
@adamwg adamwg deleted the awg/update-xp-apis branch April 22, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants