Skip to content

fix: slack plugin not reporting duration and status correctly#3555

Merged
hassy merged 2 commits intomainfrom
ed-art-2084-slack-plugin-not-reporting-duration-and-status-correctly
Jun 17, 2025
Merged

fix: slack plugin not reporting duration and status correctly#3555
hassy merged 2 commits intomainfrom
ed-art-2084-slack-plugin-not-reporting-duration-and-status-correctly

Conversation

@manfromanotherland
Copy link
Member

@manfromanotherland manfromanotherland commented Jun 10, 2025

Description

  • Use formatDuration() function from packages/artillery/lib/utils.js for consistency
  • Check if lastMetricAt and firstMetricAt are defined before calculating duration
  • Only report duration if the value is valid
  • Add exit code fallback in cases where is not set in time

Pre-merge checklist

This is for use by the Artillery team. Please leave this in if you're contributing to Artillery.

  • Does this require an update to the docs?
  • Does this require a changelog entry?

@manfromanotherland manfromanotherland force-pushed the ed-art-2084-slack-plugin-not-reporting-duration-and-status-correctly branch from e4ffc59 to b102bdd Compare June 10, 2025 17:09
- Use `formatDuration()` function from `packages/artillery/lib/utils.js`
for consistency
- Check if `lastMetricAt` and `firstMetricAt` are defined before
calculating duration
- Only report duration if the value is valid
- Add `0` fallback for exit code in cases where is not set
- Use `??` instead of `||` to prevent issues where `0 || 1` would result
in `1` even when `suggestedExitCode` was explicit set to `0`
@manfromanotherland manfromanotherland force-pushed the ed-art-2084-slack-plugin-not-reporting-duration-and-status-correctly branch from b102bdd to 8dfb882 Compare June 17, 2025 09:52
@hassy hassy merged commit 82a8529 into main Jun 17, 2025
44 checks passed
@hassy hassy deleted the ed-art-2084-slack-plugin-not-reporting-duration-and-status-correctly branch June 17, 2025 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants