-
Notifications
You must be signed in to change notification settings - Fork 23
Adding code for Layer_version resource #67
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
Skipping CI for Draft Pull Request. |
/test all |
66e352a
to
9339b0c
Compare
/test all |
9339b0c
to
9093c14
Compare
/test all |
9093c14
to
74f013f
Compare
/test all |
74f013f
to
6190024
Compare
/test all |
6190024
to
9986fe8
Compare
/test all |
9986fe8
to
23e5e50
Compare
/test all |
23e5e50
to
b7ed554
Compare
/test all |
b7ed554
to
1c99ca3
Compare
/test all |
1c99ca3
to
70f40ab
Compare
/test all |
70f40ab
to
1a81fbc
Compare
/test all |
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.
Good start on this @Vandita2020 ! Left few comments below
test/e2e/tests/test_layer_version.py
Outdated
# Update cr | ||
cr["spec"]["description"] = "new description" | ||
|
||
# Patch k8s resource | ||
k8s.patch_custom_resource(ref, cr) | ||
time.sleep(UPDATE_WAIT_AFTER_SECONDS) | ||
|
||
# Check layer version description | ||
layer_version = lambda_validator.get_layer_version(resource_name, version_number) | ||
assert layer_version is not None | ||
assert layer_version["Description"] == "new description" |
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.
This is also testing resource updates? Is it planned for this PR?
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.
Thanks for reminding, this PR is for creation and deletion only. I will make separate PR for update.
config/controller/kustomization.yaml
Outdated
@@ -6,4 +6,4 @@ kind: Kustomization | |||
images: | |||
- name: controller | |||
newName: public.ecr.aws/aws-controllers-k8s/lambda-controller | |||
newTag: v0.1.3 | |||
newTag: v0.1.2 |
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.
This should stay v0.1.3
, make sure to run git fetch --tags --all
in lambda-controller repo before regenerating the code
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.
Done
go_version: go1.19 | ||
version: v0.19.3-15-g7cd74c3-dirty | ||
api_directory_checksum: f01a03847a7bb58e935fdca90ecfb910f645ea61 | ||
version: v0.19.3-9-g560c702 |
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.
Maybe time to use code-generator v0.20.1? git fetch --tags --all
and rebasing will help
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.
Done.
labels: | ||
{{- range $key, $value := .Values.role.labels }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
{{ else }} | ||
kind: Role | ||
metadata: | ||
creationTimestamp: null | ||
name: ack-lambda-controller | ||
labels: | ||
{{- range $key, $value := .Values.role.labels }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} |
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.
Looks like you're using an outdated code-generator
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.
Done, I have updated the code-generator.
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.
This code should not be removed. Can you double check that you included changes to helm/templates
folder?
test/e2e/tests/test_layer_version.py
Outdated
# Assert that the original code.s3Bucket and code.s3Key is still part of | ||
# the function's CR | ||
assert cr["spec"]["content"]["s3Bucket"] == resources.FunctionsBucket.name | ||
assert cr["spec"]["content"]["s3Key"] == LAMBDA_FUNCTION_FILE_ZIP | ||
version_number = cr['status']['versionNumber'] |
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.
Let's address those in a seperate PR
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.
Thanks, I will open separate PR for this.
1a81fbc
to
4ff8ea3
Compare
/test all |
4ff8ea3
to
8af8ec3
Compare
/test all |
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.
This looks good to go! one last comment bellow.
Good work on this @Vandita2020 !
go_version: go1.19 | ||
version: v0.19.3-15-g7cd74c3-dirty | ||
api_directory_checksum: f01a03847a7bb58e935fdca90ecfb910f645ea61 | ||
version: v0.20.1-2-g560c702 |
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.
👍
labels: | ||
{{- range $key, $value := .Values.role.labels }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
{{ else }} | ||
kind: Role | ||
metadata: | ||
creationTimestamp: null | ||
name: ack-lambda-controller | ||
labels: | ||
{{- range $key, $value := .Values.role.labels }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} |
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.
This code should not be removed. Can you double check that you included changes to helm/templates
folder?
8af8ec3
to
940d99f
Compare
/test all |
/test all |
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.
Tres bien!
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: A-Hilaly, Vandita2020 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 |
…llers-k8s#67) ### Update to ACK runtime `v0.28.0`, code-generator `v0.28.0` ---------- * ACK code-generator `v0.28.0` [release notes](https://github.com/aws-controllers-k8s/code-generator/releases/tag/v0.28.0) * ACK runtime `v0.28.0` [release notes](https://github.com/aws-controllers-k8s/runtime/releases/tag/v0.28.0) ---------- NOTE: This PR increments the release version of service controller from `v0.0.28` to `v0.0.29` Once this PR is merged, release `v0.0.29` will be automatically created for `mq-controller` **Please close this PR, if you do not want the new patch release for `mq-controller`** ---------- #### stdout for `make build-controller`: ``` building ack-generate ... ok. ==== building mq-controller ==== Copying common custom resource definitions into mq Building Kubernetes API objects for mq Generating deepcopy code for mq Generating custom resource definitions for mq Building service controller for mq Generating RBAC manifests for mq Running gofmt against generated code for mq Updating additional GitHub repository maintenance files ==== building mq-controller release artifacts ==== Building release artifacts for mq-v0.0.29 Generating common custom resource definitions Generating custom resource definitions for mq Generating RBAC manifests for mq ``` ---------- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Description of changes:
Adding code for Layer_version resource. This contains hook code and e2e tests for creation and deletion.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.