Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new meilisearch version (1.11.3) fails to start through devenv up #1667

Open
realugi opened this issue Jan 10, 2025 · 0 comments
Open

new meilisearch version (1.11.3) fails to start through devenv up #1667

realugi opened this issue Jan 10, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@realugi
Copy link

realugi commented Jan 10, 2025

Describe the bug
Once I upgraded my meilisearch version from 1.7.6 to 1.11.3 (through upgrading nixpkgs), I encountered an error when starting it via devenv up. The error says that the value 1 is invalid for the --no-analytics command line parameter, which in devenv is set via the environment variable MEILI_NO_ANALYTICS.

To reproduce

  1. create the following flake.nix file:
see flake.nix
{
    inputs = {
        nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
        devenv.url = "github:cachix/devenv";
        devenv.inputs.nixpkgs.follows = "nixpkgs";
    };

    nixConfig = {
        extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
        extra-substituters = "https://devenv.cachix.org";
    };

    outputs = inputs@{ self, nixpkgs, devenv, ...}:
        let
            system = "x86_64-linux";
            pkgs = nixpkgs.legacyPackages."${system}";
        in
        {
            devShells.${system}.default = devenv.lib.mkShell {
                inherit inputs pkgs;
                modules = [
                    ({ pkgs, config, ... }: {
                        services.meilisearch.enable = true;
                    })
                ];
            };
            devenv-up = self.devShells.${system}.default.config.procfileScript;
        };
}
  1. create the following flake.lock file (for reproducability):
see flake.lock
{
  "nodes": {
    "cachix": {
      "inputs": {
        "devenv": [
          "devenv"
        ],
        "flake-compat": [
          "devenv"
        ],
        "git-hooks": [
          "devenv"
        ],
        "nixpkgs": "nixpkgs"
      },
      "locked": {
        "lastModified": 1728672398,
        "narHash": "sha256-KxuGSoVUFnQLB2ZcYODW7AVPAh9JqRlD5BrfsC/Q4qs=",
        "owner": "cachix",
        "repo": "cachix",
        "rev": "aac51f698309fd0f381149214b7eee213c66ef0a",
        "type": "github"
      },
      "original": {
        "owner": "cachix",
        "ref": "latest",
        "repo": "cachix",
        "type": "github"
      }
    },
    "devenv": {
      "inputs": {
        "cachix": "cachix",
        "flake-compat": "flake-compat",
        "git-hooks": "git-hooks",
        "nix": "nix",
        "nixpkgs": [
          "nixpkgs"
        ]
      },
      "locked": {
        "lastModified": 1736426010,
        "narHash": "sha256-d0rE+u8/rQjXLvDobz1StGTfqvRKvq+8kVsHnIGVD1o=",
        "owner": "cachix",
        "repo": "devenv",
        "rev": "1c384bc4be3ee571511fbbc6fdc94fe47d60f6cf",
        "type": "github"
      },
      "original": {
        "owner": "cachix",
        "repo": "devenv",
        "type": "github"
      }
    },
    "flake-compat": {
      "flake": false,
      "locked": {
        "lastModified": 1696426674,
        "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
        "owner": "edolstra",
        "repo": "flake-compat",
        "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
        "type": "github"
      },
      "original": {
        "owner": "edolstra",
        "repo": "flake-compat",
        "type": "github"
      }
    },
    "flake-parts": {
      "inputs": {
        "nixpkgs-lib": [
          "devenv",
          "nix",
          "nixpkgs"
        ]
      },
      "locked": {
        "lastModified": 1712014858,
        "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
        "owner": "hercules-ci",
        "repo": "flake-parts",
        "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
        "type": "github"
      },
      "original": {
        "owner": "hercules-ci",
        "repo": "flake-parts",
        "type": "github"
      }
    },
    "git-hooks": {
      "inputs": {
        "flake-compat": [
          "devenv"
        ],
        "gitignore": "gitignore",
        "nixpkgs": [
          "devenv",
          "nixpkgs"
        ],
        "nixpkgs-stable": [
          "devenv"
        ]
      },
      "locked": {
        "lastModified": 1730302582,
        "narHash": "sha256-W1MIJpADXQCgosJZT8qBYLRuZls2KSiKdpnTVdKBuvU=",
        "owner": "cachix",
        "repo": "git-hooks.nix",
        "rev": "af8a16fe5c264f5e9e18bcee2859b40a656876cf",
        "type": "github"
      },
      "original": {
        "owner": "cachix",
        "repo": "git-hooks.nix",
        "type": "github"
      }
    },
    "gitignore": {
      "inputs": {
        "nixpkgs": [
          "devenv",
          "git-hooks",
          "nixpkgs"
        ]
      },
      "locked": {
        "lastModified": 1709087332,
        "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
        "owner": "hercules-ci",
        "repo": "gitignore.nix",
        "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
        "type": "github"
      },
      "original": {
        "owner": "hercules-ci",
        "repo": "gitignore.nix",
        "type": "github"
      }
    },
    "libgit2": {
      "flake": false,
      "locked": {
        "lastModified": 1697646580,
        "narHash": "sha256-oX4Z3S9WtJlwvj0uH9HlYcWv+x1hqp8mhXl7HsLu2f0=",
        "owner": "libgit2",
        "repo": "libgit2",
        "rev": "45fd9ed7ae1a9b74b957ef4f337bc3c8b3df01b5",
        "type": "github"
      },
      "original": {
        "owner": "libgit2",
        "repo": "libgit2",
        "type": "github"
      }
    },
    "nix": {
      "inputs": {
        "flake-compat": [
          "devenv"
        ],
        "flake-parts": "flake-parts",
        "libgit2": "libgit2",
        "nixpkgs": "nixpkgs_2",
        "nixpkgs-23-11": [
          "devenv"
        ],
        "nixpkgs-regression": [
          "devenv"
        ],
        "pre-commit-hooks": [
          "devenv"
        ]
      },
      "locked": {
        "lastModified": 1727438425,
        "narHash": "sha256-X8ES7I1cfNhR9oKp06F6ir4Np70WGZU5sfCOuNBEwMg=",
        "owner": "domenkozar",
        "repo": "nix",
        "rev": "f6c5ae4c1b2e411e6b1e6a8181cc84363d6a7546",
        "type": "github"
      },
      "original": {
        "owner": "domenkozar",
        "ref": "devenv-2.24",
        "repo": "nix",
        "type": "github"
      }
    },
    "nixpkgs": {
      "locked": {
        "lastModified": 1730531603,
        "narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=",
        "owner": "NixOS",
        "repo": "nixpkgs",
        "rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d",
        "type": "github"
      },
      "original": {
        "owner": "NixOS",
        "ref": "nixos-unstable",
        "repo": "nixpkgs",
        "type": "github"
      }
    },
    "nixpkgs_2": {
      "locked": {
        "lastModified": 1717432640,
        "narHash": "sha256-+f9c4/ZX5MWDOuB1rKoWj+lBNm0z0rs4CK47HBLxy1o=",
        "owner": "NixOS",
        "repo": "nixpkgs",
        "rev": "88269ab3044128b7c2f4c7d68448b2fb50456870",
        "type": "github"
      },
      "original": {
        "owner": "NixOS",
        "ref": "release-24.05",
        "repo": "nixpkgs",
        "type": "github"
      }
    },
    "nixpkgs_3": {
      "locked": {
        "lastModified": 1736200483,
        "narHash": "sha256-JO+lFN2HsCwSLMUWXHeOad6QUxOuwe9UOAF/iSl1J4I=",
        "owner": "NixOS",
        "repo": "nixpkgs",
        "rev": "3f0a8ac25fb674611b98089ca3a5dd6480175751",
        "type": "github"
      },
      "original": {
        "owner": "NixOS",
        "ref": "nixos-24.11",
        "repo": "nixpkgs",
        "type": "github"
      }
    },
    "root": {
      "inputs": {
        "devenv": "devenv",
        "nixpkgs": "nixpkgs_3"
      }
    }
  },
  "root": "root",
  "version": 7
}
  1. run nix develop --impure
  2. run devenv up --tui=false

I see the following log output:

see actual log output
$ devenv up --tui=false
[meilisearch    ] error: invalid value '1' for '--no-analytics'
[meilisearch    ]   [possible values: true, false]
[meilisearch    ]
[meilisearch    ] For more information, try '--help'.

But I would expect the following log output:

see expected log output
$ devenv up --tui=false
[meilisearch    ]
[meilisearch    ] 888b     d888          d8b 888 d8b                                            888
[meilisearch    ] 8888b   d8888          Y8P 888 Y8P                                            888
[meilisearch    ] 88888b.d88888              888                                                888
[meilisearch    ] 888Y88888P888  .d88b.  888 888 888 .d8888b   .d88b.   8888b.  888d888 .d8888b 88888b.
[meilisearch    ] 888 Y888P 888 d8P  Y8b 888 888 888 88K      d8P  Y8b     "88b 888P"  d88P"    888 "88b
[meilisearch    ] 888  Y8P  888 88888888 888 888 888 "Y8888b. 88888888 .d888888 888    888      888  888
[meilisearch    ] 888   "   888 Y8b.     888 888 888      X88 Y8b.     888  888 888    Y88b.    888  888
[meilisearch    ] 888       888  "Y8888  888 888 888  88888P'  "Y8888  "Y888888 888     "Y8888P 888  888
[meilisearch    ]
[meilisearch    ] Config file path:     "none"
[meilisearch    ] Database path:                "/home/create/repos/meilisearch-devenv-bug/.devenv/state/meilisearch"
[meilisearch    ] Server listening on:  "http://127.0.0.1:7700"
[meilisearch    ] Environment:          "development"
[meilisearch    ] Commit SHA:           "unknown"
[meilisearch    ] Commit date:          "unknown"
[meilisearch    ] Package version:      "1.11.3"
[meilisearch    ] Anonymous telemetry:  "Disabled"
[meilisearch    ]
[meilisearch    ]
[meilisearch    ]
[meilisearch    ]  No master key was found. The server will accept unidentified requests.
[meilisearch    ]
[meilisearch    ]  A master key of at least 16 bytes will be required when switching to a production environment.
[meilisearch    ]
[meilisearch    ]
[meilisearch    ] We generated a new secure master key for you (you can safely use this token):
[meilisearch    ]
[meilisearch    ] >> --master-key mnrEX33qQjKRoOvDeGuNr2rPo5trtvkMQoITy_4qb2k <<
[meilisearch    ]
[meilisearch    ] Restart Meilisearch with the argument above to use this new and secure master key.
[meilisearch    ]
[meilisearch    ] Check out Meilisearch Cloud!  https://www.meilisearch.com/cloud?utm_campaign=oss&utm_source=engine&utm_medium=cli
[meilisearch    ] Documentation:                        https://www.meilisearch.com/docs
[meilisearch    ] Source code:                  https://github.com/meilisearch/meilisearch
[meilisearch    ] Discord:                      https://discord.meilisearch.com

Version

devenv version: 1.3.1
devenv commit ref: 1c384bc4be3ee571511fbbc6fdc94fe47d60f6cf (see flake.lock)
nixpkgs commit ref: 3f0a8ac25fb674611b98089ca3a5dd6480175751 (see flake.lock)
I am using flakes.

As for the meilisearch version, I know that it does work with 1.7.6 and that it does not work with 1.11.3. I have looked through the meilisearch changelogs in order to pin down the version where this change happened, but have not found it documented there (though I may have overlooked it).

Workaround

Foce the environment variable MEILI_NO_ANALYTICS to be true instead of 1:

env.MEILI_NO_ANALYTICS = lib.mkForce "true";
@realugi realugi added the bug Something isn't working label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant