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

Merge from develop to master (7 PRs) #640

Merged
merged 63 commits into from
Feb 27, 2025
Merged

Merge from develop to master (7 PRs) #640

merged 63 commits into from
Feb 27, 2025

Conversation

danscales
Copy link
Collaborator

Includes these PRs:

Let me know if you are OK with merging all your PRs in this list to master, or if any particular PR should be excluded (in which case I am fine with creating a special PR from develop to master that excludes some of these PRs).

jterry64 and others added 22 commits February 19, 2025 13:10
Fix extract_level_gid to deal with misformatting of gids for Ghana and
Indonesia in GADM 4.1. I just localized the fixes to a few lines in
extract_level_gid, and the adjustments only happen if the gid is
misformatted.

Added a few tests of extract_level_gid().
Change s3:PutBucketLifecycleConfiguration to s3:PutLifecycleConfiguration

And re-enable the use of expire_s3_objects().
GTC-3137 Fix extract_level_gid to deal with misformats in GADM 4.1
The main issue was that the correct lifecycle action permission is
actually s3:PutLifecycleConfiguration, but we've always had
s3:PutBucketLifecycleConfiguration in the policy templates.

A second issue is that the expiration time for a bucket/folder must be a
date specified as midnight UTC. We were just using the current time, so
that caused an error when trying to set the lifecycle rule.

In both cases, we weren't seeing the error, because delete_all_assets
was called from a background task, so any exception was getting lost
without being logged. So, I added a try-except around the call to
put_bucket_lifecycle_configuration(), so we log future errors (and don't
kill the task).

Given these fixes, I was able to re-enable the use of
expire_s3_objects() and it worked!
Also, just noting here that lifecycle rules themselves don't expire, so
we will want to clean them up periodically at:

https://us-east-1.console.aws.amazon.com/s3/management/gfw-tiles/lifecycle?bucketType=general&region=us-east-1#
GTC-2708 Fix deleting of the tile cache when deleting a version
Correct type of tags column, add metadata models to env.py
Replace PostgreSQL versions in compose files with those deployed to AWS
@solomon-negusse
Copy link
Member

@danscales #637 is good to be merged.

@danscales
Copy link
Collaborator Author

I'm assuming that Justin's mock endpoint is fine to be merged. So I'll merge now, in case other folks want to merge into develop without being immediately merged into master.

@danscales danscales merged commit f2a3570 into master Feb 27, 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.

4 participants