From 3f7850f0ed46f4b13848b57744ea68504cbe83ce Mon Sep 17 00:00:00 2001 From: slonka Date: Thu, 8 Feb 2024 09:26:11 +0100 Subject: [PATCH] fix(oci): add missing method WithBundleParserOpts to oci_downloader_unavailable Signed-off-by: slonka --- .github/workflows/pull-request.yaml | 9 +++++++-- download/oci_download_unavailable.go | 6 ++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index dc0a8de5f6..10f073f7f9 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -30,7 +30,7 @@ jobs: capabilities.json go-build: - name: Go Build (${{ matrix.os }}${{ matrix.arch && format(' {0}', matrix.arch) || '' }}) + name: Go Build (${{ matrix.os }}${{ matrix.arch && format(' {0}', matrix.arch) || '' }}${{ matrix.go_tags }}) runs-on: ${{ matrix.run }} needs: generate strategy: @@ -45,6 +45,11 @@ jobs: run: ubuntu-22.04 targets: ci-go-ci-build-linux-static arch: arm64 + - os: linux + run: ubuntu-22.04 + targets: ci-go-ci-build-linux-static + go_tags: GO_TAGS="-tags=opa_no_oci" + arch: arm64 - os: windows run: ubuntu-22.04 targets: ci-go-ci-build-windows @@ -71,7 +76,7 @@ jobs: name: generated - name: Build - run: make ${{ matrix.targets }} + run: make ${{ matrix.go_tags }} ${{ matrix.targets }} env: GOARCH: ${{ matrix.arch }} timeout-minutes: 30 diff --git a/download/oci_download_unavailable.go b/download/oci_download_unavailable.go index 725c3f3b81..e105d2bd79 100644 --- a/download/oci_download_unavailable.go +++ b/download/oci_download_unavailable.go @@ -4,6 +4,8 @@ package download import ( "context" + + "github.com/open-policy-agent/opa/ast" "github.com/open-policy-agent/opa/bundle" "github.com/open-policy-agent/opa/plugins/rest" ) @@ -51,3 +53,7 @@ func (d *OCIDownloader) Start(context.Context) { func (d *OCIDownloader) Stop(context.Context) { panic("built without OCI support") } + +func (*OCIDownloader) WithBundleParserOpts(ast.ParserOptions) *OCIDownloader { + panic("built without OCI support") +}