Skip to content

Always run background jobs after a test publish #5042

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
Aug 3, 2022

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Aug 3, 2022

The original intent was that tests would be able to enqueue mutliple
actions and process them more asynchronously to act as more of a stress
test of the background worker logic. However, we have no tests explicity
testing such behavior and we can always add back such methods if we
decide to implement such tests.

This change reorders some requests in the http-data files. For the most
part requests are unchanged, however now if 2 versions of a crate are
published in rapid succession the HTTP index is guarenteed to see both
versions of that file.

Previously, if versions A and B were published they would both go in
the background queue. When the queue was processed, the versions would
be published to the git index and each of those jobs would enqueue an
HTTP sync. However, those syncs would occur after the two publishes and
so both syncs would see the full index file with both versions. This is
not an issue in production, as there is no requirement to push such
intermediate states to the HTTP index as long as it is eventually
consistent. In testing however, it is a bit more convenient to see the
more typical sequence of events.

Some tests now require the full test harness, even if a crate publish
is expected to fail.

Extracted from #5022

The original intent was that tests would be able to enqueue mutliple
actions and process them more asynchronously to act as more of a stress
test of the background worker logic. However, we have no tests explicity
testing such behavior and we can always add back such methods if we
decide to implement such tests.

This change reorders some requests in the http-data files. For the most
part requests are unchanged, however now if 2 versions of a crate are
published in rapid succession the HTTP index is guarenteed to see both
versions of that file.

Previously, if versions A and B were published they would both go in
the background queue. When the queue was processed, the versions would
be published to the git index and each of those jobs would enqueue an
HTTP sync. However, those syncs would occur after the two publishes and
so both syncs would see the full index file with both versions. This is
not an issue in production, as there is no requirement to push such
intermediate states to the HTTP index as long as it is eventually
consistent. In testing however, it is a bit more convenient to see the
more typical sequence of events.

Some tests now require the full test harness, even if a crate publish
is expected to fail.
@Turbo87 Turbo87 added C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear A-backend ⚙️ labels Aug 3, 2022
@Turbo87 Turbo87 merged commit e1a37be into rust-lang:master Aug 3, 2022
@Turbo87 Turbo87 deleted the test-publish branch August 3, 2022 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants