Skip to content

Conversation

@mstoykov
Copy link
Contributor

@mstoykov mstoykov commented Sep 24, 2025

What?

On Windows due to a mistake in #5016 on windows loading files would not work during the auto extension resolution in some cases and that breaks running the test as a whole.

Why?

This should be working.

Checklist

  • I have performed a self-review of my code.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests for my changes.
  • I have run linter and tests locally (make check) and all pass.

Checklist: Documentation (only for k6 maintainers and if relevant)

Please do not merge this PR until the following items are filled out.

  • I have added the correct milestone and labels to the PR.
  • I have updated the release notes: link
  • I have updated or added an issue to the k6-documentation: grafana/k6-docs#NUMBER if applicable
  • I have updated or added an issue to the TypeScript definitions: grafana/k6-DefinitelyTyped#NUMBER if applicable

Related PR(s)/Issue(s)

Fixes #5176

@mstoykov mstoykov temporarily deployed to azure-trusted-signing September 24, 2025 14:19 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing September 24, 2025 14:22 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing September 24, 2025 14:31 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing September 24, 2025 14:33 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing September 24, 2025 15:11 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing September 24, 2025 15:14 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing September 24, 2025 15:21 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing September 24, 2025 15:25 — with GitHub Actions Inactive
@mstoykov mstoykov changed the title fix Windows filepath problem on auto extension resolution Fix auto extension resolution breaking tests on windows Sep 24, 2025
@mstoykov mstoykov marked this pull request as ready for review September 24, 2025 15:35
@mstoykov mstoykov requested a review from a team as a code owner September 24, 2025 15:35
@mstoykov mstoykov requested review from codebien and joanlopez and removed request for a team September 24, 2025 15:35
@mstoykov mstoykov added this to the v1.4.0 milestone Sep 24, 2025
dopts.Script.Name = sourceRootPath
dopts.Script.Contents = src.Data
dopts.Fs = newIOFSBridge(gs.FS, pwd)
dopts.Fs = newIOFSBridge(gs.FS, filepath.ToSlash(pwd))
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a specific reason for not doing as same as readsource is doing?

pwdURL := &url.URL{Scheme: "file", Path: filepath.ToSlash(filepath.Clean(pwd)) + "/"}

@mstoykov mstoykov temporarily deployed to azure-trusted-signing September 25, 2025 08:52 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing September 25, 2025 09:04 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing September 25, 2025 14:24 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing September 25, 2025 14:26 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing September 25, 2025 14:57 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing September 25, 2025 14:59 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing September 26, 2025 07:43 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing September 26, 2025 07:45 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing September 26, 2025 08:29 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing September 26, 2025 08:31 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing September 26, 2025 08:57 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing September 26, 2025 08:59 — with GitHub Actions Inactive
@joanlopez
Copy link
Contributor

Great @mstoykov, because it seems to fix the issue 👉🏻 #5176 (comment) 🎉

Now, I guess it's about removing prints and all that before final reviews? 🤔 Thanks! 🙌🏻

@mstoykov
Copy link
Contributor Author

Unfortunately the things that fixes all the cases is the thing that is based on #5228 so the ongoing work to nto actually use esbuild and k6desp for the auto extension resolution.

Hopefully all of that will enter 1.4.0. If not I will back off here to fix the more common case.

@mstoykov
Copy link
Contributor Author

I will move this to draft so people do not come to review it 😅

@mstoykov mstoykov marked this pull request as draft October 13, 2025 10:11
@mstoykov
Copy link
Contributor Author

This is superseded by #5320 which fixes all cases

@mstoykov mstoykov closed this Oct 21, 2025
@mstoykov mstoykov deleted the windowsFilepath branch October 21, 2025 10:59
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 can not resolve imports in siblings of parent directory

3 participants