Skip to content

Conversation

@xunholy
Copy link
Collaborator

@xunholy xunholy commented Apr 29, 2025

Description of your changes

This atempts to fix the external-name with the Repository Ruleset resource as documented in issue #176 - I've had issues locally running the make commands if someone could please assist there.

Fixes #176

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

@xunholy
Copy link
Collaborator Author

xunholy commented Apr 29, 2025

@AtzeDeVries I also noticed a comment from you here as I believe this should be fixed too

// We cannot use the external_name = pattern here since pattern can contain non alpha numberic characters
"github_branch_protection": config.IdentifierFromProvider,

I was thinking something like this should potentially work?

"github_branch_protection": config.TemplatedStringAsIdentifier("repository_pattern", "{{ .parameters.repository }}:{{ .parameters.pattern }}"),

Signed-off-by: Michael Fornaro <[email protected]>
@ricardoyepes ricardoyepes mentioned this pull request May 1, 2025
2 tasks
@olga-mir
Copy link

@pravindahal I've noticed this PR was opened some time ago and was not reviewed by maintainers, will you be able to have a look?
I've seen the same behaviour with importing teams resources. This is quite limiting because it is difficult to adopt existing resources since numerical IDs are not easily available when we build composite resources.

@AtzeDeVries
Copy link
Collaborator

@olga-mir the pattern can also be something like the pattern of a branch protection can * or production/*. This would result into external_names with non alphanumeric characters, which is not allowed.
The external-name is a annotation and https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set shows that annotations can only be alphanumeric.

Also changing the external name pattern is a breaking change.

@AtzeDeVries AtzeDeVries reopened this Jul 31, 2025
@AtzeDeVries
Copy link
Collaborator

I closed this prematurely. We should still fix the rule_set external_name

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.

Invalid external-name on repository rulesets

3 participants