magus v0.4.3 is out. See what's new
¶ View markdown source · ✎ Suggest an edit
2 min read

MGS1040: magus.yaml has a key this magus does not know

A config file carries a key the running magus does not recognize, and every command stops before it loads the workspace:

[MGS1040] magus.yaml has keys this magus does not know:
  - env           (lines 16, 21, 26)
  - concurrencyy  (line 3; did you mean "concurrency"?)

This magus (v0.4.3) is older than the workspace needs (>= 0.4.4).
Fix it:
  - released binary: magus self update
  see: https://eli.gladman.cc/magus/reference/codes/magusfile/MGS1040/

Each unknown key is listed once with every line it appears on, at every level of the file, not only the top. The version gap and its fixes are stated once, after the list.

Why

Until v0.5.0 an unknown key was a warning (config: unknown or unexpected keys in config file) and the load carried on without it. The value you wrote was dropped, and a workspace that looked configured ran on the defaults. A value magus will not honor must never look like one it applied, so the load now fails instead. A file that loaded under v0.4.x with that warning fails under v0.5.0 with this code.

What to do

Read each key's line. It takes one of three forms:

  • did you mean "..."? The key is a near miss of one magus knows. Rename it:

    # before
    concurrencyy: 4
    # after
    concurrency: 4
    
  • renamed to "..." magus still knows the setting under a new name. Rename the key.

  • Line numbers only. Nothing known is close. Either the key belongs to a newer magus than the one running, so run one of the fixes listed after the keys (the message names this binary's version and the workspace's required_version), or the key is not a magus setting at all and the fix is to delete it.

magus doctor reports the same keys under its config-file check without running anything else. docs/reference/config lists every key magus reads.

See also

  • MGS1021: the workspace's required_version floor is newer than this magus.
  • MGS1038: the same stop for a removed magus.project option in a magusfile.
MGS1040magus.yamlconfigupgradeunknown keytypo
Last updated (d0ae56b1)
Earlier changes on this page (1)

Full history ↗ · Blame source ↗

Glossary

Workspace

The magus root directory that owns a set of projects and shared config; the unit magus operates over. See workspace.

Project

A directory magus recognizes as a unit of work (it has a magusfile); the unit of caching, scheduling, and dependency tracking. See workspace.

Magusfile

The magusfile.buzz that declares a project's targets (as export funs) and binds its spells. See targets.

Op

A single tool-native command a target composes (long form: operation); the middle of the work hierarchy (Spell to Op to Target). See operations.

Concurrency

How many targets run at once. It is bounded by the pool's capacity and set with --concurrency, MAGUS_CONCURRENCY, or the concurrency config key. See server.

Run

One target executing under one magus invocation, such as magus run test web or magus affected ci. A run keeps its captured output behind an output reference. Every magus run is a run whether or not any job asked for it; see Job for how the two relate.

Lease

The grant a holder takes on a job: the write and read paths that job declared, enforced in the checkout that took it with magus job exec. A job is the piece of work; a lease is permission over it.

Conventions

This page uses none of the site's convention markers. The full set is on the conventions page.