Skip to content

Commit 10335a3

Browse files
committed
Recommend latest tracers in onboarding setup
1 parent 10f3d5d commit 10335a3

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

‎internal/onboard/multiframework_test.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ func TestOnboardAllSupportedFrameworks(t *testing.T) {
4040
t.Chdir(root)
4141
require.NoError(t, Run(&output))
4242
require.Contains(t, output.String(), "languages: "+language)
43+
require.Contains(t, output.String(), language+"-tracer-version: '' # Latest release")
4344
require.Contains(t, output.String(), "ddtest testdrive --framework "+name)
4445
require.Contains(t, output.String(), "Ask a human to connect Datadog")
4546
if language != "js" {

‎internal/onboard/onboard.go‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"strings"
1717

1818
"github.com/DataDog/ddtest/internal/platform"
19-
"github.com/DataDog/ddtest/internal/testdrive/tracer"
2019
"go.yaml.in/yaml/v3"
2120
)
2221

@@ -184,25 +183,24 @@ func looksLikeTestWorkflow(workflow, language, name string) bool {
184183

185184
func instructions(language, name string) string {
186185
actionLanguage := language
187-
var bootstrap, tracerSetting string
186+
var bootstrap string
188187
switch language {
189188
case "javascript":
190189
actionLanguage = "js"
191-
tracerSetting = "js-tracer-version: " + tracer.JavaScriptVersion
192190
bootstrap = javascriptBootstrap
193191
if name == "cypress" {
194192
bootstrap += "\n\n" + cypressBootstrap
195193
}
196194
if name == "cucumber" {
197-
bootstrap += "\n\nFor the pinned tracer, also set DD_CIVISIBILITY_IMPACTED_TESTS_DETECTION_ENABLED=false on the test step. This avoids a tracer crash on Cucumber Background/Rule nodes; basic reporting is unaffected."
195+
bootstrap += "\n\nFor Cucumber, also set DD_CIVISIBILITY_IMPACTED_TESTS_DETECTION_ENABLED=false on the test step. This avoids a tracer crash on Cucumber Background/Rule nodes; basic reporting is unaffected."
198196
}
199197
case "python":
200198
bootstrap = pythonBootstrap
201-
tracerSetting = "python-tracer-version: " + tracer.PythonVersion
202199
case "ruby":
203200
bootstrap = rubyBootstrap
204-
tracerSetting = "ruby-tracer-version: " + tracer.RubyVersion
205201
}
202+
// Empty inputs override the action's pinned defaults and request the latest release.
203+
tracerSetting := actionLanguage + "-tracer-version: '' # Latest release"
206204
text := strings.NewReplacer("__FRAMEWORK__", name, "__LANGUAGE__", actionLanguage, "__BOOTSTRAP__", bootstrap, "__TRACER_SETTING__", tracerSetting).Replace(gitHubInstructions)
207205
return strings.ReplaceAll(text, "ddtest testdrive", "ddtest testdrive --framework "+name)
208206
}

0 commit comments

Comments
 (0)