Skip to content

Update Swirl, take two #2432

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

Merged
merged 1 commit into from
May 2, 2020
Merged

Conversation

sgrif
Copy link
Contributor

@sgrif sgrif commented Apr 16, 2020

This is a second attempt at #2269, which had to be reverted shortly
after being deployed, as it caused jobs to fail to run in production.
This commit only differs from that PR in the revision of swirl used.

The cause of the issue was the change in the signature of
update_downloads, which does not need anything from the job
environment, and so it only takes a connection. This changed the
environment type for that job from background_jobs::Environment to
(), so our runner no longer knew how to run that job.

The smallest fix in crates.io would have been to add an unused
environment argument to update_downloads. However, having some jobs
not require a shared environment felt common enough that I fixed this in
swirl instead. sgrif/swirl#23 changed the
behavior so jobs with no environment (a.k.a. the environment type is
()) are always run, regardless of the environment type of the runner.

Since update_downloads is essentially a cron job, and is not enqueued
from the web server directly, this was not caught by our integration
suite. This case was caught quickly after being deployed, and only
affected a non-critical part of the service, so I've opted not to figure
out how to add this to our integration suite.

r? @jtgeibel

This is a second attempt at rust-lang#2269, which had to be reverted shortly
after being deployed, as it caused jobs to fail to run in production.
This commit only differs from that PR in the revision of swirl used.

The cause of the issue was the change in the signature of
`update_downloads`, which does not need anything from the job
environment, and so it only takes a connection. This changed the
environment type for that job from `background_jobs::Environment` to
`()`, so our runner no longer knew how to run that job.

The smallest fix in crates.io would have been to add an unused
environment argument to `update_downloads`. However, having some jobs
not require a shared environment felt common enough that I fixed this in
swirl instead. sgrif/swirl#23 changed the
behavior so jobs with no environment (a.k.a. the environment type is
`()`) are always run, regardless of the environment type of the runner.

Since `update_downloads` is essentially a cron job, and is not enqueued
from the web server directly, this was not caught by our integration
suite. This case was caught quickly after being deployed, and only
affected a non-critical part of the service, so I've opted not to figure
out how to add this to our integration suite.
@jtgeibel
Copy link
Member

jtgeibel commented May 2, 2020

Looks good to me! I've tested locally and confirm that publish, yank/unyank, update_downloads, and dump_db all work for me.

@bors r+

@bors
Copy link
Contributor

bors commented May 2, 2020

📌 Commit 97d7fc8 has been approved by jtgeibel

@bors
Copy link
Contributor

bors commented May 2, 2020

⌛ Testing commit 97d7fc8 with merge 06bfd00...

@bors
Copy link
Contributor

bors commented May 2, 2020

☀️ Test successful - checks-travis
Approved by: jtgeibel
Pushing 06bfd00 to master...

@bors bors merged commit 06bfd00 into rust-lang:master May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants