buildifier_test: fix FINDSTR: Cannot open MANIFEST#1400
Open
rdesgroppes wants to merge 1 commit intobazelbuild:mainfrom
Open
buildifier_test: fix FINDSTR: Cannot open MANIFEST#1400rdesgroppes wants to merge 1 commit intobazelbuild:mainfrom
FINDSTR: Cannot open MANIFEST#1400rdesgroppes wants to merge 1 commit intobazelbuild:mainfrom
Conversation
603adc7 to
3be1fd0
Compare
rdesgroppes
added a commit
to DataDog/datadog-agent
that referenced
this pull request
Oct 14, 2025
### What does this PR do? Applies 2 more patches that were submitted upstream: - bazelbuild/buildtools#1399 - bazelbuild/buildtools#1400 ### Motivation 1. `buildifier` macro: its implementation and Windows runner script template ignore excluded patterns as of today, 2. `buildifier_test` macro: the Windows runner script template doesn't consider the `bazel`-provided manifest file. ### Describe how you validated your changes Local Windows VM (QEMU/virt-manager). ### Additional Notes `bazel run //bazel/buildifier` takes [2 minutes](https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/1177131952#L77-L78) on Windows: 1. they're spawning a nested powershell and then use a "manual" recursion from within, which could be optimized => later effort, 2. as Tony mentioned at multiple occasions, we should only run `buildifier` on modified files => again, later effort.
3be1fd0 to
bdfa834
Compare
This happens on Windows when using `buildifier_test`:
```
INFO: Running command line: 'external\bazel_tools\tools\test\tw.exe' buildifier/test.bat
Executing tests from //buildifier:test
-----------------------------------------------------------------------------
FINDSTR: Cannot open MANIFEST
The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command
name, a script block, or a CommandInfo object.
At line:1 char:566
+ ... (Should-Exclude $_.Path) }; foreach ($File in $Files) { & '' -mode=d ...
+ ~~
+ CategoryInfo : InvalidOperation: (:String) [], RuntimeException
+ FullyQualifiedErrorId : BadExpression
The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command
[...]
```
The present change simply consists in giving a second try with
`$RUNFILES_MANIFEST_FILE` and failing fast should both be absent.
bdfa834 to
f127b7e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This happens on Windows when using the
buildifier_testmacro:The present change simply consists in giving a second try with
$RUNFILES_MANIFEST_FILEand failing fast should both be absent.