mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-13 03:42:35 -06:00
5418908e1c
Previously we would internally reference modules by only their `path` which was, for data files, the system path but bundles it is relative to the root of the bundle. In theory data paths and bundle paths could collide, but the real trouble is caused by multiple bundles. It was very easy to have two bundles with identical file paths but different packages and policies defined in them. Internally we now reference bundle module id's as a combination of the bundle name (or the file path for the bundle if loaded from CLI) and the path within the bundle. This does change the `id` a particular policy will show up at via the storage ListPolicies and in turn REST API for OPA. This only affects users that have switched to the `bundles` configuration option, or that are using the `-b`/`--bundle` CLI options to load bundles. The older style `bundle` config keyword and loading tarballs from as data paths are still going to use the older ID. Fixes: #1725 Signed-off-by: Patrick East <east.patrick@gmail.com>