Skip to content

environment.yml uses conda channel 'default' instead of 'defaults'; trailing space in _toc.yml #607

Description

@mmcky

Two small defects in the build configuration, both found while porting this repo's scaffold into the new lecture-python-programming.ml edition (QuantEcon/lecture-python-programming.ml#6). Neither breaks the build today; the first is a latent failure worth getting ahead of.

1. environment.yml names the conda channel default, not defaults

default is not a conda channel. Conda adds it as a literal channel name and then resolves the packages from defaults, which it still adds implicitly — and warns about doing so:

Adding channel 'default'
[command]/home/runner/miniconda3/condabin/conda config --add channels default
##[warning]The 'defaults' channel might have been added implicitly. If this is intentional, add 'defaults' to the 'channels' list. Otherwise, consider setting 'conda-remove-defaults' to 'true'.

So the environment resolves by accident. Conda is deprecating the implicit-defaults behaviour, and when it goes the build fails to resolve anything.

This affects three editions — this repo, lecture-python-programming.fr and lecture-python-programming.fa — all of which carry - default. lecture-python-programming.zh-cn already has - defaults and is unaffected, so the corrected form is already proven in the fleet.

The fix is one word in environment.yml.

2. lectures/_toc.yml line 39 has a trailing space

The entry reads - file: workspace rather than - file: workspace. This is harmless in practice — YAML strips trailing whitespace from plain scalars, so both jb build and any tooling reading the file see workspace — but it propagates verbatim into every translation edition, since action-translation copies _toc.yml from source as-is. It surfaced as a review comment on the downstream PR, where fixing it locally would only have created drift against this repo.

Worth correcting here so it stops being re-copied.

Activity

  1. mmcky commented on Aug 7, 2026

    @mmcky
    ContributorAuthor

    Widening the scope of item 1: this is seven repos, not three editions — and it has already cost build time, which changes it from "latent, worth getting ahead of" to something with a measured failure attached.

    Found while independently validating QuantEcon/data-lectures#51.

    Scope

    channels: - default is declared in environment.yml on the default branch of all seven of these — confirmed live via the contents API and a YAML parser rather than from local clones, so no stale checkout is in play:

    Repo channels
    continuous_time_mcs ['default']
    lecture-dp ['default']
    lecture-jax ['default']
    lecture-python-advanced.myst ['default']
    lecture-python-intro ['default']
    lecture-python-programming ['default']
    lecture-python.myst ['default']

    It has already cost two failed publish attempts

    lecture-python-intro run 31133959513, tag publish-2026aug07. Attempts 1 and 2 both died at the Setup Anaconda step — roughly 11 minutes of build time — and attempt 3 succeeded with byte-identical configuration:

    Attempt Outcome Error
    1 fail, 00:14:48Z CondaHTTPError: HTTP 000 CONNECTION FAILED
    2 fail, 00:21:30Z CondaHTTPError: HTTP 503 Service Unavailable
    3 success, 00:39:30Z — no change to any file

    Both failures were fetching https://conda.anaconda.org/default/linux-64/repodata.json. That is the channel this line names.

    The attribution holds rather than being circumstantial: every one of the 20 timeout errors in attempt 1 names host conda.anaconda.org and none names repo.anaconda.com, and defaults was demonstrably healthy during the same failing step — ToS accepted for pkgs/main and pkgs/r at 00:15:41, mid-failure. Had the file said defaults, the build would never have contacted the host that failed.

    Two corrections to the evidence in the issue body

    Both matter for anyone fixing this across seven repos, because they change what you should expect to see.

    The deprecation warning is not universal. The Adding channel 'default' / conda-remove-defaults warning quoted above appears in none of intro's three attempt logs — grep count 0. Intro's logs instead show the channel list resolving as Channels: - default - defaults. So the warning is real in the run you saw but is not a reliable signal for finding affected repos; parsing environment.yml is.

    The channel is empty, not slow. https://conda.anaconda.org/default/ exists and returns HTTP 200 with 160 bytes of {"packages":{},"packages.conda":{}}. An early draft of this finding claimed it was pathologically slow (27s); that does not reproduce — nine consecutive samples came back in 0.266–0.482s. The defect is the needless dependency on an empty third-party channel, not latency. Worth stating plainly so the fix isn't justified on a number that won't hold up.

    Being fair about severity

    This is intermittent exposure, not constant. It is the only run in lecture-python-intro's last 40 to need a retry, and git blame puts the line in 2c42e29a (2023-01-25), untouched for about three and a half years and green across every publish since. The environments resolve because conda also carries defaults from the separate host repo.anaconda.com.

    But every one of these seven repos currently makes each build depend on an anaconda.org channel that supplies zero packages, for no benefit — and when that host has a bad day, the build fails at step 4 with an error that names a channel nobody intended to use. The fix is one word per repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions