Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions pkg/workflow/strict_mode_sandbox_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,13 @@
// configuration is unambiguous. A bare object (e.g. { version: "v0.25.29" }
// with no id) would silently default to AWF in non-strict builds but that
// implicit defaulting is not acceptable in strict mode.
if !agent.Disabled {
if !isSupportedSandboxType(getAgentType(agent)) {
return fmt.Errorf(
"strict mode: 'sandbox.agent' must specify an explicit 'id' (e.g., id: awf). " +
"A sandbox agent without an 'id' is ambiguous and not allowed in strict mode. " +
"Add 'id: awf' to your sandbox.agent configuration. " +
"See: https://github.github.com/gh-aw/reference/sandbox/",
)
}
if !agent.Disabled && !isSupportedSandboxType(getAgentType(agent)) {
return fmt.Errorf(

Check failure on line 48 in pkg/workflow/strict_mode_sandbox_validation.go

View workflow job for this annotation

GitHub Actions / lint-go

error-format: fmt.Errorf can be replaced with errors.New (perfsprint)
"strict mode: 'sandbox.agent' must specify an explicit 'id' (e.g., id: awf). " +
"A sandbox agent without an 'id' is ambiguous and not allowed in strict mode. " +
"Add 'id: awf' to your sandbox.agent configuration. " +
"See: https://github.github.com/gh-aw/reference/sandbox/",
)
}

if agent.Command != "" {
Expand Down
Loading