Skip to content

Chore/k6 updates - #1610

Open
Odonno wants to merge 3 commits into
CommunityToolkit:mainfrom
Odonno:chore/k6-updates
Open

Odonno wants to merge 3 commits into
CommunityToolkit:mainfrom
Odonno:chore/k6-updates

Conversation

@Odonno

@Odonno Odonno commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Fixes #1604

  • set defaults to null to avoid environment override
  • upgrade to latest k6 tag 2.3.0 (no major changes needed)
  • add summary-mode variable to be passed during script execution

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

Other information

Since args now defaults to null, it can be considered a breaking change.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1610

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1610"


[AspireExport]
public static ApplicationModel.IResourceBuilder<ApplicationModel.K6Resource> WithScript(this ApplicationModel.IResourceBuilder<ApplicationModel.K6Resource> builder, string scriptPath, int virtualUsers = 10, string duration = "30s") { throw null; }
public static ApplicationModel.IResourceBuilder<ApplicationModel.K6Resource> WithScript(this ApplicationModel.IResourceBuilder<ApplicationModel.K6Resource> builder, string scriptPath, int? virtualUsers = null, string? duration = null) { throw null; }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't match the API definition below - it's missing the K6SummaryMode option.

string duration = "30s")
int? virtualUsers = null,
string? duration = null,
K6SummaryMode? summaryMode = null)

@afscrome afscrome Sep 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding an additional parameter & changing types (int --> int?) is a breaking API change.

Not entirely sure on this repo's approach to breaking changes, but I suggest adding a new overload, rather than changing the existing signature.

@afscrome

Copy link
Copy Markdown
Contributor

I've also caused a conflict with renaming Program.cs to AppHost.cs in #1611

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

k6: WithScript always passes --vus/--duration, which override scenario-based scripts

2 participants