Kustomize: Can't run make prow-presubmit-check locally

Created on 6 Nov 2020  路  3Comments  路  Source: kubernetes-sigs/kustomize

When running the prow presubmit check locally, it fails on the test-multi-module check because the environment variables REPO_OWNER, REPO_NAME, PULL_NUMBER are not set.

My current workaround is to manually set these variables in my local environment.

aredependency kinbug prioritimportant-soon triagaccepted

Most helpful comment

I will vote for #1. If the multi-repo check requires a PR exists, then it doesn't make sense to run it locally.

All 3 comments

@runewake2

@monopole the multi-repo check is using prow ENV variables. These are not available when the prow-presubmit-check is run directly from the Makefile. I can see a few ways to approach this:

  1. Disable multi-module span check when run locally (probably detect this by a ENV like PULL_NUMER not set).
  2. Split prow-presubmit-check into two make commands. One for local runs excluding prow specific jobs and another for prow which is inclusive of these jobs and the previous job.
  3. Setup some defaults including some PR that the check is run against by default.

Do you have thoughts on which approach would be preferred? Is there another approach that isn't listed?

In meantime providing REPO_OWNER, REPO_NAME, PULL_NUMBER during local runs can get around this but is inconvenient.

I will vote for #1. If the multi-repo check requires a PR exists, then it doesn't make sense to run it locally.

Was this page helpful?
0 / 5 - 0 ratings