Comments (3)
We should detect browser-side env vars to be interpolated and, before validating backend-side, ask for test values to be used in the backend validation.
from otelbin.
Based on open-telemetry/opentelemetry-collector#4742, when validating backend-side, in the frontend we need to:
-
Detect
\${([a-zA-Z_]+:)?([^}]+)}
and\$[a-zA-Z_][a-zA-Z0-9_]*
sequences. -
Check whether the first matching group in
\${([a-zA-Z_]+:)?([^}]+)}
is not the empty string, and therefore it is a configuration resolver prefix. If we do find a configuration resolver prefix, and it isenv:
, the second capture group denotes an environment variable name. Other prefixes, likefile:
, need to raise an error that disables backend validation, as we won't be able to resolve the values server-side.
Given the list of environment variable names found with the steps above, we need to prompt the user for input before any backend validation can occur. I do not see a meaningful and practical way of proposing default values at this stage.
As a note about other configuration providers (e.g., file:
): while they will prevent any validation from succeeding, by disabling validation, we are giving up on catch other errors before we get stuck on the unresolvable config. However, the UX would be consistent, and it seems like the better trade-off.
from otelbin.
@mmanciop opened the issue
from otelbin.
Related Issues (20)
- False positive for config validation HOT 2
- Monaco not loading with Pi-Hole Common Setup HOT 2
- Detect cycles in connectors when using browser-only validation
- Improve error reporting for distro validation HOT 1
- Support better configuration encoding strategies for the URL HOT 1
- OTelBin crashes when the name of a pipeline component is a number
- Mobile Support
- Pasting content in the editor moves the cursor
- Run time errors when editing the YAML config
- Splunk OTel Distribution HOT 1
- www.otelbin.io Editor does not work HOT 3
- Any way to display in "light mode" HOT 2
- Collector Version Selection Dropdown cut off at top
- Connector visualization issue HOT 1
- Missing icons in some processors HOT 1
- How to try adding a new distribution without the AWS dependency? HOT 2
- Support pasting of structured configuration of the OTel collector CRD
- Bug: endpoint: 0.0.0.0 causes app error HOT 2
- Remove validation false positive for debug exporter
- Backend validation fails with semantic branch names
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from otelbin.