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

The validate goal behaves badly until configured. #12189

Closed
jsirois opened this issue Jun 10, 2021 · 0 comments · Fixed by #14104
Closed

The validate goal behaves badly until configured. #12189

jsirois opened this issue Jun 10, 2021 · 0 comments · Fixed by #14104
Labels

Comments

@jsirois
Copy link
Contributor

jsirois commented Jun 10, 2021

For example, over in the example-python repo, where validate is not configured, you get:

$ ./pants validate
09:34:36.43 [ERROR] Exception caught: (pants.engine.internals.scheduler.ExecutionError)
  File "/home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/2.5.0_py39/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 234, in _run_inner
    return self._perform_run(goals)
  File "/home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/2.5.0_py39/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 173, in _perform_run
    return self._perform_run_body(goals, poll=False)
  File "/home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/2.5.0_py39/lib/python3.9/site-packages/pants/bin/local_pants_runner.py", line 190, in _perform_run_body
    return self.graph_session.run_goal_rules(
  File "/home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/2.5.0_py39/lib/python3.9/site-packages/pants/init/engine_initializer.py", line 135, in run_goal_rules
    exit_code = self.scheduler_session.run_goal_rule(
  File "/home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/2.5.0_py39/lib/python3.9/site-packages/pants/engine/internals/scheduler.py", line 530, in run_goal_rule
    self._raise_on_error([t for _, t in throws])
  File "/home/jsirois/.cache/pants/setup/bootstrap-Linux-x86_64/2.5.0_py39/lib/python3.9/site-packages/pants/engine/internals/scheduler.py", line 498, in _raise_on_error
    raise ExecutionError(

Exception message: 1 Exception encountered:

  KeyError: 'path_patterns'


(Use --print-stacktrace to see more error details.)
@benjyw benjyw removed rules labels Sep 9, 2021
Eric-Arellano added a commit that referenced this issue Jan 7, 2022
Closes #12189.

This also will allow us in #14102 to know whether to run `validate` as part of the `lint` goal or not. If it isn't configured, we'll skip it.

[ci skip-rust]
[ci skip-build-wheels]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants