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

Develop to master #183

Merged
merged 2 commits into from
Feb 25, 2025
Merged

Develop to master #183

merged 2 commits into from
Feb 25, 2025

Conversation

jterry64
Copy link
Member

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side). Don't request your master!
  • Make sure you are making a pull request against the develop branch (left side). Also you should start your branch off our develop.
  • Check the commit's or even all commits' message styles matches our requested structure.
  • Check your code additions will fail neither code linting checks nor unit test.

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this introduce a breaking change?

  • Yes
  • No

Other information

The datapump was using the lambda-layer module of the gfw-lambda-layers
repo. This module only updates a lambda layer if the associated
Dockerfile changes, since it is mainly targeted to creating layers of
existing python libraries, so only the version number in the Dockerfile
matters.

So, changed the terraform to build the layer.zip using the usual
Dockerfile, but using the hash of the entire layer.zip to decide if the
layer.zip should be uploaded to S3 and used to update the lambda. We no
longer use the lambda-layer module.

The layer.zip file includes all the modified times of the files, which
keep changing, even when the file names and contents are the same. I
tried generating a hash using only filenames and contents, but terraform
seems to create its own hash of the layer.zip file as well, so basically
we're always going to update the layer.zip no matter what, which seems
fine.

Added a bunch of explanatory comments, cleaned up some other comments.
GTC-1250 Update lambda layer based on any datapump source changes
@jterry64 jterry64 merged commit 7df48b8 into master Feb 25, 2025
2 checks passed
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.

3 participants