GithubHelp home page GithubHelp logo

Comments (3)

mmanciop avatar mmanciop commented on May 30, 2024 1

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.

mmanciop avatar mmanciop commented on May 30, 2024 1

Based on open-telemetry/opentelemetry-collector#4742, when validating backend-side, in the frontend we need to:

  1. Detect \${([a-zA-Z_]+:)?([^}]+)} and \$[a-zA-Z_][a-zA-Z0-9_]* sequences.

  2. 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 is env:, the second capture group denotes an environment variable name. Other prefixes, like file:, 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.

roshan-gh avatar roshan-gh commented on May 30, 2024

@mmanciop opened the issue

from otelbin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.