Skip to content

Env Var COVERALLS_SERVICE_JOB_NUMBER maps to wrong config variable #303

@ashleysommer

Description

@ashleysommer

SERVICE_JOB_NUMBER and SERVICE_NUMBER are different things.

  • SERVICE_NUMBER should be the service build id, eg build #1938
  • SERVICE_JOB_NUMBER should be the the build step, eg step #2
  • SERVICE_JOB_ID should be the name of the build step, eg "pytest with coverage"

The CI-specific config handlers get the job_id right, but the code that processes environment vars seems to get it a bit confused, and doesn't provide a way to set SERVICE_JOB_ID.

number = os.environ.get('COVERALLS_SERVICE_JOB_NUMBER')
if number:
self.config['service_number'] = number

Should be:

    number = os.environ.get('COVERALLS_SERVICE_NUMBER')
    if number:
        self.config['service_number'] = number

    job_number = os.environ.get('COVERALLS_SERVICE_JOB_NUMBER')
    if job_number:
        self.config['service_job_number'] = job_number

    job_id = os.environ.get('COVERALLS_SERVICE_JOB_ID')
    if job_id:
        self.config['service_job_id'] = job_id

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions