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

Proposal: Introduction of skipDependencyResolution Field for dependsOn in Configurations #5279

Open
haarchri opened this issue Jan 23, 2024 · 5 comments · May be fixed by #5285
Open

Proposal: Introduction of skipDependencyResolution Field for dependsOn in Configurations #5279

haarchri opened this issue Jan 23, 2024 · 5 comments · May be fixed by #5285
Labels

Comments

@haarchri
Copy link
Contributor

What problem are you facing?

This proposal suggests introducing a skipDependencyResolution field for the dependsOn attribute within configurations. In current practice, dependency resolution can be skipped only at a global configuration level. However, this often does not suffice for the nuanced needs of complex platform projects, especially in large companies where fulfilling all dependencies in a configuration can be challenging (Security, External Registries, same APIs Inhouse with additional features). The proposed feature aims to provide more granular control over dependency resolution within individual configurations.

Many companies, especially those with large platform projects, frequently encounter difficulties in managing dependencies within their configurations. The current approach allows for skipping dependency resolution for the entire configuration, which is often a blunt tool for what requires a more precise solution. https://doc.crds.dev/github.com/crossplane/crossplane/pkg.crossplane.io/Configuration/[email protected]#spec-skipDependencyResolution

How could Crossplane help solve your problem?

The proposed solution is to introduce a new field, skipDependencyResolution, that can be used within the dependsOn attribute in configuration. This field would allow platform builders to specify if dependency resolution should be skipped for particular dependencies, rather than applying this skip to the entire configuration.

apiVersion: meta.pkg.crossplane.io/v1alpha1
kind: Configuration
metadata:
  name: test-configuration
spec:
  crossplane:
    version: ">=v1.14.1-0"
  dependsOn:
    - configuration: xpkg.upbound.io/upbound/configuration-aws-eks-karpenter
      version: "v0.5.0"
      skipDependencyResolution: true
    - configuration: xpkg.upbound.io/upbound/configuration-aws-eks-irsa
      version: "v0.5.0"
      skipDependencyResolution: true
    - provider: xpkg.upbound.io/upbound/provider-aws-sqs
      version: "v0.47.1"
    - provider: xpkg.upbound.io/upbound/provider-aws-cloudwatchevents
      version: "v0.47.1"
    - provider: xpkg.upbound.io/crossplane-contrib/provider-helm
      version: "v0.16.0"
    - provider: xpkg.upbound.io/crossplane-contrib/provider-kubernetes
      version: "v0.10.0"
    - provider: xpkg.upbound.io/upbound/provider-aws-ec2
      version: "v0.47.1"
    - provider: xpkg.upbound.io/upbound/provider-aws-eks
      version: "v0.47.1"
    - provider: xpkg.upbound.io/upbound/provider-aws-iam
      version: "v0.47.1"
    - function: xpkg.upbound.io/upbound/function-patch-and-transform
      version: "v0.2.1"

The primary benefit of this feature is the increased control it offers platform builders over their configurations. By allowing dependency resolution to be skipped on a per-dependency basis, teams can manage their configurations more effectively, especially in scenarios where certain dependencies are known to be unnecessary or problematic. This flexibility is particularly valuable in large-scale platform projects where managing a vast number of dependencies can be challenging.

Implementation Considerations

  • This change should be backward compatible, not affecting existing configurations that do not use the new field.
  • Care must be taken to ensure that the introduction of this field does not introduce unexpected behavior in dependency resolution in package manager
  • Documentation and examples should be updated to reflect this new feature.
@haarchri haarchri added the enhancement New feature or request label Jan 23, 2024
@haarchri haarchri changed the title Introduction of skipDependencyResolution Field for dependsOn in Configurations Proposal: Introduction of skipDependencyResolution Field for dependsOn in Configurations Jan 23, 2024
@negz
Copy link
Member

negz commented Jan 24, 2024

By allowing dependency resolution to be skipped on a per-dependency basis, teams can manage their configurations more effectively, especially in scenarios where certain dependencies are known to be unnecessary or problematic.

Can you give some examples of a dependency being unnecessary or problematic? If a dependency was unnecessary, wouldn't you just not list it as a dependency of the configuration?

  dependsOn:
    - configuration: xpkg.upbound.io/upbound/configuration-aws-eks-karpenter
      version: "v0.5.0"
      skipDependencyResolution: true

Does this then become information purely for human consumption? Should I read it as:

  • This package depends on configuration-aws-eks-karpenter...
  • ...but the package manager should ignore this dependency.

If so, I would suggest skipDependencyResolution is probably not the most intuitive name for the field in this context.

@bobh66
Copy link
Contributor

bobh66 commented Jan 24, 2024

I had the same reaction when I read the description, but I think the skipDependencyResolution is referring to the dependencies of the dependency. So it is trying to tell the package manager to skip the dependencies of the configuration-aws-eks-karpenter and configuration-aws-eks-irsa dependencies.

It seems a little odd to specify this inside the definition of the Configuration itself - it seems like something that the package deployer would want to control more than the package author. What happens if this Configuration is installed in a Crossplane cluster that doesn't have the skipped "sub-dependencies" installed?

@haarchri haarchri linked a pull request Jan 25, 2024 that will close this issue
6 tasks
@haarchri
Copy link
Contributor Author

Add a PR for this #5285 add description and some live tests - feel free to discuss

Copy link

Crossplane does not currently have enough maintainers to address every issue and pull request. This issue has been automatically marked as stale because it has had no activity in the last 90 days. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

@github-actions github-actions bot added the stale label Apr 25, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 9, 2024
@haarchri
Copy link
Contributor Author

/fresh

@github-actions github-actions bot removed the stale label May 28, 2024
@ytsarev ytsarev reopened this Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants