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 empty TypeMeta while running API conversions #1422

Merged
merged 3 commits into from
Dec 12, 2024

Conversation

ulucinar
Copy link
Collaborator

@ulucinar ulucinar commented Jul 25, 2024

Description of your changes

For more details, see crossplane/upjet#424

  • Fix an issue with API conversions when the TypeMeta information has been dropped.
  • Add v1beta1 -> v1beta3 field renaming conversions for relevant resources. (fast-tracked in commit 32ce2a9)
  • Do not replace but append conversion functions. (fast-tracked in commit 32ce2a9)

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

See also: crossplane/upjet#424

Uptest runs:

  1. examples/rds/v1beta1/instance.yaml
  2. examples/rds/v1beta2/instance.yaml
  3. examples/ec2/v1beta1/vpcendpoint.yaml
  4. examples/ec2/v1beta2/vpcendpoint.yaml
  5. examples/s3/v1beta1/bucket.yaml
  6. examples/firehose/v1beta2/deliverystream.yaml
  7. examples/eks/v1beta2/nodegroup.yaml
  8. examples/cloudfront/v1beta2/fieldlevelencryptionconfig.yaml
  9. examples/backup/v1beta2/plan.yaml
  10. examples/autoscaling/v1beta2/attachment.yaml
  11. examples/apigateway/v1beta2/stage.yaml
  12. examples/accessanalyzer/v1beta1/analyzer.yaml
  13. examples/accessanalyzer/v1beta2/analyzer.yaml Uptest failed with error:

conversion webhook for accessanalyzer.aws.upbound.io/v1beta2, Kind=Analyzer failed: Post "https://provider-aws-accessanalyzer.upbound-system.svc:9443/convert?timeout=30s": dial tcp 10.96.172.121:9443: connect: connection refused

Tests in @mergenci's local development environment failed with the same error, but he was able to provision the resource by loading a locally-built provider image to the kind cluster. @turkenf had a similar case in #1334 for examples/elasticbeanstalk/v1beta2/application.yaml

@ulucinar ulucinar marked this pull request as draft July 25, 2024 11:12
@ulucinar
Copy link
Collaborator Author

Hi @turkenf, @mergenci,
Could you please take over this? Please ping me if help is needed.

Copy link

This provider repo does not have enough maintainers to address every pull request. Since there has been no activity in the last 90 days it is now marked as stale. 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 Oct 24, 2024
@turkenf
Copy link
Collaborator

turkenf commented Oct 24, 2024

/fresh

@github-actions github-actions bot removed the stale label Oct 25, 2024
@mergenci mergenci force-pushed the fix-conversion-typemeta branch from e675588 to d5405cb Compare November 4, 2024 23:47
@mergenci
Copy link
Collaborator

mergenci commented Nov 4, 2024

/test-examples="examples/ec2/v1beta2/vpcendpoint.yaml"

@mergenci
Copy link
Collaborator

mergenci commented Nov 4, 2024

/test-examples="examples/rds/v1beta2/instance.yaml"

@mergenci
Copy link
Collaborator

mergenci commented Nov 5, 2024

/test-examples="examples/ec2/v1beta1/vpcendpoint.yaml"

@mergenci
Copy link
Collaborator

mergenci commented Nov 5, 2024

/test-examples="examples/rds/v1beta1/instance.yaml"

@mergenci
Copy link
Collaborator

mergenci commented Nov 5, 2024

/test-examples="examples/ec2/v1beta1/vpcendpoint.yaml"

@mergenci mergenci marked this pull request as ready for review November 15, 2024 17:36
@mergenci mergenci marked this pull request as draft November 15, 2024 17:45
@mergenci mergenci mentioned this pull request Nov 20, 2024
3 tasks
@mergenci mergenci force-pushed the fix-conversion-typemeta branch from f1fb3cc to 4111162 Compare November 20, 2024 23:42
@mergenci
Copy link
Collaborator

/test-examples="examples/rds/v1beta1/instance.yaml"

@mergenci
Copy link
Collaborator

/test-examples="examples/ec2/v1beta1/vpcendpoint.yaml"

@mergenci mergenci force-pushed the fix-conversion-typemeta branch from e1a13e0 to 6e73be5 Compare November 21, 2024 07:19
@mergenci mergenci marked this pull request as ready for review November 21, 2024 07:45
@mergenci
Copy link
Collaborator

mergenci commented Nov 25, 2024

/test-examples="examples/ssm/v1beta2/maintenancewindowtask.yaml"

Turns out, this resource wasn't Uptestable.

@mergenci mergenci force-pushed the fix-conversion-typemeta branch from 6e73be5 to f68c6a6 Compare December 11, 2024 21:26
ulucinar and others added 3 commits December 12, 2024 00:34
- Fix an issue with API conversions when the TypeMeta information
  has been dropped.
- Add v1beta1 -> v1beta3 field renaming conversions for relevant
  resources (fast-tracked in commit 32ce2a9).
- Do not replace but append conversion functions (fast-tracked in
  commit 32ce2a9).

Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
Signed-off-by: Cem Mergenci <cmergenci@gmail.com>
Signed-off-by: Cem Mergenci <cmergenci@gmail.com>
@mergenci mergenci force-pushed the fix-conversion-typemeta branch from f68c6a6 to 5d1a3b2 Compare December 11, 2024 21:37
@mergenci
Copy link
Collaborator

/test-examples="examples/rds/v1beta1/instance.yaml"

@mergenci
Copy link
Collaborator

/test-examples="examples/rds/v1beta2/instance.yaml"

@mergenci
Copy link
Collaborator

/test-examples="examples/ec2/v1beta1/vpcendpoint.yaml"

@mergenci
Copy link
Collaborator

/test-examples="examples/ec2/v1beta2/vpcendpoint.yaml"

@mergenci
Copy link
Collaborator

/test-examples="examples/s3/v1beta1/bucket.yaml"

@turkenf
Copy link
Collaborator

turkenf commented Dec 12, 2024

/test-examples="examples/firehose/v1beta2/deliverystream.yaml"

@turkenf
Copy link
Collaborator

turkenf commented Dec 12, 2024

/test-examples="examples/eks/v1beta2/nodegroup.yaml"

@turkenf
Copy link
Collaborator

turkenf commented Dec 12, 2024

/test-examples="examples/cloudfront/v1beta2/fieldlevelencryptionconfig.yaml"

@turkenf
Copy link
Collaborator

turkenf commented Dec 12, 2024

/test-examples="examples/backup/v1beta2/plan.yaml"

@turkenf
Copy link
Collaborator

turkenf commented Dec 12, 2024

/test-examples="examples/autoscaling/v1beta2/attachment.yaml"

@turkenf
Copy link
Collaborator

turkenf commented Dec 12, 2024

/test-examples="examples/apigateway/v1beta2/stage.yaml"

@turkenf
Copy link
Collaborator

turkenf commented Dec 12, 2024

/test-examples="examples/accessanalyzer/v1beta2/analyzer.yaml"

@turkenf
Copy link
Collaborator

turkenf commented Dec 12, 2024

/test-examples="examples/accessanalyzer/v1beta1/analyzer.yaml"

@turkenf
Copy link
Collaborator

turkenf commented Dec 12, 2024

/test-examples="examples/accessanalyzer/v1beta2/analyzer.yaml"

Copy link
Collaborator

@turkenf turkenf left a comment

Choose a reason for hiding this comment

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

Thank you @ulucinar and @mergenci for your efforts 🙌

@mergenci mergenci merged commit 9321a3b into crossplane-contrib:main Dec 12, 2024
20 of 21 checks passed
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.

3 participants