Skip to content

Add systemd dep on network for startup#734

Merged
f-f merged 1 commit intomasterfrom
trh/network-dep
Jan 31, 2026
Merged

Add systemd dep on network for startup#734
f-f merged 1 commit intomasterfrom
trh/network-dep

Conversation

@thomashoneyman
Copy link
Copy Markdown
Member

Noticed that on startup when pulling metadata the server will print an error connecting to github.com – we need to ensure we've got the network ready before starting the server.

@thomashoneyman
Copy link
Copy Markdown
Member Author

As per the below: the executor starts, fails and exits because it cannot access github, restarts, and then succeeds. With this change we avoid the spurious failure.

[root@registry:~]# journalctl -u server.service -f
Jan 31 20:07:09 registry registry-server-init[657]: Found repo at path scratch/registry, pulling latest.
Jan 31 20:07:09 registry registry-server-init[657]: Found the purescript/registry repo locally at scratch/registry, fetching latest changes...
Jan 31 20:07:10 registry registry-server-init[657]: [ERROR] Could not read metadata because the registry repo could not be checked: Failed to fetch origin  in local checkout scratch/registry: fatal: unable to access 'https://github.com/purescript/registry.git/': Could not resolve host: github.com
Jan 31 20:07:10 registry registry-server-init[657]: Job executor failed: Could not read metadata because the registry repo could not be checked: Failed to fetch origin  in local checkout scratch/registry: fatal: unable to access 'https://github.com/purescript/registry.git/': Could not resolve host: github.com
Jan 31 20:07:10 registry registry-server-init[657]: Starting Job Executor
Jan 31 20:07:10 registry registry-server-init[657]: Checking if there's a new compiler in town...
Jan 31 20:07:10 registry registry-server-init[657]: Reading metadata for prelude from disk because it is not available in cache.
Jan 31 20:07:10 registry registry-server-init[657]: Successfully read metadata for prelude from path scratch/registry/metadata/prelude.json
Jan 31 20:07:10 registry registry-server-init[657]: Successfully read metadata for prelude from path scratch/registry/metadata/prelude.json
Jan 31 20:07:10 registry registry-server-init[657]: Setting metadata cache to singleton entry (as cache was previously empty).

@thomashoneyman
Copy link
Copy Markdown
Member Author

I went ahead and redeployed the server with this patch as a test I could roll back on failure; this was the result:

Jan 31 20:26:13 registry systemd[1]: Started registry server.
Jan 31 20:26:14 registry registry-server-init[2536]: Starting Job Executor
Jan 31 20:26:14 registry registry-server-init[2536]: HTTPurple 🪁 up and running on http://0.0.0.0:8080
Jan 31 20:26:14 registry registry-server-init[2536]: Checking if there's a new compiler in town...
Jan 31 20:26:14 registry registry-server-init[2536]: Fetching repo at path scratch/registry
Jan 31 20:26:14 registry registry-server-init[2536]: Found repo at path scratch/registry, pulling latest.
Jan 31 20:26:14 registry registry-server-init[2536]: Found the purescript/registry repo locally at scratch/registry, fetching latest changes...
Jan 31 20:26:14 registry registry-server-init[2536]: Local checkout of purescript/registry has no untracked or dirty files, it is safe to pull the latest.
Jan 31 20:26:14 registry registry-server-init[2536]: Local checkout of purescript/registry is up to date, not pulling.
Jan 31 20:26:14 registry registry-server-init[2536]: Reading metadata for prelude from disk because it is not available in cache.
Jan 31 20:26:15 registry registry-server-init[2536]: Successfully read metadata for prelude from path scratch/registry/metadata/prelude.json
Jan 31 20:26:15 registry registry-server-init[2536]: Successfully read metadata for prelude from path scratch/registry/metadata/prelude.json
Jan 31 20:26:15 registry registry-server-init[2536]: Setting metadata cache to singleton entry (as cache was previously empty).

@f-f f-f merged commit cc24099 into master Jan 31, 2026
18 checks passed
@f-f f-f deleted the trh/network-dep branch January 31, 2026 20:58
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.

2 participants