Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- fix: authenticate against the Postman API with the `X-API-Key` header and download the collection/environment in-process instead of embedding the API key in the newman command line and serialized action state (prevents leaking the key via `ps`/`/proc/<pid>/cmdline`)
- fix: write newman reports into a unique per-execution working directory (mode 0700) and remove it on stop, instead of timestamped world-readable files in `/tmp` that could collide between concurrent runs and were never cleaned up
- fix: resolve the data race on the newman process exit code between the process-reaping goroutine and the status/stop handlers (via `extcmd.CmdState.Wait`/`ExitCode`)

## v2.0.29

Expand Down
6 changes: 3 additions & 3 deletions extpostman/action_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ func (f PostmanAction) Start(_ context.Context, state *PostmanState) (*action_ki

state.Pid = cmd.Process.Pid
go func() {
cmdErr := cmd.Wait()
cmdErr := cmdState.Wait()
if cmdErr != nil {
log.Error().Msgf("Failed to execute postman action: %s", cmdErr)
}
Expand All @@ -271,7 +271,7 @@ func (f PostmanAction) Status(_ context.Context, state *PostmanState) (*action_k
var result action_kit_api.StatusResult

// check if postman is still running
exitCode := cmdState.Cmd.ProcessState.ExitCode()
exitCode := cmdState.ExitCode()
if exitCode == -1 {
log.Info().Msgf("Postman is still running")

Expand Down Expand Up @@ -365,7 +365,7 @@ func (f PostmanAction) Stop(_ context.Context, state *PostmanState) (*action_kit
messages := getStdOutMessages(cmdState.GetLines(true))

// read return code and send it as Message
exitCode := cmdState.Cmd.ProcessState.ExitCode()
exitCode := cmdState.ExitCode()
if exitCode != 0 && exitCode != -1 {
messages = append(messages, action_kit_api.Message{
Level: extutil.Ptr(action_kit_api.Error),
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/steadybit/discovery-kit/go/discovery_kit_commons v0.3.1
github.com/steadybit/discovery-kit/go/discovery_kit_sdk v1.3.5
github.com/steadybit/discovery-kit/go/discovery_kit_test v1.2.1
github.com/steadybit/extension-kit v1.10.5
github.com/steadybit/extension-kit v1.10.6
github.com/stretchr/testify v1.11.1
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ github.com/steadybit/discovery-kit/go/discovery_kit_sdk v1.3.5 h1:1yT/4Aw+lQvYXS
github.com/steadybit/discovery-kit/go/discovery_kit_sdk v1.3.5/go.mod h1:gOPfHZ3hw/7TMxEYCCTYnOz9tZ2ybNYa+MKmUbPXKIQ=
github.com/steadybit/discovery-kit/go/discovery_kit_test v1.2.1 h1:CabRtfE70gt/4H/TgL/TRm54OkxWKbmPhTX2qEhzKZ4=
github.com/steadybit/discovery-kit/go/discovery_kit_test v1.2.1/go.mod h1:PPJh5gSdVRKG/0qJCGJK5XnGxXat/v6UT8/2ilIbbX8=
github.com/steadybit/extension-kit v1.10.5 h1:KSZP2vUA97QnFDhI3UAAmNg1iOv4n0ckXI/jjKrB3xc=
github.com/steadybit/extension-kit v1.10.5/go.mod h1:n1PMz8AwjGvl/M/CWSVjoHCE8qM74Tx+nfC4iiuhEPA=
github.com/steadybit/extension-kit v1.10.6 h1:Qz73OO7EMBpueJZjQ23wDXE0xOLBpJOz6h2ND7t6d0s=
github.com/steadybit/extension-kit v1.10.6/go.mod h1:n1PMz8AwjGvl/M/CWSVjoHCE8qM74Tx+nfC4iiuhEPA=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4=
github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0=
Expand Down
Loading