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

Documentation: Explain --config.expand-env=true double slash with slash substitution #6139

Merged
merged 2 commits into from
May 31, 2022

Conversation

V-Mann-Nick
Copy link
Contributor

@V-Mann-Nick V-Mann-Nick commented May 10, 2022

What this PR does / why we need it:

When I was configuring Promtail to use a regex stage I escaped slashes in regular expressions when using double quotes in yaml files. But no where did it explain that when using the option --config.expand-env=true the program envsubst would replace double slashes with slashes. I found the issue #3635 to find out this is behavior as expected. While I accept this, I thought it would be useful to warn the next person about just this case.

Adds two paragraphs to the Promtail configuration docs:

  • in docs/sources/clients/promtail/configuration.md: use double slashes for single slashes when using expand-env=true
  • in docs/sources/clients/promtail/stages/regex.md: explained again as it's more likely to use back slashes in regex

Which issue(s) this PR fixes:

Although already closed it's related to the following: Fixes #3635

Checklist

  • Documentation added
  • Tests updated
  • Is this an important fix or new feature? Add an entry in the CHANGELOG.md.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/upgrading/_index.md

@CLAassistant
Copy link

CLAassistant commented May 10, 2022

CLA assistant check
All committers have signed the CLA.

@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0%

Copy link
Contributor

@kavirajk kavirajk left a comment

Choose a reason for hiding this comment

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

thanks @V-Mann-Nick 👍 LGTM. Added one small suggestion with linking reference.

docs/sources/clients/promtail/stages/regex.md Outdated Show resolved Hide resolved
docs/sources/clients/promtail/configuration.md Outdated Show resolved Hide resolved
Co-authored-by: Kaviraj Kanagaraj <kavirajkanagaraj@gmail.com>
@V-Mann-Nick
Copy link
Contributor Author

Thanks for the suggestions @kavirajk. Didn't know that. I committed them.

@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0%

Copy link
Contributor

@kavirajk kavirajk left a comment

Choose a reason for hiding this comment

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

Thanks @V-Mann-Nick LGTM

@kavirajk kavirajk merged commit 6922190 into grafana:main May 31, 2022
@osg-grafana osg-grafana added type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories and removed area/docs labels Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories
Projects
None yet
6 participants