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(ecs-service): #624 fix description of ecs service cluster field #643

Merged

Conversation

haarchri
Copy link
Member

@haarchri haarchri commented Apr 1, 2023

Description of your changes

fixed the description for ecs_service cluster field - we need the cluster name / short-id instead of ARN - ref & selector working as expected as mentioned by @dverveiko in #624

Fixes #624

I have:

  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

applied new example:

NAME                                                 READY   SYNCED   EXTERNAL-NAME             AGE
cluster.ecs.aws.upbound.io/example-cluster-service   True    True     example-cluster-service   4m2s

NAME                                         READY   SYNCED   EXTERNAL-NAME     AGE
service.ecs.aws.upbound.io/example-service   True    True     example-service   4m2s

NAME                                                           READY   SYNCED   EXTERNAL-NAME   AGE
taskdefinition.ecs.aws.upbound.io/example-service-definition   True    True     sampleservice   4m2s

Copy link
Collaborator

@ytsarev ytsarev left a comment

Choose a reason for hiding this comment

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

Is that actually correct? While selectors will work the actually field will take and ARN as an input https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_service#cluster

@haarchri
Copy link
Member Author

haarchri commented Apr 1, 2023

@ytsarev check #624 the examples in the comments - you see that cluster is everytime the name instead of the arn

Copy link
Collaborator

@ytsarev ytsarev left a comment

Choose a reason for hiding this comment

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

Got it, thanks for clarification.

In this case, we need to extend uptest suite with an example symmetrical to https://github.com/upbound/provider-aws/blob/main/examples/ecs/service.yaml but with using an explicit cluster field name. This way we will deterministically prove that the Name/Non-ARN format works end-to-end.

Could you please add extend the PR with this additional example to cover this case?

@haarchri
Copy link
Member Author

haarchri commented Apr 1, 2023

I will add it

@haarchri
Copy link
Member Author

haarchri commented Apr 2, 2023

added example and tested:

kubectl get managed
Warning: BucketPolicy has been deprecated. Use spec.forProvider.policy in Bucket instead.
NAME                                                 READY   SYNCED   EXTERNAL-NAME             AGE
cluster.ecs.aws.upbound.io/example-cluster-service   True    True     example-cluster-service   4m2s

NAME                                         READY   SYNCED   EXTERNAL-NAME     AGE
service.ecs.aws.upbound.io/example-service   True    True     example-service   4m2s

NAME                                                           READY   SYNCED   EXTERNAL-NAME   AGE
taskdefinition.ecs.aws.upbound.io/example-service-definition   True    True     sampleservice   4m2s

@ytsarev
Copy link
Collaborator

ytsarev commented Apr 2, 2023

/test-examples="examples/ecs/service-static-cluster.yaml"

@haarchri haarchri requested a review from ytsarev April 3, 2023 11:08
@haarchri haarchri force-pushed the fix/ecs-service-cluster-description branch from 9188dc1 to 4734877 Compare April 11, 2023 15:58
@haarchri haarchri requested a review from ytsarev April 11, 2023 15:58
@ytsarev
Copy link
Collaborator

ytsarev commented Apr 11, 2023

/test-examples="examples/ecs/service-static-cluster.yaml"

Copy link
Collaborator

@sergenyalcin sergenyalcin 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 LGTM! From my side it is good to go if @ytsarev also thinks on this way.

@ytsarev
Copy link
Collaborator

ytsarev commented Apr 11, 2023

@sergenyalcin all good in general. I still fail to understand why we need manual intervention annotation on something that proved to be automatically testable by uptest :) If somebody can explain me that simple thing I am totally happy with the merge :)

Copy link
Collaborator

@ytsarev ytsarev left a comment

Choose a reason for hiding this comment

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

Ok, @sergenyalcin managed to fix my understanding. We are still skipping skipping Service involved with underlying https://github.com/upbound/uptest/blob/main/internal/prepare.go#L103
and the rest of the resources in example are just getting successfully CRUDed by uptest.
Sorry fo confusion, LGTM

@ytsarev ytsarev merged commit d1279b7 into crossplane-contrib:main Apr 12, 2023
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.

ECS Service cluster fields not working as documented
3 participants