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

Environment variables replacement for agent config #263

Merged
merged 19 commits into from
Dec 11, 2020

Conversation

varas
Copy link
Contributor

@varas varas commented Dec 11, 2020

Replacement of env-vars for agent config file using double curly braces {{ ENV_VAR }} .

Env-vars replacement happens before YAML is parsed or databind is run.

@varas varas requested a review from a team December 11, 2020 11:30
@varas varas changed the base branch from master to feat_databind-cfg December 11, 2020 11:33
@varas varas changed the title fix evn vars replacement Environment variables replacement Dec 11, 2020
@coveralls
Copy link

Pull Request Test Coverage Report for Build 415290193

  • 31 of 35 (88.57%) changed or added relevant lines in 1 file are covered.
  • 331 unchanged lines in 12 files lost coverage.
  • Overall coverage increased (+0.1%) to 58.164%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/config/loader/config.go 31 35 88.57%
Files with Coverage Reduction New Missed Lines %
internal/agent/event_sender_vortex.go 1 73.21%
pkg/config/defaults.go 1 66.67%
pkg/metrics/sampler/sampler_routine.go 2 94.74%
pkg/integrations/v4/logs/cfg_watcher.go 4 67.5%
pkg/helpers/network/network_helpers.go 12 65.85%
pkg/integrations/v4/emitter/emitter.go 15 58.33%
pkg/plugins/http_server.go 21 62.9%
pkg/plugins/plugins_linux.go 24 0%
internal/plugins/linux/hostinfo.go 27 12.14%
internal/integrations/v4/integration/integration.go 52 52.56%
Totals Coverage Status
Change from base Build 405458512: 0.1%
Covered Lines: 11388
Relevant Lines: 19579

💛 - Coveralls

@coveralls
Copy link

Pull Request Test Coverage Report for Build 415290193

  • -4 of 35 (88.57%) changed or added relevant lines in 1 file are covered.
  • 324 unchanged lines in 9 files lost coverage.
  • Overall coverage increased (+0.1%) to 58.195%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/config/loader/config.go 31 35 88.57%
Files with Coverage Reduction New Missed Lines %
pkg/config/defaults.go 1 66.67%
pkg/helpers/network/network_helpers.go 12 65.85%
pkg/integrations/v4/emitter/emitter.go 15 58.33%
pkg/plugins/http_server.go 21 62.9%
pkg/plugins/plugins_linux.go 24 0%
internal/plugins/linux/hostinfo.go 27 12.14%
internal/integrations/v4/integration/integration.go 52 52.56%
cmd/newrelic-infra/newrelic-infra.go 58 7.49%
pkg/config/config.go 114 70.71%
Totals Coverage Status
Change from base Build 405458512: 0.1%
Covered Lines: 11394
Relevant Lines: 19579

💛 - Coveralls

@coveralls
Copy link

coveralls commented Dec 11, 2020

Pull Request Test Coverage Report for Build 415840490

  • 31 of 35 (88.57%) changed or added relevant lines in 1 file are covered.
  • 6 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.09%) to 58.164%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/config/loader/config.go 31 35 88.57%
Files with Coverage Reduction New Missed Lines %
pkg/integrations/v4/logs/cfg_watcher.go 6 65.0%
Totals Coverage Status
Change from base Build 415825490: 0.09%
Covered Lines: 11388
Relevant Lines: 19579

💛 - Coveralls

carlosroman
carlosroman previously approved these changes Dec 11, 2020
Copy link
Contributor

@carlosroman carlosroman left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏼

Base automatically changed from feat_databind-cfg to master December 11, 2020 16:27
@varas varas dismissed carlosroman’s stale review December 11, 2020 16:27

The base branch was changed.

@varas varas changed the title Environment variables replacement Environment variables replacement for agent config Dec 11, 2020
@varas varas merged commit 1179761 into master Dec 11, 2020
@varas varas deleted the fix_evn-vars-replacement branch December 11, 2020 16:52
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.

None yet

3 participants