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

prow: investifgate not exposing any job configuration to the test container #7810

Closed
stevekuznetsov opened this issue Apr 20, 2018 · 6 comments
Assignees
Labels
area/prow Issues or PRs related to prow

Comments

@stevekuznetsov
Copy link
Contributor

Follow-up to #7594

We should try to understand the current set of uses that jobs have for the Prow environment variables like $JOB_SPEC and determine if all of those use cases are solved by the pod utilities. If they are not, we should write more utilities to handle those cases. Test jobs should not really need infra level config exposed them.

/area prow
/kind enhancement
/assign

@BenTheElder
Copy link
Member

Our jobs definitely consume:

  • PULL_REFS
  • BUILD_NUMBER (they shouldn't but I guarantee something still does...)
  • BUILD_ID

Other than JOB_SPEC specifically, the prow env seem like useful things to expose. One use case for example is integrating with coveralls.io.
For JOB_SPEC OTOH we're not consuming this at the moment, and I'd rather see the PJ logged to cold storage.

@stevekuznetsov
Copy link
Contributor Author

Right but why are they?

  • $PULL_REFS should be consumed by clonerefs and not be important to jobs. Jobs should not muck with git state themselves if they're using the pod utilities.
  • $BUILD_NUMBER should be consumed by the GCS upload utilities, why would the job care?
  • $BUILD_ID same?

@BenTheElder
Copy link
Member

BenTheElder commented Apr 20, 2018

PULL_REFS is read by other tools to produce metadata about the job run, which avoids them using git in any fashion... coveralls wants to know the refs for example.
BUILD_ID / BUILD_NUMBER are used as unique IDs, see for example: #7682

@BenTheElder
Copy link
Member

I don't think the podutils should handle these cases. And by exposing these we prevent jobs trying to produce them on their own.
I also consume the ORG / REPO related env for bazel caching to key it, see: https://github.com/kubernetes/test-infra/blob/master/images/bootstrap/create_bazel_cache_rcs.sh

@stevekuznetsov
Copy link
Contributor Author

Those are perfect use-cases, thanks :) The point of this is just to investigate how we are using them and if there is room for another util or not.

@stevekuznetsov
Copy link
Contributor Author

As explained by Ben, we should keep exposing this info to tests.

/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/prow Issues or PRs related to prow
Projects
None yet
Development

No branches or pull requests

3 participants