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

dirtools: ensure ActionResult ouputs are posix #6361

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

sluongng
Copy link
Contributor

@sluongng sluongng commented Apr 12, 2024

On Windows Executor, the path separator is backslash \.
The action result that we currently creating and consumed by Bazel would
look like this:

"outputFiles": [
  {
    "path": "bazel-out\\k8-fastbuild\\bin\\b.txt",
    "digest": {
      "hash": "..."
    }
  }
],

and Bazel would err with

remote spawn failed: Invalid action cache entry ...: expected output b.txt does not exist.

Ensure that ActionResult always use posix path so it would look like
this instead:

"outputFiles": [
  {
    "path": "bazel-out/x64_windows-fastbuild/bin/b.txt",
    "digest": {
      "hash": "..."
    }
  }
],

On Windows Executor, the path separator is backslash `\`.
The action result that we currently creating and consumed by Bazel would
look like this:

```
"outputFiles": [
  {
    "path": "bazel-out\\k8-fastbuild\\bin\\b.txt",
    "digest": {
      "hash": "..."
    }
  }
],
```

and Bazel would err with

```
remote spawn failed: Invalid action cache entry ...: expected output b.txt does not exist.
```

Ensure that ActionResult always use posix path so it would look like
this instead:

```
"outputFiles": [
  {
    "path": "bazel-out/x64_windows-fastbuild/bin/b.txt",
    "digest": {
      "hash": "..."
    }
  }
],
```
@sluongng sluongng force-pushed the sluongng/dirtools-windows-fix branch from e001594 to 57064b0 Compare April 12, 2024 16:40
@sluongng sluongng changed the title sluongng/dirtools windows fix dirtools: ensure ActionResult ouputs are posix Apr 12, 2024
@tylerwilliams
Copy link
Member

LGTM

Can you please test linux and mac remote-exec in dev as soon as you submit it and it auto-pushes? Want to avoid accidentally breaking anything :)

@sluongng
Copy link
Contributor Author

Will test in dev and report back here.

@sluongng sluongng merged commit 2611ea4 into master Apr 12, 2024
18 of 19 checks passed
@sluongng sluongng deleted the sluongng/dirtools-windows-fix branch April 12, 2024 17: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.

None yet

3 participants