Skip to content

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

Merged
merged 1 commit into from
Dec 5, 2022

Conversation

Vandita2020
Copy link
Member

@Vandita2020 Vandita2020 commented Nov 30, 2022

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.

@ack-bot
Copy link
Collaborator

ack-bot commented Nov 30, 2022

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@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 Nov 30, 2022
@Vandita2020
Copy link
Member Author

/test all

@Vandita2020
Copy link
Member Author

/test all

@Vandita2020
Copy link
Member Author

/test all

@Vandita2020
Copy link
Member Author

/test all

@Vandita2020
Copy link
Member Author

/test all

@Vandita2020
Copy link
Member Author

/test all

@Vandita2020
Copy link
Member Author

/test all

@Vandita2020
Copy link
Member Author

/test all

@Vandita2020
Copy link
Member Author

/test all

@Vandita2020
Copy link
Member Author

/test all

@Vandita2020
Copy link
Member Author

/test all

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.

Good start on this @Vandita2020 ! Left few comments below

Comment on lines 86 to 96
# 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"
Copy link
Member

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?

Copy link
Member Author

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.

@@ -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
Copy link
Member

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

Copy link
Member Author

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
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

Comment on lines 7 to 19
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 }}
Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member

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?

# 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']
Copy link
Member

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

Copy link
Member Author

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.

@Vandita2020
Copy link
Member Author

/test all

@Vandita2020
Copy link
Member Author

/test all

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.

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
Copy link
Member

Choose a reason for hiding this comment

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

👍

Comment on lines 7 to 19
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 }}
Copy link
Member

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?

@Vandita2020
Copy link
Member Author

/test all

@Vandita2020 Vandita2020 changed the title Adding draft code for Layer_version resource Adding code for Layer_version resource Dec 5, 2022
@Vandita2020 Vandita2020 closed this Dec 5, 2022
@Vandita2020 Vandita2020 reopened this Dec 5, 2022
@Vandita2020
Copy link
Member Author

/test all

@Vandita2020 Vandita2020 marked this pull request as ready for review December 5, 2022 18:28
@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 Dec 5, 2022
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.

Tres bien!
/lgtm

@ack-bot ack-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 5, 2022
@ack-bot
Copy link
Collaborator

ack-bot commented Dec 5, 2022

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ack-bot ack-bot merged commit 9e85142 into aws-controllers-k8s:main Dec 5, 2022
michaelhtm pushed a commit to rushmash91/lambda-controller that referenced this pull request Feb 5, 2025
…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.
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.

3 participants