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

chore: update usage of minio admin library #28

Merged
merged 2 commits into from
Jan 21, 2025
Merged

chore: update usage of minio admin library #28

merged 2 commits into from
Jan 21, 2025

Conversation

louisruch
Copy link
Contributor

Update's Boundary's usage of the madmin-go library, please note the madmin package created in this PR will be tagged and updated after this is merged, at that point we can update ci to run madmin tests as well.

@louisruch louisruch requested a review from a team as a code owner January 16, 2025 15:26
@louisruch louisruch requested review from hugoghx and elimt January 16, 2025 15:26
go.mod Show resolved Hide resolved
go.mod Show resolved Hide resolved
Comment on lines +109 to +111
// Get sha256 for request header
sum := sha256.Sum256(nil)
req.Header.Set("X-Amz-Content-Sha256", hex.EncodeToString(sum[:]))
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need to set the header even though it's nil?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes the minio server still expects the sha to be set correctly even with nil content

Copy link
Member

@elimt elimt left a comment

Choose a reason for hiding this comment

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

Apart from my minor comment LGTM. I'll leave it to Hugo to validate the minio specific functionality

Copy link
Contributor

@hugoghx hugoghx left a comment

Choose a reason for hiding this comment

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

:shipit:

@hugoghx
Copy link
Contributor

hugoghx commented Jan 21, 2025

(I wasn't able to try this in actual Boundary -- I got an error when trying to import the plugin: github.com/hashicorp/boundary-plugin-minio/madmin: github.com/hashicorp/boundary-plugin-minio/madmin@v0.0.0-00010101000000-000000000000: invalid version: unknown revision 000000000000 probably due to the fact that we don't yet have this tagged)

Interesting that go mod didn't seem to follow the replace directive we have.

I'll test the functionality once this gets merged & tagged

@louisruch louisruch merged commit c9e9377 into main Jan 21, 2025
2 checks passed
@louisruch louisruch deleted the louis-api branch January 21, 2025 17:45
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