You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Using the blt validate:yaml:lint:files iteratively as part of a Robo watch task the task fails to find obvious violations after an initial violation is found. The behavior can be reproduced outside of a watch task by calling the validation task in a loop.
Same issue has been reported in version 10.x3015 and patch has been merged into 10.x#3470 . Code changes appear to not have been implemented in v12.x for YamlCommand and only for the TwigCommand.
To Reproduce
Steps to reproduce the behavior, ideally starting from a fresh install of BLT:
Create the following files:
docroot/themes/custom/test/one.yml:
one:
- '
docroot/themes/custom/test/two.yml:
two:
- '
Create the following command function:
/**
* @command run:yaml:lint:files
*/
public function testYamlLintFilesTask() {
for ($i = 0; $i < 10; $i++) {
try {
$this->invokeBltCommand('validate:yaml:lint:files', ['file_list' => 'docroot/themes/custom/test/one.yml']);
} catch (\Exception $exception) {
// Do nothing.
}
try {
$this->invokeBltCommand('validate:yaml:lint:files', ['file_list' => 'docroot/themes/custom/test/two.yml']);
} catch (\Exception $exception) {
// Do nothing.
}
}
}
When I run:
$ blt run:yaml:lint:file
I get the following output:
$ blt run:yaml:lint:files
[warning] The xDebug extension is loaded. This will significantly decrease performance.
> validate:yaml:lint:files
Linting YAML files...
Iterating over fileset files.yaml...
''/var/www/meyers/vendor/bin/yaml-cli' lint '/var/www/meyers/docroot/themes/custom/nyunursing/one.yml'' exited with code 1
[error] Executing `'/var/www/meyers/vendor/bin/yaml-cli' lint '%s'` against fileset(s) files.yaml returned a non-zero exit code.`
For troubleshooting guidance and support, see https://docs.acquia.com/blt/support/
The command failed. This often indicates a problem with your configuration. Review the command output above for more detailed errors, and consider re-running with verbose output for more information.
Command `validate:yaml:lint:files 'docroot/themes/custom/nyunursing/one.yml'` exited with code 1.
For troubleshooting guidance and support, see https://docs.acquia.com/blt/support/
`validate:yaml:lint:files` finished with an error.
> validate:yaml:lint:files
Linting YAML files...
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
`validate:yaml:lint:files` finished successfully.
And I expected that violations would be found in one.ymlandtwo.yml during each invocation.
With verbose output, BLT reports that the fileset is inexplicably empty:
$ blt run:yaml:lint:files -vvv
> validate:yaml:lint:files
Linting YAML files...
[debug] Gathering filesets from annotated methods...
[debug] Calling getFilesetPhpCustomModules on Acquia\Blt\Robo\Filesets\Filesets object...
[debug] Calling getFilesetPhpCustomThemes on Acquia\Blt\Robo\Filesets\Filesets object...
[debug] Calling getFilesetPhpTests on Acquia\Blt\Robo\Filesets\Filesets object...
[debug] Calling getFilesetFrontend on Acquia\Blt\Robo\Filesets\Filesets object...
[debug] Calling getFilesetTwig on Acquia\Blt\Robo\Filesets\Filesets object...
[debug] Calling getFilesetYaml on Acquia\Blt\Robo\Filesets\Filesets object...
[debug] Calling getFilesetFrontend on Acquia\Blt\Custom\Blt\Plugin\Filesets\Filesets object...
[debug] Calling getFilesetYaml on Acquia\Blt\Custom\Blt\Plugin\Filesets\Filesets object...
[debug] Calling getFilesetPhpCustomModules on Acquia\Blt\Custom\Blt\Plugin\Filesets\Filesets object...
[debug] Calling getFilesetPhpCustomThemes on Acquia\Blt\Custom\Blt\Plugin\Filesets\Filesets object...
[debug] Calling getFilesetPhpTests on Acquia\Blt\Custom\Blt\Plugin\Filesets\Filesets object...
[debug] Calling getFilesetTwig on Acquia\Blt\Custom\Blt\Plugin\Filesets\Filesets object...
Iterating over fileset files.yaml...
[ParallelExec] '/var/www/meyers/vendor/bin/yaml-cli' lint '/var/www/meyers/docroot/themes/custom/nyunursing/one.yml'
[ParallelExec] ''/var/www/meyers/vendor/bin/yaml-cli' lint '/var/www/meyers/docroot/themes/custom/nyunursing/one.yml'' exited with code 1
Time 0.101s
[ParallelExec] Exit code 1 Time 0.101s
''/var/www/meyers/vendor/bin/yaml-cli' lint '/var/www/meyers/docroot/themes/custom/nyunursing/one.yml'' exited with code 1
[error] Executing `'/var/www/meyers/vendor/bin/yaml-cli' lint '%s'` against fileset(s) files.yaml returned a non-zero exit code.`
For troubleshooting guidance and support, see https://docs.acquia.com/blt/support/
The command failed. This often indicates a problem with your configuration. Review the command output above for more detailed errors, and consider re-running with verbose output for more information.
Command `validate:yaml:lint:files 'docroot/themes/custom/nyunursing/one.yml'` exited with code 1.
For troubleshooting guidance and support, see https://docs.acquia.com/blt/support/
`validate:yaml:lint:files` finished with an error.
> validate:yaml:lint:files
Linting YAML files...
[info] No files were found in fileset files.yaml. Skipped.
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
[info] No files were found in fileset files.yaml. Skipped.
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
[info] No files were found in fileset files.yaml. Skipped.
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
[info] No files were found in fileset files.yaml. Skipped.
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
[info] No files were found in fileset files.yaml. Skipped.
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
[info] No files were found in fileset files.yaml. Skipped.
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
[info] No files were found in fileset files.yaml. Skipped.
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
[info] No files were found in fileset files.yaml. Skipped.
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
[info] No files were found in fileset files.yaml. Skipped.
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
[info] No files were found in fileset files.yaml. Skipped.
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
[info] No files were found in fileset files.yaml. Skipped.
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
[info] No files were found in fileset files.yaml. Skipped.
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
[info] No files were found in fileset files.yaml. Skipped.
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
[info] No files were found in fileset files.yaml. Skipped.
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
[info] No files were found in fileset files.yaml. Skipped.
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
[info] No files were found in fileset files.yaml. Skipped.
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
[info] No files were found in fileset files.yaml. Skipped.
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
[info] No files were found in fileset files.yaml. Skipped.
`validate:yaml:lint:files` finished successfully.
> validate:yaml:lint:files
Linting YAML files...
[info] No files were found in fileset files.yaml. Skipped.
`validate:yaml:lint:files` finished successfully.
9.433s total time elapsed.
The text was updated successfully, but these errors were encountered:
Describe the bug
Using the
blt validate:yaml:lint:files
iteratively as part of a Robo watch task the task fails to find obvious violations after an initial violation is found. The behavior can be reproduced outside of a watch task by calling the validation task in a loop.Same issue has been reported in version
10.x
3015 and patch has been merged into10.x
#3470 . Code changes appear to not have been implemented in v12.x
forYamlCommand
and only for theTwigCommand
.To Reproduce
Steps to reproduce the behavior, ideally starting from a fresh install of BLT:
docroot/themes/custom/test/one.yml
:docroot/themes/custom/test/two.yml
:I get the following output:
And I expected that violations would be found in
one.yml
andtwo.yml
during each invocation.With verbose output, BLT reports that the fileset is inexplicably empty:
The text was updated successfully, but these errors were encountered: