Skip to content

Conversation

mbaijal
Copy link
Contributor

@mbaijal mbaijal commented Aug 25, 2021

Update Runtime to v0.13.0 and add the primary identifier field for both ScalableTarget and ScalingPolicy as required.

Testing

Integration Tests are passing.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ack-bot ack-bot requested review from a-hilaly and vijtrip2 August 25, 2021 06:31
@mbaijal mbaijal changed the title Update Runtime to v0.12.0 [wip] Update Runtime to v0.12.0 Aug 25, 2021
@ack-bot ack-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 25, 2021
@mbaijal mbaijal force-pushed the update-runtime-0.12 branch from 0ffabf4 to be14390 Compare August 25, 2021 09:52
@mbaijal mbaijal changed the title [wip] Update Runtime to v0.12.0 Update Runtime to v0.12.0 Aug 25, 2021
@ack-bot ack-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 25, 2021
Copy link
Contributor

@RedbackThomson RedbackThomson 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 for doing this in a separate PR. Saves 700 lines of confusion for me in the next PR.

/lgtm

@ack-bot ack-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 25, 2021
@surajkota
Copy link
Member

/hold

@ack-bot ack-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 25, 2021
Copy link
Member

@surajkota surajkota left a comment

Choose a reason for hiding this comment

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

few questions and comments

One more thing to note is there are some bug fixes in aws-controllers-k8s/runtime#48 and aws-controllers-k8s/code-generator#168 which might affect these resources as well. So we should proceed accordingly

r.ko.Status.ACKResourceMetadata = &ackv1alpha1.ResourceMetadata{}
}
r.ko.Spec.ResourceID = identifier.NameOrID
r.ko.Status.ACKResourceMetadata.ARN = identifier.ARN
Copy link
Member

Choose a reason for hiding this comment

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

its using ARN instead of the primary_identified field from generator.yaml, a possible bug?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also coming from here

Copy link
Member

Choose a reason for hiding this comment

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

so this is a bug then?
the identifier for this resource is resourceID right? in fact this resource does not have an ARN

Copy link
Contributor

Choose a reason for hiding this comment

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

The SetResourceIdentifiers previously could not detect the primary identifier field for ReadMany describe operations (in this case DescribeScalableTargets). I have since rewritten it (pending aws-controllers-k8s/code-generator#170) to do so. Once that PR is merge, the override in the generator config will not be necessary.

For this particular problem, I would recommend trying ResourceIds as the primary_identifier_field_name, since this is the field in the describe call that we hope to reference.

Copy link
Member

Choose a reason for hiding this comment

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

@RedbackThomson resourceIds is already set in primary_identifier_field_name right, any idea why code still pointing to ARN?

we can have this discussion on a separate PR to unblock you - #29 (comment)

I can approve, let me know.

Copy link
Contributor

Choose a reason for hiding this comment

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

ResourceID is the value of primary_identifier_field_name - I am recommending ResourceIds. The field needs to match the member of the describe input shape.

Copy link
Member

Choose a reason for hiding this comment

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

@mbaijal can you make this change so we can merge this PR?

@ack-bot ack-bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 25, 2021
@mbaijal mbaijal force-pushed the update-runtime-0.12 branch from e21169d to 4d03f0e Compare August 27, 2021 08:34
@mbaijal mbaijal changed the title Update Runtime to v0.12.0 Update Runtime to v0.13.0 Aug 30, 2021
@mbaijal
Copy link
Contributor Author

mbaijal commented Aug 30, 2021

/test applicationautoscaling-kind-e2e

@mbaijal mbaijal changed the title Update Runtime to v0.13.0 Update Runtime to v0.12.0 Aug 30, 2021
@surajkota
Copy link
Member

surajkota commented Aug 31, 2021

/approve

#28 (comment)
can continue on a separate PR

Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

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

LGTM 👍
Left few comments

Comment on lines +20 to +32
"github.com/aws-controllers-k8s/applicationautoscaling-controller/pkg/testutil"
mocksvcsdkapi "github.com/aws-controllers-k8s/applicationautoscaling-controller/test/mocks/aws-sdk-go/applicationautoscaling"
ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1"
"github.com/ghodss/yaml"
"github.com/aws-controllers-k8s/applicationautoscaling-controller/pkg/testutil"
ackmetrics "github.com/aws-controllers-k8s/runtime/pkg/metrics"
acktypes "github.com/aws-controllers-k8s/runtime/pkg/types"
svcsdk "github.com/aws/aws-sdk-go/service/applicationautoscaling"
"github.com/ghodss/yaml"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"go.uber.org/zap/zapcore"
"path/filepath"
"testing"
ctrlrtzap "sigs.k8s.io/controller-runtime/pkg/log/zap"
ackmetrics "github.com/aws-controllers-k8s/runtime/pkg/metrics"
"go.uber.org/zap/zapcore"
"testing"
Copy link
Member

Choose a reason for hiding this comment

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

Needs goimports with probably some manual reorganization

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Amine, we will address this in a separate PR.

Comment on lines +20 to 33
"github.com/aws-controllers-k8s/applicationautoscaling-controller/pkg/testutil"
mocksvcsdkapi "github.com/aws-controllers-k8s/applicationautoscaling-controller/test/mocks/aws-sdk-go/applicationautoscaling"
ackv1alpha1 "github.com/aws-controllers-k8s/runtime/apis/core/v1alpha1"
"github.com/ghodss/yaml"
"github.com/aws-controllers-k8s/applicationautoscaling-controller/pkg/testutil"
ackmetrics "github.com/aws-controllers-k8s/runtime/pkg/metrics"
acktypes "github.com/aws-controllers-k8s/runtime/pkg/types"
svcsdk "github.com/aws/aws-sdk-go/service/applicationautoscaling"
"github.com/ghodss/yaml"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"go.uber.org/zap/zapcore"
"path/filepath"
"testing"
ctrlrtzap "sigs.k8s.io/controller-runtime/pkg/log/zap"
ackmetrics "github.com/aws-controllers-k8s/runtime/pkg/metrics"
"go.uber.org/zap/zapcore"
"testing"
)
Copy link
Member

Choose a reason for hiding this comment

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

Ditto

@surajkota surajkota changed the title Update Runtime to v0.12.0 Update Runtime to v0.13.0 Sep 1, 2021
Copy link
Member

@surajkota surajkota left a comment

Choose a reason for hiding this comment

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

/approve

@surajkota
Copy link
Member

/lgtm

@ack-bot ack-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 1, 2021
@ack-bot
Copy link
Collaborator

ack-bot commented Sep 1, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akartsky, mbaijal, RedbackThomson, surajkota

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [RedbackThomson,akartsky,mbaijal,surajkota]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@surajkota
Copy link
Member

/hold cancel

@ack-bot ack-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 1, 2021
@ack-bot ack-bot merged commit ecf179d into aws-controllers-k8s:main Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants