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 basicauth extension to contrib distribution #62

Merged
merged 2 commits into from
Jan 24, 2022

Conversation

svrakitin
Copy link
Contributor

@@ -13,6 +13,7 @@ extensions:
gomod: go.opentelemetry.io/collector v0.42.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/asapauthextension v0.42.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.42.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension v0.42.0
Copy link
Member

Choose a reason for hiding this comment

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

It doesn't exist at this version though, does it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I temporarily use commit ref like v0.0.0-20220119171801-207f2c3db0f4 or what is the recommended approach for specifying unreleased components?

Copy link
Member

Choose a reason for hiding this comment

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

I think this would be the first case where a component is added to the same version. I think I would prefer to update all versions to something like what you listed (but with v0.42.0-... instead of v0.0.0-...). If you could do it in two commits, it would be great: the first commit updating all existing deps, the second adding the new component.

@codeboten, this should be included for 0.43.0.

Copy link
Contributor Author

@svrakitin svrakitin Jan 19, 2022

Choose a reason for hiding this comment

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

For pseudo-versions I can either use v0.0.0 or v0.42.1-0. It fails for me if I try to specify v0.42.0 like v0.42.0-20220107162206-6a1c2471092b for contrib deps.

I can rename versions to v0.42.1-0.20220119200947-29b515d5d9c0 format if you actually want me to bump them to the latest revision in main.

For basicauth I can only use v0.0.0 as it doesn't have preceding versions, this will change with v0.43.0.

Copy link
Member

Choose a reason for hiding this comment

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

The idea is to be able to replace them all at once. Otherwise, one could miss that one of the modules is at a different version, when they all should have the same by the time it's released. If the only one that works for everything is 0.0.0, then so be it :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Gotcha.

@svrakitin
Copy link
Contributor Author

svrakitin commented Jan 20, 2022

I didn't manage to build any distribution which has contrib revision >= open-telemetry/opentelemetry-collector-contrib@fff0a08 which bumped prometheus deps by few major releases and was right before my change.

Will wait for dependency hell to be resolved in contrib before proceeding. I see there is some action going on. :)

Distributions to build: otelcol,otelcol-contrib
Building: otelcol
Using Builder: /Users/stepanrakitin/bin/ocb
Using Go: /usr/local/bin/go
❌ ERROR: failed to build the distribution 'otelcol'.
🪵 Build logs for 'otelcol'
----------------------
2022-01-20T21:15:39.832+0100    INFO    internal/command.go:82  OpenTelemetry Collector distribution builder    {"version": "0.42.0", "date": "2022-01-07T01:55:32Z"}
2022-01-20T21:15:39.833+0100    INFO    internal/command.go:102 Using config file       {"path": "manifest.yaml"}
2022-01-20T21:15:40.218+0100    INFO    builder/config.go:103   Using go        {"go-executable": "go"}
2022-01-20T21:15:40.218+0100    INFO    builder/main.go:52      You're building a distribution with non-aligned version of the builder. Compilation may fail due to API changes. Please upgrade your builder or API   {"builder-version": "0.42.0"}
2022-01-20T21:15:40.224+0100    INFO    builder/main.go:76      Sources created {"path": "./_build"}
Error: failed to update go.mod: exit status 1. Output: "go: finding module for package github.com/prometheus/prometheus/pkg/relabel\ngo: finding module for package github.com/prometheus/prometheus/pkg/timestamp\ngo: finding module for package github.com/prometheus/prometheus/pkg/value\ngo: finding module for package github.com/prometheus/prometheus/pkg/labels\ngo: finding module for package github.com/prometheus/prometheus/pkg/textparse\ngo: finding module for package github.com/prometheus/prometheus/pkg/exemplar\ngo: found github.com/prometheus/prometheus/pkg/timestamp in github.com/prometheus/prometheus v2.5.0+incompatible\ngo: found github.com/prometheus/prometheus/pkg/value in github.com/prometheus/prometheus v2.5.0+incompatible\ngo: found github.com/prometheus/prometheus/pkg/labels in github.com/prometheus/prometheus v2.5.0+incompatible\ngo: found github.com/prometheus/prometheus/pkg/textparse in github.com/prometheus/prometheus v2.5.0+incompatible\ngo: found github.com/prometheus/prometheus/pkg/relabel in github.com/prometheus/prometheus v2.5.0+incompatible\ngo: finding module for package github.com/prometheus/prometheus/discovery/install\ngo: finding module for package github.com/prometheus/prometheus/pkg/exemplar\ngo: finding module for package github.com/samuel/go-zookeeper/zk\ngo: finding module for package github.com/Azure/azure-sdk-for-go/arm/compute\ngo: finding module for package github.com/Azure/azure-sdk-for-go/arm/network\ngo: found github.com/samuel/go-zookeeper/zk in github.com/samuel/go-zookeeper v0.0.0-20201211165307-7117e9ea2414\ngo: finding module for package github.com/Azure/azure-sdk-for-go/arm/network\ngo: finding module for package github.com/prometheus/prometheus/pkg/exemplar\ngo: finding module for package github.com/prometheus/prometheus/discovery/install\ngo: finding module for package github.com/Azure/azure-sdk-for-go/arm/compute\ngithub.com/open-telemetry/opentelemetry-collector-releases/core imports\n\tgithub.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver imports\n\tgithub.com/prometheus/prometheus/discovery/install: module github.com/prometheus/prometheus@latest found (v2.5.0+incompatible), but does not contain package github.com/prometheus/prometheus/discovery/install\ngithub.com/open-telemetry/opentelemetry-collector-releases/core imports\n\tgithub.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver imports\n\tgithub.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver/internal imports\n\tgithub.com/prometheus/prometheus/pkg/exemplar: module github.com/prometheus/prometheus@latest found (v2.5.0+incompatible), but does not contain package github.com/prometheus/prometheus/pkg/exemplar\ngithub.com/open-telemetry/opentelemetry-collector-releases/core imports\n\tgithub.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver imports\n\tgithub.com/prometheus/prometheus/discovery imports\n\tgithub.com/prometheus/prometheus/discovery/azure imports\n\tgithub.com/Azure/azure-sdk-for-go/arm/compute: module github.com/Azure/azure-sdk-for-go@latest found (v61.3.0+incompatible), but does not contain package github.com/Azure/azure-sdk-for-go/arm/compute\ngithub.com/open-telemetry/opentelemetry-collector-releases/core imports\n\tgithub.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver imports\n\tgithub.com/prometheus/prometheus/discovery imports\n\tgithub.com/prometheus/prometheus/discovery/azure imports\n\tgithub.com/Azure/azure-sdk-for-go/arm/network: module github.com/Azure/azure-sdk-for-go@latest found (v61.3.0+incompatible), but does not contain package github.com/Azure/azure-sdk-for-go/arm/network\n"

@svrakitin
Copy link
Contributor Author

Managed to build both distributions by adding explicit replaces. I guess they can be removed as soon as there is 0.43.0 release.

Copy link
Member

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

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

LGTM, but for the future, we need to figure out a better way to do this.

cc @codeboten

@svrakitin
Copy link
Contributor Author

@jpkrohling The main issue I see are the components which reference other components, e.g. https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/0ae61c5528951ce7ddac72200c6954377f0c1fdc/receiver/prometheusexecreceiver/go.mod#L7 and go.mod not respecting replace directives, leading to incompatibilities.

@jpkrohling jpkrohling merged commit 337b166 into open-telemetry:main Jan 24, 2022
@svrakitin svrakitin deleted the patch-1 branch January 24, 2022 13:54
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