Commit Graph

6 Commits

Author SHA1 Message Date
Hari Kannan 56d6b9c334 opa inspect: fix prefix error when inspecting bundle from root (#5522)
This commit fixes an issue around Windows paths in `opa inspect`, and
updates the `build/binary-smoke-test.sh` script to check for the problem
in the future.

Fixes: #5503 

Signed-off-by: harikannan512 <harikannan512@gmail.com>
2023-01-24 14:19:45 -05:00
Stephan Renatus 6f65add42b binary-smoke: fix typo, copy-edit script (#5518)
Small follow-up to #5508: typo and whitespace fix.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2023-01-03 10:08:26 +01:00
shm12 0e398fdcd7 opa inspect: Fix path of data namespaces on windows (#5508)
Instead of a hard-coded "/", we're now using os.PathSeparator to process
the file path. It's also cleaned before displaying.

Fixes part of #5503.

Signed-off-by: shm12 <shm.bia@gmail.com>
2023-01-03 09:53:14 +01:00
Stephan Renatus 7c05205389 ast/visit: include LazyObject in walks (#5482)
In situations involving PE, it's possible that we walk over an AST that
contains objects taken from the store. With the lazy-objects
optimization, those objects had been neglected: the walker code only
cared for `*object`, not the `Object` interface, for performance reasons.

Now, we'll include the `Object` interface, which covers our lazy
objects, and thus include them in AST walks.

Fixes #5479.

* smoke test: update bundle to use some data

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2022-12-14 11:25:09 +01:00
Stephan Renatus fb9875f770 test/cli: add simple bundle build tests (#5346)
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2022-11-04 18:02:25 +01:00
Stephan Renatus a8f8b0ef78 cmd/exec: convert slashes of explicit bundles (#5219)
The incoming relative path is now converted as follows:

1. filepath.Abs:     foo/bar          -> c:\a\b\c\foo\bar
2. filepath.ToShasl: c:\a\b\c\foo\bar -> c:/a/b/c/foo/bar
3. prepend `file://`

That's something the runtime can make sense of, and the smoke test passes.

Fixes #5134.

Includes:
* ci: add smoke test with a bundle

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2022-10-10 13:06:09 +02:00