Skip to content

Commit ebf8193

Browse files
committed
small fixes, comments
1 parent 46b4ad9 commit ebf8193

File tree

4 files changed

+22
-14
lines changed

4 files changed

+22
-14
lines changed

dockerfiles/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ RUN apt-get update \
191191

192192
WORKDIR /srv/docsrs
193193
# copy migrations so we can run them via CLI script
194-
# COPY migrations migrations/
194+
COPY migrations migrations/
195195

196196
ENTRYPOINT ["/usr/bin/tini", "/usr/local/bin/cratesfyi", "--"]
197197

justfiles/cli.just

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,5 @@ cli-queue-reset-last-seen-ref ref="--head":
9090
# find differences between crates.io and our own database, and fix them on our side.
9191
[group('cli')]
9292
[group('database')]
93-
cli-db-synchronize +args:
93+
cli-db-synchronize *args:
9494
just cli-watcher database synchronize {{ args }}

justfiles/services.just

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ compose-up-full:
3131
# Shutdown docker services, keep containers & volumes alive.
3232
[group('compose')]
3333
compose-down:
34-
docker compose --profile full down --remove-orphans
34+
docker compose --profile full --profile manual down --remove-orphans
3535

3636
# Shutdown docker services, then clean up docker images, volumes & other local artifacts from this docker-compose project
3737
[group('compose')]

src/docbuilder/rustwide_builder.rs

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -286,14 +286,14 @@ impl RustwideBuilder {
286286
// This fixes an edge-case on a fresh build server.
287287
//
288288
// It seems like on the fresh server, there _is_ a recent nightly toolchain
289-
// installed, which we then updated with necessary components in this
290-
// method.
289+
// installed. In this case, this method will just install necessary components and
290+
// doc-targets/platforms.
291291
//
292-
// But: *for this toolchain, we never ran `add_essential_files`*, because it
292+
// But: *for this local old toolchain, we never ran `add_essential_files`*, because it
293293
// was not installed by us.
294294
//
295295
// Now the culprit: even through we "fix" the previously installed nightly toolchain
296-
// with the needed components & targets, we return "updated = false", since the actual
296+
// with the needed components & targets, we return "updated = false", since the
297297
// version number didn't change.
298298
//
299299
// As a result, `BuildQueue::update_toolchain` will not call `add_essential_files`,
@@ -302,21 +302,29 @@ impl RustwideBuilder {
302302
// The workaround specifically for `add_essential_files` is the following:
303303
//
304304
// After `add_essential_files` is finished, it sets `ConfigName::RustcVersion` in the
305-
// database to the version it uploaded the essential files for.
305+
// config database to the rustc version it uploaded the essential files for.
306306
//
307307
// This means, if `ConfigName::RustcVersion` is empty, or different from the current new
308308
// version, we can set `updated = true` too.
309309
//
310310
// I feel like there are more edge-cases, but for now this is OK.
311311
//
312312
// Alternative would have been to run `build update-toolchain --only-first-time`
313-
// in a newly created `ENTRYPOINT` script for the build-server. I leaned to towards
314-
// a more self-contained solution which doesn't need docker at all, and also would work
315-
// if you run the build-server directly on your machine.
313+
// in a newly created `ENTRYPOINT` script for the build-server. This is how it was
314+
// done in the previous (one-dockerfile-and-process-for-everything) approach.
315+
// The `entrypoint.sh` script did call `add-essential-files --only-first-time`.
316+
//
317+
// Problem with that approach: this approach postpones the boot process of the
318+
// build-server, where docker and later the infra will try to check with a HTTP
319+
// endpoint to see if the build server is ready.
320+
//
321+
// So I leaned to towards a more self-contained solution which doesn't need docker
322+
// at all, and also would work if you run the build-server directly on your machine.
323+
//
316324
// Fixing it here also means the startup of the actual build-server including its
317-
// metrics collection endpoints don't be delayed. Generally shoudl doesn't be
318-
// a differene how much time is neede on a fresh build-server, between picking the
319-
// up from the queue, and actually starting to build the release. In the old
325+
// metrics collection endpoints don't be delayed. Generally should doesn't be
326+
// a differene how much time is needed on a fresh build-server, between picking the
327+
// release up from the queue, and actually starting to build the release. In the old
320328
// solution, the entrypoint would do the toolchain-update & add-essential files
321329
// before even starting the build-server, now we're roughly doing the same thing
322330
// inside the main builder loop.

0 commit comments

Comments
 (0)