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

fix(github): send null job_id to fix 422 during resubmission #269

Merged
merged 1 commit into from Mar 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 8 additions & 3 deletions coveralls/api.py
Expand Up @@ -235,9 +235,14 @@ def wear(self, dry_run=False):
# attach a random value to ensure uniqueness
# TODO: an auto-incrementing integer might be easier to reason
# about if we could fetch the previous value
new_id = '{}-{}'.format(
self.config.get('service_job_id', 42),
random.randint(0, sys.maxsize))
# N.B. Github Actions fails if this is not set to null.
# Other services fail if this is set to null. Sigh x2.
if os.environ.get('GITHUB_REPOSITORY'):
new_id = None
else:
new_id = '{}-{}'.format(
self.config.get('service_job_id', 42),
random.randint(0, sys.maxsize))
print('resubmitting with id {}'.format(new_id))

self.config['service_job_id'] = new_id
Expand Down