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

Update S3 cache to read AWS_SESSION_TOKEN env var if present #339

Merged
merged 3 commits into from
May 16, 2024

Conversation

peetw
Copy link
Contributor

@peetw peetw commented May 2, 2024

Also increases the line buffer when reading the S3 credentials file to ensure that the session token isn't truncated

@jmckenna
Copy link
Member

@peetw it is failing for Windows, somewhere around line# 875:

D:\a\mapcache\mapcache\lib\cache_rest.c(875,25): error C2057: expected constant expression [D:\a\mapcache\mapcache\build\mapcache.vcxproj]
D:\a\mapcache\mapcache\lib\cache_rest.c(875,25): error C2466: cannot allocate an array of constant size 0 [D:\a\mapcache\mapcache\build\mapcache.vcxproj]
D:\a\mapcache\mapcache\lib\cache_rest.c(875,26): error C2133: 'line': unknown size [D:\a\mapcache\mapcache\build\mapcache.vcxproj]

@peetw
Copy link
Contributor Author

peetw commented May 10, 2024

@jmckenna woops, been too long since I programmed in C and not C++ (where you can use const vars to init array size) 😅 Should be fixed now

@peetw
Copy link
Contributor Author

peetw commented May 10, 2024

@jmckenna hmm, the build is still failing, but doesn't seem to be related to anything I've changed:

D:\a\mapcache\mapcache\lib\util.c(51,27): error C2371: 'uint64_t': redefinition; different basic types [D:\a\mapcache\mapcache\build\mapcache.vcxproj]

@jmckenna
Copy link
Member

@peetw can you merge in the recent changes from the main branch, into this pull request? (to see if that fixes the Windows issue)

@jmckenna
Copy link
Member

great, passes, thanks again @peetw !

@jmckenna jmckenna merged commit 0b40f71 into MapServer:main May 16, 2024
7 checks passed
Copy link

The backport to branch-1-14 failed:

The process '/usr/bin/git' failed with exit code 128
stderr
error: commit bfc71de778d690c79f5870ab7ed5861ce310f951 is a merge but no -m option was given.
fatal: cherry-pick failed

stdout
[backport-339-to-branch-1-14 3e90691] Update S3 cache to read AWS_SESSION_TOKEN env var if present
 Author: Peet Whittaker <peet.whittaker@gmail.com>
 Date: Thu May 2 15:13:01 2024 +0100
 1 file changed, 9 insertions(+), 1 deletion(-)
[backport-339-to-branch-1-14 ce96248] Increase line buffer size when reading S3 credentials file
 Author: Peet Whittaker <peet.whittaker@gmail.com>
 Date: Thu May 2 15:52:56 2024 +0100
 1 file changed, 6 insertions(+), 4 deletions(-)

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-branch-1-14 branch-1-14
# Navigate to the new working tree
cd .worktrees/backport-branch-1-14
# Create a new branch
git switch --create backport-339-to-branch-1-14
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick d9e53aae661aa7826584104d363759f0e0f26b8b,33d9549c6bc66ea0b1fa8a1ae7126159dc308ec9,bfc71de778d690c79f5870ab7ed5861ce310f951
# Push it to GitHub
git push --set-upstream origin backport-339-to-branch-1-14
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-branch-1-14

Then, create a pull request where the base branch is branch-1-14 and the compare/head branch is backport-339-to-branch-1-14.

@peetw peetw deleted the s3-session-token branch May 16, 2024 12:14
@peetw
Copy link
Contributor Author

peetw commented May 16, 2024

@jmckenna no problem! As a related question, what's the release schedule like for MapCache? Just wondering when and in which version(s) this would be available in?

@jmckenna
Copy link
Member

@peetw good point, I've updated the release milestone accordingly, thanks.

@jmckenna jmckenna added this to the 1.14.1 release milestone May 16, 2024
jmckenna pushed a commit that referenced this pull request May 16, 2024
* Update S3 cache to read AWS_SESSION_TOKEN env var if present

* Increase line buffer size when reading S3 credentials file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants