-
Notifications
You must be signed in to change notification settings - Fork 20
Update Runtime to v0.13.0 #28
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
Conversation
0ffabf4
to
be14390
Compare
There was a problem hiding this 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
/hold |
There was a problem hiding this 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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also coming from here
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
e21169d
to
4d03f0e
Compare
/test applicationautoscaling-kind-e2e |
This reverts commit 73b537a.
/approve #28 (comment) |
There was a problem hiding this 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
"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" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
"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" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
/lgtm |
[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:
Approvers can indicate their approval by writing |
/hold cancel |
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.