Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As motivated earlier, this follows the same specification as Spring.

Implementation Notes

Environment variables are evaluated lazily when the configuration option is requested. This is necessary as during parsing of the file there is no global knowledge of supported keys, and eagerly looking up all of them would likely lead to many unnecessary lookups. It is thus proposed to make use of Configuration#getRawValue to intercept querying a configuration parameter and perform the lookups described earlier. If a match is found, it should be cached such that further queries against the same key do not cause additional lookups.

Since Configuration used for various configurations and not just the Flink configuration, it should receive a flag which defines that environment lookups are to be done (disabled by default, enabled only in GlobalConfiguration).

Compatibility, Deprecation, and Migration Plan

No impact on existing users is expected. Hypothetically, if the environment happens to include a variable with a matching name, this change would cause a change in behavior. We consider this risk to be negligibly low, however.

Test Plan

Describe in few sentences how the FLIP will be tested. We are mostly interested in system tests (since unit-tests are specific to implementation details). How will we know that the implementation works as expected? How will we know nothing broke?This feature can be covered entirely through unit-tests against Configuration .

Rejected Alternatives

Initially, we also discussed a substitution solution where users modify their Flink configuration to use an environment variable substitution syntax such as 

...