Repository navigation
[debugger] Add Go repro tests for map lookups, static template errors and missing-key conditions - #8201
Draft
timsee wants to merge 6 commits into
Draft
[debugger] Add Go repro tests for map lookups, static template errors and missing-key conditions#8201timsee wants to merge 6 commits into
timsee wants to merge 6 commits into
Conversation
Contributor
|
|
❌ ErrorsYour PR has failed checks. Please review the issues below and take necessary action before merging. 🚦 24 Pipeline jobs failed
ℹ️ InfoNo other issues found (see more)❄️ No new flaky tests detected Useful? React with 👍 / 👎 This comment will be updated automatically if new data arrives.🔗 Commit SHA: a121cd1 | Docs | View more details | Give us feedback! |
This branch has not been deployed
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.
Motivation
Go's Dynamic Instrumentation gets three map expressions wrong in staging, and the existing tests don't catch any of them:
unavailable.m["AAA"]names a key that exists, but the captured value isunavailable. The existingtest_complex_capture_expressionsonly checks that the value has atype, so a not-captured marker still passes.m.AAA), an unknown variable (nope_var) or a missing struct field (req.Nope) in a condition is rejected at install. The same expressions in a log template install fine and only print the error inside the log line.m["ZZZ"] == 1fired as if true, with no error. A missing key in amap[string]intreads as 0, so the condition should be false.Changes
test_complex_capture_expressions_dictionary_value: requirestestStruct.Dictionary['two']to capture2.Test_Debugger_Go_Static_Template_Error: templates usingtestStruct.Dictionary.two, an unknown variable, or a missing struct field must each reachERROR, like the equivalent conditions.Test_Debugger_Go_Missing_Map_Key_Condition:testStruct.Dictionary['nope'] == 1must not produce a snapshot with captured data.The two new classes are scoped to Go. Draft: opened to get Linux CI results, since Go DI can't run on a macOS Docker VM. Manifests will be updated with tickets once CI shows which tests fail.