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

[v14] Allow typical parsers to optionally support dynamic values #39890

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

rosstimothy
Copy link
Contributor

Backport #39765 to branch/v14

Provides an opt-in mechanism to allow parsers to support dynamically
resolving variables at runtime. While this defeats some of the
static compile type benefits that typical guarantees, it is required
to allow existing parsers to be converted to use typical.

The existing resource parsers allow searching for variabls by their
fully qualified path. For example, the hostname of a server may
be quiered via `resource.spec.hostname`. In order to support this
typical could use some reflection to automatically add variables
to every nested field but that would be complicated and expensive.

Instead the ParserSpec can now be configured with
`GetUnknownIdentifier`, which allows creators of the parsers to
have full control over how a dynamic variable is resolved. The
parser prevents any dynamic resolution if the value is not configured
to limit the unsafe behvior to only parsers that explicitly opt in.
@rosstimothy rosstimothy added backport no-changelog Indicates that a PR does not require a changelog entry labels Mar 27, 2024
@rosstimothy rosstimothy marked this pull request as ready for review March 27, 2024 15:12
@rosstimothy rosstimothy requested a review from zmb3 March 28, 2024 13:06
@rosstimothy rosstimothy enabled auto-merge March 28, 2024 13:07
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from nklaassen March 28, 2024 14:38
@rosstimothy rosstimothy added this pull request to the merge queue Mar 28, 2024
Merged via the queue into branch/v14 with commit 0929b20 Mar 28, 2024
29 checks passed
@rosstimothy rosstimothy deleted the tross/backport-39765/v14 branch March 28, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport no-changelog Indicates that a PR does not require a changelog entry size/md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants