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

add debugg logs #104

Merged
merged 7 commits into from
Feb 14, 2025
Merged

add debugg logs #104

merged 7 commits into from
Feb 14, 2025

Conversation

pablochacin
Copy link
Contributor

@pablochacin pablochacin commented Feb 12, 2025

Example execution (without errors)

go run ./cmd/k6exec/ --verbose run ../k6deps/testdata/faker.js
DEBU[0000] analyzing sources                             Manifest=/home/pablo/go/src/github.com/grafana/k6deps/package.json Script=/home/pablo/go/src/github.com/grafana/k6deps/testdata/faker.js app=k6exec
DEBU[0000] found dependencies                            app=k6exec deps="k6>0.54;k6/x/faker>0.3.0"
INFO[0000] provisioning k6 binary                        app=k6exec
DEBU[0000] downloading binary                            app=k6exec build service URL: ="https://ingest.k6.io/builder/api/v1"
DEBU[0000] Binary downloaded                             Path: =/tmp/k6provider/cache/8472b317f9eb88c42b19e83724810655210c7282/k6 app=k6exec dependencies="k6>0.54;k6/x/faker>0.3.0"
DEBU[0000] Running k6                                    app=k6exec args="[run -v ../k6deps/testdata/faker.js]" path=/tmp/k6provider/cache/8472b317f9eb88c42b19e83724810655210c7282/k6
DEBU[0000] running                                       app=k6exec args="[run -v ../k6deps/testdata/faker.js]" k6 binary=/tmp/k6provider/cache/8472b317f9eb88c42b19e83724810655210c7282/k6
DEBU[0000] Logger format: TEXT                          
DEBU[0000] k6 version: v0.56.0 (go1.22.4, linux/amd64)  

Fixes #100

@pablochacin pablochacin changed the title add debugg logs WIP: add debugg logs Feb 13, 2025
@pablochacin pablochacin marked this pull request as ready for review February 13, 2025 08:53
@pablochacin pablochacin requested a review from a team as a code owner February 13, 2025 08:53
@pablochacin pablochacin requested review from szkiba and removed request for a team February 13, 2025 08:53
Signed-off-by: Pablo Chacin <[email protected]>
Copy link
Collaborator

@olegbespalov olegbespalov left a comment

Choose a reason for hiding this comment

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

Looks good 👍 Do we have a chance to also distinguish and log if the binary hasn't been downloaded, but used from cache?

@pablochacin
Copy link
Contributor Author

pablochacin commented Feb 13, 2025

Looks good 👍 Do we have a chance to also distinguish and log if the binary hasn't been downloaded, but used from cache?

Not from k6exec. But looks like a useful information to have. I'm opening an issue in k6provider to return this information in the artifact.

Signed-off-by: Pablo Chacin <[email protected]>
@olegbespalov
Copy link
Collaborator

@pablochacin then maybe avoid term downloading here and use more generic ones, like fetching, and later in the library we can either print downloading or resolved from cache. WDYT?

Signed-off-by: Pablo Chacin <[email protected]>
Signed-off-by: Pablo Chacin <[email protected]>
Signed-off-by: Pablo Chacin <[email protected]>
@pablochacin pablochacin changed the title WIP: add debugg logs add debugg logs Feb 14, 2025
@pablochacin pablochacin merged commit ab668f5 into main Feb 14, 2025
7 checks passed
@pablochacin pablochacin deleted the add-debugg-logs branch February 14, 2025 23:12
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.

Add logging to allow debugging
2 participants