Conversation
A job resource key like `producer_` deploys fine, but the reference regex
(libs/dyn/dynvar/ref.go) requires every path segment to end in a letter or
digit, so `${resources.jobs.producer_.id}` is not recognized as a reference.
In an int field it is silently dropped with only a warning rather than
resolving or erroring. Documented as a Badness test for now.
Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
Integration test reportCommit: b212705
Top 3 slowest tests (at least 2 minutes):
|
A resource key ending in an underscore (e.g. `my_job_`) is valid and
deployable, but the reference regex rejected it, so `${resources.jobs.my_job_.id}`
was silently dropped instead of resolving. Allow a trailing underscore (not a
trailing hyphen) in both the Go and Python regexes, kept in sync via
reference_vectors.json.
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Allow a trailing underscore (but not a trailing hyphen) in
${...}reference path segments, in both the Go regex (libs/dyn/dynvar/ref.go) and Python's_base_var_def, kept in sync viareference_vectors.json.Why
A resource key ending in an underscore (e.g.
my_job_) deploys fine, but the reference regex rejected it, so${resources.jobs.my_job_.id}was silently dropped (a warning, then an unset field) rather than resolving. Trailing hyphens and leading digits stay rejected — the former to keep the dot-separated grammar unambiguous, the latter because Terraform rejects such keys anyway.Tests
acceptance/bundle/resource_deps/trailing_underscore_key_referencenow shows the reference resolving; added parity vectors for the allowed trailing-underscore and still-rejected trailing-hyphen cases.This pull request and its description were written by Isaac.