Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use k6foundry for building #124

Merged
merged 7 commits into from
Feb 5, 2025
Merged

Conversation

pablochacin
Copy link
Collaborator

@pablochacin pablochacin commented Feb 3, 2025

Replace build logic with k6foundry library. Also, refactors the build argument parsing logic to facilitate testing.

This change required upgrading to golang 1.22 (required by k6foundry).

Breaking change in xk6.Build library: the Build method no longer completes missing attributes using environment variables. The function FromOSEnv can be used to create Builder from the environment variable and then override or complete its attributes. See README.md for an example

Fixes #112

@pablochacin pablochacin force-pushed the reimplement-using-k6foundry branch 2 times, most recently from 8a40fec to 6efad77 Compare February 4, 2025 13:10
@pablochacin pablochacin force-pushed the reimplement-using-k6foundry branch from 6efad77 to f7b6ec9 Compare February 4, 2025 13:22
Signed-off-by: Pablo Chacin <[email protected]>
@pablochacin pablochacin marked this pull request as ready for review February 4, 2025 13:48
@pablochacin pablochacin requested a review from a team as a code owner February 4, 2025 13:48
@pablochacin pablochacin requested review from szkiba and removed request for a team February 4, 2025 13:48
README.md Show resolved Hide resolved
Signed-off-by: Pablo Chacin <[email protected]>
Copy link
Contributor

@szkiba szkiba left a comment

Choose a reason for hiding this comment

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

The exit code on error should be fixed (it should be 1 as before). Probably a lot of automation depends on this.

There is a problem with building private extensions. The following should work (it worked with the old xk6), but it doesn't:

export GOPRIVATE=github.com/grafana/hackathon-2024-12-weaver-spiders
xk6 build --with github.com/grafana/hackathon-2024-12-weaver-spiders 

go.mod Outdated Show resolved Hide resolved
cmd/xk6/main.go Outdated Show resolved Hide resolved
cmd/xk6/main.go Show resolved Hide resolved
cmd/xk6/main.go Show resolved Hide resolved
cmd/xk6/main.go Show resolved Hide resolved
@pablochacin pablochacin requested a review from szkiba February 4, 2025 20:36
Copy link
Contributor

@szkiba szkiba left a comment

Choose a reason for hiding this comment

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

LGTM

@pablochacin pablochacin merged commit 0b160fa into master Feb 5, 2025
5 checks passed
@pablochacin pablochacin deleted the reimplement-using-k6foundry branch February 5, 2025 12:43
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.

Re-implementation using k6foundry fails in k6 ci workflow
2 participants