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

[exporter/instana] Add tests for explicit CA file #14750

Merged
merged 16 commits into from
Nov 29, 2022

Conversation

willianpc
Copy link
Contributor

Description: Added a new exporter option ca_file which expects a certificate file.

Link to tracking Issue: #14602

Testing: We tested the new option in a compiled collector against a self CA signed server. Unit tests to check the exporter configurations were also added, eg: if the file is found, a mocked self signed server to confirm that the new option works as intended.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 6, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@willianpc willianpc marked this pull request as ready for review October 10, 2022 09:14
@willianpc willianpc requested review from a team and jpkrohling as code owners October 10, 2022 09:14
Copy link
Contributor

@hickeyma hickeyma left a comment

Choose a reason for hiding this comment

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

@willianpc thank you for pushing this enablement. I have some feedback inline.

.chloggen/instana-cafile-config-option.yaml Outdated Show resolved Hide resolved
exporter/instanaexporter/README.md Outdated Show resolved Hide resolved
exporter/instanaexporter/README.md Outdated Show resolved Hide resolved
exporter/instanaexporter/exporter.go Outdated Show resolved Hide resolved
exporter/instanaexporter/exporter.go Outdated Show resolved Hide resolved
exporter/instanaexporter/exporter.go Outdated Show resolved Hide resolved
exporter/instanaexporter/factory_test.go Outdated Show resolved Hide resolved
@sweetxiaodai
Copy link

Just for asking, if you don’t mind, we’d like to use the latest build to test new features. @hickeyma

Copy link
Contributor

@hickeyma hickeyma left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @willianpc.

@hickeyma
Copy link
Contributor

hickeyma commented Oct 11, 2022

Just for asking, if you don’t mind, we’d like to use the latest build to test new features

@sweetxiaodai If you can that would be great. It would help verify your issue. When I use it that way, I'd fetch the branch and reference the exporter dependency from the filesystem.

@sweetxiaodai
Copy link

@hickeyma may I have the branch name?

@hickeyma
Copy link
Contributor

may I have the branch name?

@sweetxiaodai You would need to fetch the PR into a branch similar to the following: git fetch origin pull/14750/head:inst-exp-cafile . Then you could checkout the branch, for example: git checkout inst-exp-cafile

@hickeyma
Copy link
Contributor

/cc @jpkrohling for review

exporter/instanaexporter/config.go Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Nov 17, 2022
@github-actions github-actions bot removed the Stale label Nov 19, 2022
@willianpc
Copy link
Contributor Author

Hi @jpkrohling just a friendly reminder to review the PR with the requested changes :)

TIA,
_ Willian

@jpkrohling
Copy link
Member

Sorry for taking so long to review this, I had several events one after the other. I should be more responsive going forward (until the next wave of events).

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.

Removing the changelog would make this complete. Note that there are no code changes as part of this PR, only new tests (which is a good thing).

@@ -0,0 +1,11 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
Copy link
Member

Choose a reason for hiding this comment

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

There are no user-visible changes now, only new tests. Therefore, we don't need a changelog entry.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, @jpkrohling . I removed the changelog file

@jpkrohling jpkrohling changed the title [exporter/instanaexporter] Added ca_cert config option [exporter/instanaexporter] Add tests for explicit CA file Nov 25, 2022
@jpkrohling jpkrohling changed the title [exporter/instanaexporter] Add tests for explicit CA file [exporter/instana] Add tests for explicit CA file Nov 25, 2022
@jpkrohling jpkrohling added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Nov 28, 2022
@jpkrohling
Copy link
Member

Looks like there's a linting failure:

Error: factory_test.go: Import groups are not in the proper order: ["Std" "Third party" "Third party"]
make[2]: *** [../../Makefile.Common:131: impi] Error 1
make[1]: *** [Makefile:188: exporter/instanaexporter] Error 2
make[1]: *** Waiting for unfinished jobs....

impi verification failed: Found 1 errors
make[2]: Leaving directory '/home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/exporter/instanaexporter'

@jpkrohling
Copy link
Member

Now there seems to be some merge conflicts.

@willianpc
Copy link
Contributor Author

Now there seems to be some merge conflicts.

oh, that makes sense, because the other PR was merged into main :D

@jpkrohling
Copy link
Member

CI seems to be failing:

Error: factory_test.go: Import groups are not in the proper order: ["Std" "Third party" "Third party"]
make[2]: *** [../../Makefile.Common:144: impi] Error 1
make[1]: *** [Makefile:188: exporter/instanaexporter] Error 2

@hickeyma
Copy link
Contributor

hickeyma commented Nov 29, 2022

CI seems to be failing:
Error: factory_test.go: Import groups are not in the proper order: ["Std" "Third party" "Third party"]
make[2]: *** [../../Makefile.Common:144: impi] Error 1
make[1]: *** [Makefile:188: exporter/instanaexporter] Error 2

@willianpc Remove this empty line in the import in

This should pass listing then.

@jpkrohling jpkrohling merged commit 5b552ef into open-telemetry:main Nov 29, 2022
shalper2 pushed a commit to shalper2/opentelemetry-collector-contrib that referenced this pull request Dec 6, 2022
* Added new config option ca_file

* added extra tests

* added chloggen file

* updated README.md

* provided right config name for the test

* applied requested changes

* using the collector CA utilities instead of our own

* Updated README.md

* removed unnecessary tls config

* removed changelog

* fixed deprecated method call

* removed line between imported packages
@plantfansam plantfansam mentioned this pull request Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exporter/instana Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants