Skip to content

fix(repositories): Support project scoping for Observe, Delete in Repository resources - #335

Merged
MisterMX merged 1 commit into
crossplane-contrib:mainfrom
rounakdatta:repository-project-scoping
Sep 23, 2025
Merged

fix(repositories): Support project scoping for Observe, Delete in Repository resources#335
MisterMX merged 1 commit into
crossplane-contrib:mainfrom
rounakdatta:repository-project-scoping

Conversation

@rounakdatta

@rounakdatta rounakdatta commented Sep 15, 2025

Copy link
Copy Markdown
Contributor

Description of your changes

For Repositories, there's a wierd behaviour that when you pass a Project in the XRD, the Argo repository gets created, but it goes into an unhealthy state right after that. This happens because I think there's a bug in the Repository controller code. In the Observe function, we don't pass the project to the RepoQuery explicitly, and therefore it fails with an obvious error observe failed: rpc error: code = Unknown desc = repository not found for url "https://github.com/my-org/hello-world.git" and project "". I've added the param and added a test case to validate.

Fixes #245

I have:

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

How has this code been tested

Signed-off-by: Rounak Datta <rounak@lyric.tech>
@rounakdatta
rounakdatta force-pushed the repository-project-scoping branch from 9bb78a9 to 2cbc0e8 Compare September 15, 2025 13:52
@MisterMX MisterMX changed the title Support project scoping for Observe, Delete in Repository resources fix(project): Support project scoping for Observe, Delete in Repository resources Sep 23, 2025
@MisterMX MisterMX changed the title fix(project): Support project scoping for Observe, Delete in Repository resources fix(repositories): Support project scoping for Observe, Delete in Repository resources Sep 23, 2025

@MisterMX MisterMX left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. Thank you very much @rounakdatta!

@MisterMX
MisterMX merged commit 8a500f8 into crossplane-contrib:main Sep 23, 2025
7 checks passed
@github-actions

Copy link
Copy Markdown

Successfully created backport PR #338 for release-0.13.

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.

Project field is acceptable even for Helm-type repositories

2 participants