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

Introducing contrib builds #33

Merged
merged 1 commit into from
Nov 8, 2019
Merged

Conversation

owais
Copy link
Contributor

@owais owais commented Nov 7, 2019

Added a makefile with targets to allow building the contrib
distribution.

The contrib distribution includes all components present in the upstream
distribution plus all components present in the contrib repo.

  • Does not include the e2e testbed yet. I'll add that in a follow up PR.
  • Also copies version package from upstream. Need to re-use that.

@owais owais force-pushed the prepare-contrib-builds branch 2 times, most recently from 5c27f89 to e8e388e Compare November 7, 2019 12:51
@owais owais changed the title Introduced contrib builds Introducing contrib builds Nov 7, 2019
Copy link
Contributor

@pjanotti pjanotti left a comment

Choose a reason for hiding this comment

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

LGTM. Please update the description so this automatically closes #17.


FROM scratch
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY otelcontribcol /usr/bin/
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we put OTelCol straight on the root, we should follow a consistent pattern between these two. it can be either one but it should be consistent.

errs := []error{}
factories, err := defaults.Components()
if err != nil {
return factories, err
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

Suggested change
return factories, err
return nil, err

@@ -5,6 +5,9 @@ go 1.12
require (
github.com/client9/misspell v0.3.4
github.com/google/addlicense v0.0.0-20190907113143-be125746c2c4
github.com/open-telemetry/opentelemetry-collector v0.2.1-0.20191016224815-dfabfb0c1d1e
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have this module together with main.go? This will follow the same pattern that we have for individual components.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I was planning on doing it if/when we introduce multiple builds from this repo (protobuf vs gogoproto) but will look into doing it right away. We'll have to keep this go.mod around anyway so this repo can be consumed as a lib easily (stuff other than explicit modules like receivers, exporters).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On second thought, I think we should punt it for now. If we make it a module, it'll not be able to access any internal package from the rest of the repo. The cmd module will by default import code from Github master instead of the local code so local development will be annoying. We can add permanent replace directives but I think there will be more issues. We'll mostly need to update the Makefile, CI and some scritps to supports it. Added a ticket to track it: #35

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good.

"github.com/open-telemetry/opentelemetry-collector/receiver"

"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/stackdriverexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinscribereceiver"
Copy link
Member

Choose a reason for hiding this comment

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

OK. Both of these components have tests for default config and for factory. This should be our minimum bar for accepting components into the build. We can think about having stricter requirements but I believe that's bare minimum.

Copy link
Contributor

Choose a reason for hiding this comment

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

Created #34 to make such requirements explicit.

Makefile Outdated
.PHONY: addlicense-fmt-vet-lint-goimports-misspell-staticcheck-test
addlicense-fmt-vet-lint-goimports-misspell-staticcheck-test: addlicense fmt vet lint goimports misspell staticcheck test

.PHONY: e2e-test
Copy link
Member

Choose a reason for hiding this comment

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

I suggest to remove from makefile for now and add with testbed.

Copy link
Member

Choose a reason for hiding this comment

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

Do you plan to remove this from this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought I did. Checing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like the push go through for some reason.

@owais
Copy link
Contributor Author

owais commented Nov 7, 2019

Thanks for the review @tigrannajaryan @pjanotti and it was closer to 30 mins :) A little over may be.

@owais
Copy link
Contributor Author

owais commented Nov 7, 2019

Of course including the testbed does not count :D

@owais
Copy link
Contributor Author

owais commented Nov 8, 2019

Updated PR

Added a makefile with targets to allow building the contrib
distribution.

The contrib distribution includes all components present in the upstream
distribution plus all components present in the contrib repo.

- Does not include the e2e testbed yet. I'll add that in a follow up PR.
- Also copies version package from upstream. Need to re-use that.

Fixes #17
Copy link
Contributor

@pjanotti pjanotti left a comment

Choose a reason for hiding this comment

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

LGTM

@tigrannajaryan tigrannajaryan merged commit 35bf257 into master Nov 8, 2019
@tigrannajaryan tigrannajaryan deleted the prepare-contrib-builds branch November 8, 2019 17:36
ljmsc referenced this pull request in ljmsc/opentelemetry-collector-contrib Feb 21, 2022
ljmsc referenced this pull request in ljmsc/opentelemetry-collector-contrib Feb 21, 2022
Since these methods are about the span itself rather than specifically
*events* on the span, it makes sense to drop "events" from their names.

[Closes #33]
sky333999 pushed a commit to sky333999/opentelemetry-collector-contrib that referenced this pull request Jul 3, 2023
Retry IMDSV2 Before Falling Back To IMDSV1
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.

3 participants