Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/github.com/elastic/ela…
Browse files Browse the repository at this point in the history
…stic-agent-autodiscover-0.6.7
  • Loading branch information
michalpristas authored Jan 22, 2024
2 parents 45a57f2 + bccb12e commit e280089
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
18 changes: 9 additions & 9 deletions .github/ISSUE_TEMPLATE/flaky-test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: "Flaky Test"
about: "Report a flaky test (one that doesn't pass consistently)"
description: "Report a flaky test (one that doesn't pass consistently)"
title: "[Flaky Test]: <test_case> – <short_error_message>"
labels: ["Team:Elastic-Agent", "flaky-test"]
projects: ["elastic/1457"]
projects: ["elastic/979", "elastic/1457"]
body:
- type: markdown
attributes:
Expand Down Expand Up @@ -36,18 +36,18 @@ body:
attributes:
label: OS
description: "On which OS the test is failing"
multiple: true
options:
- Linux
- Mac
- Windows
default: 0
multiple: true
options:
- Linux
- Mac
- Windows
default: 0
validations:
required: true
- type: textarea
attributes:
label: "Stacktrace and notes"
description: "Detailed output of the test failure and your notes about possible cause."
render: markdown
render: markdown
validations:
required: true
10 changes: 8 additions & 2 deletions dev-tools/mage/gotool/go.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,18 @@ var Test goTest = runGoTest

// GetModuleName returns the name of the module.
func GetModuleName() (string, error) {
lines, err := getLines(callGo(nil, "list", "-m"))
lines, err := getLines(callGo(
// Disabling the Go workspaces prevents 'go list' from listing all
// modules within the workspace.
map[string]string{"GOWORK": "off"},
"list",
"-m"))
if err != nil {
return "", err
}
if len(lines) != 1 {
return "", fmt.Errorf("unexpected number of lines")
return "", fmt.Errorf("expected 'go list -m' to return 1 line, got %d",
len(lines))
}
return lines[0], nil
}
Expand Down

0 comments on commit e280089

Please sign in to comment.