Skip to content

snaprepoapi: Add PathStyleAccess field to S3Config#426

Merged
gigerdo merged 2 commits into
elastic:masterfrom
pascal-hofmann:feat/add-path-style-access-to-s3-config
Mar 30, 2023
Merged

snaprepoapi: Add PathStyleAccess field to S3Config#426
gigerdo merged 2 commits into
elastic:masterfrom
pascal-hofmann:feat/add-path-style-access-to-s3-config

Conversation

@pascal-hofmann

@pascal-hofmann pascal-hofmann commented Mar 29, 2023

Copy link
Copy Markdown
Contributor

Description

Add the missing PathStyleAccess field to the struct S3Config which is used for configuring S3 snapshot repositories.
See also https://www.elastic.co/guide/en/elasticsearch/reference/current/repository-s3.html#repository-s3-client

Also updates the outdated link to the Elasticsearch official documentation.

Related Issues

#425

Motivation and Context

This allows creating S3 snapshot repositories that talk to S3 backends which require path style access.

How Has This Been Tested?

Ran unit tests and tested against the ECE API.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (improves code quality but has no user-facing effect)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation

Readiness Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Note: I have issues with make format and make lint. I think this happens because bin/golangci-lint is very old.

WARN [runner] Can't run linter goanalysis_metalinter: S1031: failed prerequisites: [(inspect@github.com/elastic/cloud-sdk-go/pkg/multierror, isgenerated@github.com/elastic/cloud-sdk-go/pkg/multierror): analysis skipped: errors in package: [/Users/pascal/gec/cloud-sdk-go/pkg/multierror/format.go:21:2: could not import bytes (/usr/local/Cellar/go/1.20.2/libexec/src/bytes/buffer.go:10:2: could not import errors (/usr/local/Cellar/go/1.20.2/libexec/src/errors/wrap.go:8:2: could not import internal/reflectlite (/usr/local/Cellar/go/1.20.2/libexec/src/internal/reflectlite/swapper.go:8:2: could not import internal/goarch (-: could not load export data: cannot import "internal/goarch" (unknown bexport format version -1 …

@pascal-hofmann pascal-hofmann marked this pull request as ready for review March 29, 2023 05:52
@pascal-hofmann pascal-hofmann requested a review from a team as a code owner March 29, 2023 05:52
@pascal-hofmann

pascal-hofmann commented Mar 30, 2023

Copy link
Copy Markdown
Contributor Author

I just verified that this is working via a modified version of terraform-provider-ec that talks to our internal ECE instance.

@tobio, @gigerdo: Can you have a look at this? Would be great to get this merged/released quickly.

@gigerdo gigerdo requested a review from a team March 30, 2023 09:01

@gigerdo gigerdo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for opening the PR

LGTM 👍

I can probably put this into a quick v1.12.1 release.

@gigerdo

gigerdo commented Mar 30, 2023

Copy link
Copy Markdown
Member

To merge you need to sign your commits (https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits)

Add the missing `PathStyleAccess` field to the struct `S3Config` which is
used for configuring S3 snapshot repositories.

Also updates the outdated link to the Elasticsearch official
documentation.
@pascal-hofmann pascal-hofmann force-pushed the feat/add-path-style-access-to-s3-config branch from bef0b4d to 04a9ffc Compare March 30, 2023 11:42
@pascal-hofmann

Copy link
Copy Markdown
Contributor Author

To merge you need to sign your commits (https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits)

This is fixed now.

@gigerdo gigerdo merged commit 0254b2d into elastic:master Mar 30, 2023
@gigerdo

gigerdo commented Mar 30, 2023

Copy link
Copy Markdown
Member

Btw. regarding the lint issues: It is indeed due to the old versions used. It still works when using an older go version (1.16 for example). We will have to update the go version and libraries to more recent ones.

gigerdo pushed a commit to gigerdo/cloud-sdk-go that referenced this pull request Mar 30, 2023
Add the missing `PathStyleAccess` field to the struct `S3Config` which is
used for configuring S3 snapshot repositories.

Also updates the outdated link to the Elasticsearch official
documentation.

(cherry picked from commit 0254b2d)
@gigerdo

gigerdo commented Mar 30, 2023

Copy link
Copy Markdown
Member

💚 All backports created successfully

Status Branch Result
1.12

Questions ?

Please refer to the Backport tool documentation

gigerdo added a commit that referenced this pull request Mar 30, 2023
Add the missing `PathStyleAccess` field to the struct `S3Config` which is
used for configuring S3 snapshot repositories.

Also updates the outdated link to the Elasticsearch official
documentation.

(cherry picked from commit 0254b2d)

Co-authored-by: Pascal Hofmann <mail@pascalhofmann.de>
@pascal-hofmann pascal-hofmann deleted the feat/add-path-style-access-to-s3-config branch March 30, 2023 15:08
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.

2 participants