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

Add support for S3 as storage backend #207

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mikberg
Copy link
Contributor

@mikberg mikberg commented Feb 14, 2024

Finally starting to use this project for real again!

Adds support for S3 as storage backend.

Defaults to discovering parameters beyond bucket name and workdir using the AWS config package's LoadDefaultConfig(), which I think is the least surprising way of discovering credentials.

This prerelease seems to work nicely: https://github.com/mikberg/bazel-snapshots/releases/tag/v0.13.0-alpha.1

🚀

@psalaberria002
Copy link
Collaborator

Welcome 🚀

We need to run gazelle-update-repos for non bzlmod support.

Looks good otherwise.

@psalaberria002
Copy link
Collaborator

diff --git snapshots/dependencies.bzl snapshots/dependencies.bzl
index 62697a0..570cfe3 100644
--- snapshots/dependencies.bzl
+++ snapshots/dependencies.bzl
@@ -59,6 +59,15 @@ def go_dependencies():
     )
     go_repository(
         name = "com_github_aws_aws_sdk_go_v2",
+        build_directives = [
+            "gazelle:go_visibility @com_github_aws_aws_sdk_go_v2//:__subpackages__",
+            "gazelle:go_visibility @com_github_aws_aws_sdk_go_v2_feature_s3_manager//:__subpackages__",
+            "gazelle:go_visibility @com_github_aws_aws_sdk_go_v2_service_s3//:__subpackages__",
+            "gazelle:go_visibility @com_github_aws_aws_sdk_go_v2_service_internal_s3shared//:__subpackages__",
+            "gazelle:go_visibility @com_github_aws_aws_sdk_go_v2_credentials//:__subpackages__",
+            "gazelle:go_visibility @com_github_aws_aws_sdk_go_v2_service_sso//:__subpackages__",
+            "gazelle:go_visibility @com_github_aws_aws_sdk_go_v2_service_sts//:__subpackages__",
+        ],
         build_file_proto_mode = "disable_global",
         importpath = "github.com/aws/aws-sdk-go-v2",
         sum = "h1:+dCJ5W2HiZNa4UtaIc5ljKNulm0dK0vS5dxb5LdDOAA=",
@@ -87,6 +96,9 @@ def go_dependencies():
     )
     go_repository(
         name = "com_github_aws_aws_sdk_go_v2_internal_ini",
+        build_directives = [
+            "gazelle:go_visibility @com_github_aws_aws_sdk_go_v2_config//:__subpackages__",
+        ],
         build_file_proto_mode = "disable_global",
         importpath = "github.com/aws/aws-sdk-go-v2/internal/ini",
         sum = "h1:zPxLGWALExNepElO0gYgoqsbqTlt4ZCrhZ7XlfJ+Qlw=",
@@ -94,6 +106,9 @@ def go_dependencies():
     )
     go_repository(
         name = "com_github_aws_aws_sdk_go_v2_service_internal_accept_encoding",
+        build_directives = [
+            "gazelle:go_visibility @com_github_aws_aws_sdk_go_v2_service_s3//:__subpackages__",
+        ],
         build_file_proto_mode = "disable_global",
         importpath = "github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding",
         sum = "h1:EtQ6hVAgNsWTiO+u9e+ziaEYyOAlEkAwLskpL40U6pQ=",
@@ -101,6 +116,10 @@ def go_dependencies():
     )
     go_repository(
         name = "com_github_aws_aws_sdk_go_v2_service_internal_presigned_url",
+        build_directives = [
+            "gazelle:go_visibility @com_github_aws_aws_sdk_go_v2_service_sts//:__subpackages__",
+            "gazelle:go_visibility @com_github_aws_aws_sdk_go_v2_service_s3//:__subpackages__",
+        ],
         build_file_proto_mode = "disable_global",
         importpath = "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url",
         sum = "h1:/T5wKsw/po118HEDvnSE8YU7TESxvZbYM2rnn+Oi7Kk=",
@@ -108,6 +127,9 @@ def go_dependencies():
     )
     go_repository(
         name = "com_github_aws_aws_sdk_go_v2_service_internal_s3shared",
+        build_directives = [
+            "gazelle:go_visibility @com_github_aws_aws_sdk_go_v2_service_s3//:__subpackages__",
+        ],
         build_file_proto_mode = "disable_global",
         importpath = "github.com/aws/aws-sdk-go-v2/service/internal/s3shared",
         sum = "h1:j1JV89mkJP4f9cssTWbu+anj3p2v+UWMA7qERQQqMkM=",

for the non bzlmod deps.

We need to apply the same patched to the deps in MODULE.bazel

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