Skip to content

conda create --json results in two JSON documents #14569

@JeanChristopheMorinPerso

Description

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

When running conda create --dry-run --json, the output contains two JSON documents, one empty and the second one is good.

Command:

conda create --prefix /tmp/asd --dry-run --json --override-channels --channel defaults 'sqlalchemy 2.0.37.*' 'python 3.12.7.*' 'psycopg2 2.9.9.*' 'rich 13.9.4.*' 'conda-package-streaming 0.11.0.*' 'sqlite 3.45.3.*' 'conda 25.1.1.*' 'requests 2.32.3.*' 'pyyaml 6.0.2.*' 'zstandard 0.23.0.*' boto3 'botocore 1.36.3.*' 'fastapi 0.112.2.*' 'uvicorn 0.32.1.*' 'orjson 3.10.14.*' 'sqlalchemy-utils 0.41.2.*' 'alembic 1.13.3.*' 'python-json-logger 3.2.1.*' 'pip *'

Conda Info

active environment : test
    active env location : /home/runner/.local/conda/envs/test
            shell level : 2
       user config file : /home/runner/.condarc
 populated config files : /home/runner/.local/conda/.condarc
                          /home/runner/.condarc
          conda version : 25.1.1
    conda-build version : 25.1.2
         python version : 3.12.8.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=haswell
                          __conda=25.1.1=0
                          __glibc=2.35=0
                          __linux=5.10.233=0
                          __unix=0=0
       base environment : /home/runner/.local/conda  (writable)
      conda av data dir : /home/runner/.local/conda/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/runner/conda_pkgs_dir
       envs directories : /home/runner/.local/conda/envs
                          /home/runner/.conda/envs
               platform : linux-64
             user-agent : conda/25.1.1 requests/2.32.3 CPython/3.12.8 Linux/5.10.233-223.887.amzn2.x86_64 ubuntu/22.04.5 glibc/2.35 solver/libmamba conda-libmamba-solver/25.1.1 libmambapy/2.0.5 aau/0.5.0 c/. s/. e/.
                UID:GID : 1001:1001
             netrc file : None
           offline mode : False

Conda Config

==> /home/runner/.local/conda/.condarc <==
channels:
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
==> /home/runner/.condarc <==
auto_update_conda: False
auto_activate_base: True
notify_outdated_conda: False
changeps1: False
pkgs_dirs:
  - /home/runner/conda_pkgs_dir
channels:
  - defaults
always_yes: True
solver: libmamba
==> envvars <==
allow_softlinks: False

Conda list

# packages in environment at /home/runner/.local/conda/envs/test:
#
# Name                    Version                   Build  Channel

<empty>

Additional Context

Here is an example output (shortened):

{}
{
  "actions": {
    "FETCH": [
      {
        "build": "pyhd3eb1b0_0",
        "build_number": 0,
        "channel": "https://repo.anaconda.com/pkgs/main",
        "constrains": [
          "argon2_cffi 999"
        ],

Take a look at the first line.

I'm having quite hard time reproducing this outside CI. I actually can't reproduce outside CI (GitHub Actions).

Metadata

Metadata

Assignees

No one assigned

    Labels

    locked[bot] locked due to inactivityseverity::2critical; broken functionality with an unacceptably complex workaroundsource::anacondacreated by members of Anaconda, Inc.type::bugdescribes erroneous operation, use severity::* to classify the type

    Type

    No type

    Projects

    Status

    🏁 Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions