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

feat: Add possibility to configure a subfolder inside an S3 bucket #2647

Merged
merged 10 commits into from
Aug 28, 2023
Merged

feat: Add possibility to configure a subfolder inside an S3 bucket #2647

merged 10 commits into from
Aug 28, 2023

Conversation

gbouv
Copy link
Contributor

@gbouv gbouv commented Aug 11, 2023

Description

This change adds the possibility to configure a subfolder inside an S3 bucket, to avoid having to spin up an entire bucket for hyperlane.

Drive-by changes

Nothing

Related issues

None, chatted about it on Slack with @nambrot

Backward compatibility

Yes

I made the field optional in the RawCheckpointSyncerConf so that current config are still valid and will continue to read/write at the root of the bucket. That being said, I'm new to this code so I hope I got it right

Testing

None

@nambrot
Copy link
Contributor

nambrot commented Aug 11, 2023

Thanks for the PR @gbouv !

This is a great start, but I believe it's a bit more complicated than this:

And then obviously we need to make sure that previous announcements without a folder continue to work, might be a good test case for y'all

@codecov
Copy link

codecov bot commented Aug 11, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (c402185) 64.50% compared to head (a83aa6e) 64.50%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2647   +/-   ##
=======================================
  Coverage   64.50%   64.50%           
=======================================
  Files          91       91           
  Lines        1386     1386           
  Branches      185      185           
=======================================
  Hits          894      894           
  Misses        485      485           
  Partials        7        7           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@nambrot nambrot left a comment

Choose a reason for hiding this comment

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

Actually nvm, i misinterpreted the code. I do think folder makes more sense as an option, but pending @tkporter or @mattiecnvr 's approval, lgtm

Copy link
Collaborator

@tkporter tkporter left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, agree this is useful! I think it'd be nice to move to folder: Option<String>

rust/hyperlane-base/src/types/checkpoint_syncer.rs Outdated Show resolved Hide resolved
@gbouv
Copy link
Contributor Author

gbouv commented Aug 21, 2023

BTW @nambrot I tested this with Kurtosis and it seems to work for both cases where folder is specified or left empty

@gbouv
Copy link
Contributor Author

gbouv commented Aug 21, 2023

@tkporter in my last commit I make folder and Option<String> so that you can see what it looks like. If you prefer it this way, I'll keep it, otherwise I'll revert it. Let me know what you think :)

Copy link
Collaborator

@tkporter tkporter left a comment

Choose a reason for hiding this comment

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

Lgtm, thank you!

@gbouv
Copy link
Contributor Author

gbouv commented Aug 22, 2023

@tkporter @nambrot can you help merging this one? I am not authorized to press the merge button

@nambrot nambrot enabled auto-merge (squash) August 23, 2023 16:33
auto-merge was automatically disabled August 24, 2023 07:50

Head branch was pushed to by a user without write access

@nambrot nambrot enabled auto-merge (squash) August 25, 2023 19:07
auto-merge was automatically disabled August 28, 2023 08:17

Head branch was pushed to by a user without write access

@nambrot nambrot merged commit 478826b into hyperlane-xyz:main Aug 28, 2023
20 of 24 checks passed
@gbouv gbouv deleted the gbouv/s3-bucket-subfolder branch August 28, 2023 15:00
@mattiekat
Copy link
Contributor

mattiekat commented Aug 28, 2023

Hi, I just saw this during a merge conflict. I have added this change to the schema in #2687 but this should not have been approved and represents an almost immediate divergence from the defined schema and parser support.

mattiekat pushed a commit that referenced this pull request Aug 28, 2023
…2647)

### Description

This change adds the possibility to configure a subfolder inside an S3
bucket, to avoid having to spin up an entire bucket for hyperlane.

### Drive-by changes

Nothing

### Related issues

None, chatted about it on Slack with @nambrot

### Backward compatibility

Yes

I made the field optional in the `RawCheckpointSyncerConf` so that
current config are still valid and will continue to read/write at the
root of the bucket. That being said, I'm new to this code so I hope I
got it right

### Testing

None

---------

Co-authored-by: Nam Chu Hoai <nambrot@googlemail.com>

(cherry picked from commit 478826b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants