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

fix(lock) empty package and type in lock when dependsOn is a function #4706

Merged
merged 2 commits into from
Sep 29, 2023

Conversation

haarchri
Copy link
Contributor

Description of your changes

it is not possible to install functions with dependsOn in configurations - this leads to empty package and type in lock

apiVersion: meta.pkg.crossplane.io/v1
kind: Configuration
metadata:
  name: configuration-caas
  annotations:
[...]
spec:
  dependsOn:
    - provider: xpkg.upbound.io/crossplane-contrib/provider-helm
      version: ">=v0.15.0"
    - provider: xpkg.upbound.io/crossplane-contrib/provider-kubernetes
      version: ">=v0.9.0"
    - function: xpkg.upbound.io/crossplane-contrib/function-patch-and-transform
      version: ">=v0.1.3"

this results before this PR in:

apiVersion: pkg.crossplane.io/v1beta1
kind: Lock
metadata:
  name: lock
packages:
- dependencies:
  - constraints: '>=v0.15.0'
    package: xpkg.upbound.io/crossplane-contrib/provider-helm
    type: Provider
  - constraints: '>=v0.9.0'
    package: xpkg.upbound.io/crossplane-contrib/provider-kubernetes
    type: Provider
  - constraints: '>=v0.1.3'
    package: ""
    type: ""
[...]

after this PR:

kubectl get lock lock -o yaml
apiVersion: pkg.crossplane.io/v1beta1
kind: Lock
metadata:
  name: lock
packages:
- dependencies:
  - constraints: '>=v0.15.0'
    package: xpkg.upbound.io/crossplane-contrib/provider-helm
    type: Provider
  - constraints: '>=v0.9.0'
    package: xpkg.upbound.io/crossplane-contrib/provider-kubernetes
    type: Provider
  - constraints: '>=v0.1.3'
    package: xpkg.upbound.io/crossplane-contrib/function-patch-and-transform
    type: Function
[...]

Fixes #

I have:

  • Read and followed Crossplane's contribution process.
  • Added or updated unit and E2E tests for my change.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR, if necessary.
  • Opened a PR updating the docs, if necessary.

Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
@haarchri haarchri requested review from turkenh and a team as code owners September 29, 2023 10:59
Copy link
Contributor

@lsviben lsviben left a comment

Choose a reason for hiding this comment

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

Thanks @haarchri

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.

None yet

3 participants