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

Regression in CLI Tool Testing Subcommand #275

Closed
jshlbrd opened this issue Nov 12, 2024 · 0 comments · Fixed by #279
Closed

Regression in CLI Tool Testing Subcommand #275

jshlbrd opened this issue Nov 12, 2024 · 0 comments · Fixed by #279

Comments

@jshlbrd
Copy link
Contributor

jshlbrd commented Nov 12, 2024

Describe the bug

The CLI tool has a regression in behavior between versions v2.2.0 and v2.3.1. In v2.3.1 configs that have relative imports fail with errors like this:

% substation test substation/threat_signals.libsonnet
?       substation/threat_signals.libsonnet    [error]
substation/threat_signals.libsonnet: RUNTIME ERROR: couldn't open import "./event.libsonnet": no match locally or in the Jsonnet library paths
        snippet:7:15-41 thunk <event> from <$>
        snippet:135:11-16
        Field "transforms"
        Array element 1
        Field "tests"
        During manifestation

This is fixed when running the CLI tool from the file's local directory. This also affects the vet subcommand.

To Reproduce

For v2.3.1, run a test for any file that uses relative imports in its tests or transforms config.

Expected behavior
Relative imports should not cause errors.

Screenshots
If applicable, add screenshots to help explain your problem.

Build (please complete the following information):

  • Architecture: arm64
  • Version: v2.3.1
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 a pull request may close this issue.

1 participant