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

Feature/patch gazelle and remove aws sdk replacements #109

Conversation

stagnation
Copy link
Collaborator

@stagnation stagnation commented Nov 23, 2023

We want the patches for gazelle to work with the 'aws-sdk' modules used
by 'bb-storage'. Otherwise version resolution becomes much more
tedious, with internal libraries used across the modules having
incorrect references.

One example problem is the s3 target, which fails here but succeeds in
'bb-storage', with the gazelle patches.

    ERROR: /.../external/com_github_aws_aws_sdk_go_v2_service_s3
    /BUILD.bazel:3:11: no such target '@com_github_aws_aws_sdk_go_v2_internal_endpoints_v2//:awsrulesfn': tar
    get 'awsrulesfn' not declared in package '' defined by /CAS/bazel-cache/f1a15cfb78ca8fde7615be5d21224669/
    external/com_github_aws_aws_sdk_go_v2_internal_endpoints_v2/BUILD.bazel (Tip: use `query "@com_github_aws
    _aws_sdk_go_v2_internal_endpoints_v2//:*"` to see all the targets in that package) and referenced by '@co
    m_github_aws_aws_sdk_go_v2_service_s3//:s3'

The difference in build files and dependencies:

    bb-storage $ bazel query 'deps(@com_github_aws_aws_sdk_go_v2_service_s3//:s3, 1)' \
        | grep awsrulesfn
    go_library rule @com_github_aws_aws_sdk_go_v2//internal/endpoints/awsrulesfn:awsrulesfn

    bb-deployments $ bazel query --output=build @com_github_aws_aws_sdk_go_v2_service_s3//:s3 \
        | linebreak-commas \
        | grep awsrulesfn
    "@com_github_aws_aws_sdk_go_v2_internal_endpoints_v2//:awsrulesfn",

@stagnation stagnation force-pushed the feature/patch-gazelle-and-remove-AWS-SDK-replacements branch from 5737e58 to 3faca34 Compare November 23, 2023 09:09
WORKSPACE Outdated
git_repository(
name = "com_github_buildbarn_bb_storage_patches",
remote = "https://github.com/buildbarn/bb-storage",
commit = "ece87ab6dc2a9e1e592d2032f5a02c3694765cfc",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is now something we need to manage. :(

Copy link
Collaborator

Choose a reason for hiding this comment

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

Should http_archive be used to download a source archive instead? If not, I'm happy for you to merge the PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point! http_archive is better :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@stagnation stagnation force-pushed the feature/patch-gazelle-and-remove-AWS-SDK-replacements branch 3 times, most recently from cc8937f to a24a119 Compare November 23, 2023 09:46
We want the patches for gazelle to work with the 'aws-sdk' modules used
by 'bb-storage'. Otherwise version resolution becomes much more
tedious, with internal libraries used across the modules having
incorrect references.

One example problem is the s3 target, which fails here but succeeds in
'bb-storage', with the gazelle patches.

    ERROR: /.../external/com_github_aws_aws_sdk_go_v2_service_s3
    /BUILD.bazel:3:11: no such target '@com_github_aws_aws_sdk_go_v2_internal_endpoints_v2//:awsrulesfn': tar
    get 'awsrulesfn' not declared in package '' defined by /CAS/bazel-cache/f1a15cfb78ca8fde7615be5d21224669/
    external/com_github_aws_aws_sdk_go_v2_internal_endpoints_v2/BUILD.bazel (Tip: use `query "@com_github_aws
    _aws_sdk_go_v2_internal_endpoints_v2//:*"` to see all the targets in that package) and referenced by '@co
    m_github_aws_aws_sdk_go_v2_service_s3//:s3'

The difference in build files and dependencies:

    bb-storage $ bazel query 'deps(@com_github_aws_aws_sdk_go_v2_service_s3//:s3, 1)' \
        | grep awsrulesfn
    go_library rule @com_github_aws_aws_sdk_go_v2//internal/endpoints/awsrulesfn:awsrulesfn

    bb-deployments $ bazel query --output=build @com_github_aws_aws_sdk_go_v2_service_s3//:s3 \
        | linebreak-commas \
        | grep awsrulesfn
    "@com_github_aws_aws_sdk_go_v2_internal_endpoints_v2//:awsrulesfn",
@stagnation stagnation force-pushed the feature/patch-gazelle-and-remove-AWS-SDK-replacements branch from a24a119 to f4b0364 Compare November 24, 2023 09:16
@moroten moroten merged commit c46b2cc into buildbarn:master Nov 30, 2023
1 check passed
@stagnation stagnation deleted the feature/patch-gazelle-and-remove-AWS-SDK-replacements branch November 30, 2023 13:16
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