Skip to content

chore(k6): exclude "modules/k6" from the build #2987

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

Merged

Conversation

mdelapenya
Copy link
Member

@mdelapenya mdelapenya commented Feb 17, 2025

What does this PR do?

This PR adds a new condition in the changed-modules script to skip modules from the build, including the k6 module at this time.

See #2986 for more info

Why is it important?

The k6 module relies on the szkiba/k6x Docker image, which at the same time relies in a folder structure on the Grafana's k6-docs repository in order to download an extensions.json file.

The docs repository has been refactored in grafana/k6-docs#1832, and the Docker image repository, https://github.com/grafana/k6x, has been archived.

We could mark this module as deprecated, but even for that we would need a Docker image that works, probably getting the JSON file from the Git history of the docs repo at a point before the refactor (i.e. 572cce3fb675cb936f5772a4104b59a26c1e18e3, using the ref query parameter in https://docs.github.com/en/rest/repos/contents?apiVersion=2022-11-28#get-repository-content). Because this is something out of our control, we are retiring the build for the k6 module, to avoid adding noise in our own PRs, at least until a docker image is released.

UPDATE: this works https://api.github.com/repos/grafana/k6-docs/contents/src/data/doc-extensions/extensions.json?ref=572cce3fb675cb936f5772a4104b59a26c1e18e3

It's also important to notice that any release of the k6 module is broken, because all the k6x Docker images rely on the current folder structure in the k6-docs Github repo (see https://github.com/grafana/k6x/blob/1157a4180816a68fd218bccf03234ab9fe888a65/internal/resolver/gh.go#L68), so we would need to have that Docker image updated in the code using the module, on the image value passed to the Run function.

Related issues

@mdelapenya mdelapenya requested a review from a team as a code owner February 17, 2025 12:47
@mdelapenya mdelapenya self-assigned this Feb 17, 2025
@mdelapenya mdelapenya requested a review from stevenh February 17, 2025 12:47
@mdelapenya mdelapenya added the chore Changes that do not impact the existing functionality label Feb 17, 2025
Copy link

netlify bot commented Feb 17, 2025

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit e900f92
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/67b32fefea03830008f93f3c
😎 Deploy Preview https://deploy-preview-2987--testcontainers-go.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mdelapenya mdelapenya changed the title chore: exclude "modules/k6" from the build chore(k6): exclude "modules/k6" from the build Feb 17, 2025
@mdelapenya mdelapenya merged commit 73f0b73 into testcontainers:main Feb 19, 2025
180 checks passed
@mdelapenya mdelapenya deleted the 2986-remove-k6-from-build-script branch February 19, 2025 09:41
mdelapenya added a commit to mdelapenya/testcontainers-go that referenced this pull request Feb 20, 2025
* main: (54 commits)
  deps: update go version from 1.22.0 to 1.23.0 (testcontainers#2985)
  feat(redpanda): add bootstrap user account option (testcontainers#2975)
  chore(ollama): bump default version to 0.5.7 (testcontainers#2966)
  feat!: log package for consistent output (testcontainers#2979)
  docs: remove duplicated options in the customisers lists (testcontainers#2989)
  chore: exclude "modules/k6" from the build (testcontainers#2987)
  chore: enable var-naming from revive (private vars only) (testcontainers#2978)
  chore(deps): bump actions/checkout from 4.1.7 to 4.2.2 (testcontainers#2971)
  chore(deps): bump release-drafter/release-drafter from 6.0.0 to 6.1.0 (testcontainers#2970)
  chore!: remove variadic arguments from nats ConnectionString (testcontainers#2967)
  fix(ci): use same condition for sonar steps (testcontainers#2974)
  fix: return unique modified modules (testcontainers#2973)
  chore(deps): bump golangci/golangci-lint-action from 6.2.0 to 6.3.0 (testcontainers#2969)
  chore(ci): run lint in a separate build before running the tests (testcontainers#2876)
  fix(deps): update to github.com/shirou/gopsutil/v4 (testcontainers#2964)
  fix(valkey): fix port race (testcontainers#2962)
  chore(deps): bump golang.org/x/net in /modules/pinecone (testcontainers#2963)
  chore(deps): bump golang.org/x/net from 0.26.0 to 0.33.0 (testcontainers#2961)
  deps(fix): include modulegen templates dir in dependabot updates (testcontainers#2956)
  chore(deps): bump docker/setup-docker-action from 4.0.0 to 4.1.0 (testcontainers#2959)
  ...
mdelapenya added a commit to mdelapenya/testcontainers-go that referenced this pull request Feb 20, 2025
* main: (34 commits)
  deps: update go version from 1.22.0 to 1.23.0 (testcontainers#2985)
  feat(redpanda): add bootstrap user account option (testcontainers#2975)
  chore(ollama): bump default version to 0.5.7 (testcontainers#2966)
  feat!: log package for consistent output (testcontainers#2979)
  docs: remove duplicated options in the customisers lists (testcontainers#2989)
  chore: exclude "modules/k6" from the build (testcontainers#2987)
  chore: enable var-naming from revive (private vars only) (testcontainers#2978)
  chore(deps): bump actions/checkout from 4.1.7 to 4.2.2 (testcontainers#2971)
  chore(deps): bump release-drafter/release-drafter from 6.0.0 to 6.1.0 (testcontainers#2970)
  chore!: remove variadic arguments from nats ConnectionString (testcontainers#2967)
  fix(ci): use same condition for sonar steps (testcontainers#2974)
  fix: return unique modified modules (testcontainers#2973)
  chore(deps): bump golangci/golangci-lint-action from 6.2.0 to 6.3.0 (testcontainers#2969)
  chore(ci): run lint in a separate build before running the tests (testcontainers#2876)
  fix(deps): update to github.com/shirou/gopsutil/v4 (testcontainers#2964)
  fix(valkey): fix port race (testcontainers#2962)
  chore(deps): bump golang.org/x/net in /modules/pinecone (testcontainers#2963)
  chore(deps): bump golang.org/x/net from 0.26.0 to 0.33.0 (testcontainers#2961)
  deps(fix): include modulegen templates dir in dependabot updates (testcontainers#2956)
  chore(deps): bump docker/setup-docker-action from 4.0.0 to 4.1.0 (testcontainers#2959)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Changes that do not impact the existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: k6 module is broken because Grafana reorg'd the k6-docs repository
1 participant