Skip to content

Conversation

yuyuyureka
Copy link
Contributor

@yuyuyureka yuyuyureka commented Apr 1, 2025

Things done

It's not yet working (in the NixOS Test):

postgres[884]: [884] LOG:  Initialized documentdb_core extension
postgres[884]: [884] LOG:  Initialized pg_documentdb extension
[...]
ferretdb[829]: 2025-04-01T15:57:42.049Z       ERROR+1 mongoerrors/mongoerrors.go:148  Unmapped error code     {"arg":"","error":"lazyerror([msg_saslstart.go:55 handler.(*Handler).MsgSASLStart] [msg_saslstart.go:145 handler.(*Handler).saslStart] [pool.go:94 documentdb.(*Pool).WithConn] [pool.go:83 documentdb.(*Pool).Acquire] [pool_new.go:118 documentdb.newPgxPoolCheckConn] ERROR: schema \"documentdb_api\" does not exist (SQLSTATE 3F000) (please check DocumentDB installation))","name":"listener"}

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label Apr 1, 2025
@yuyuyureka yuyuyureka marked this pull request as draft April 1, 2025 16:06
@github-actions github-actions bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Apr 1, 2025
@nix-owners nix-owners bot requested review from JulienMalka, noisersup and dit7ya April 1, 2025 16:14
@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Apr 2, 2025
@yuyuyureka yuyuyureka force-pushed the ferretdb2 branch 2 times, most recently from 8fe70fb to 0d0f174 Compare May 10, 2025 10:16
@yuyuyureka yuyuyureka changed the title ferretdb: 1.24.0 -> 2.0.0, init intelrdfpmathlib, init documentdb-ferretdb ferretdb: 1.24.0 -> 2.2.0, init intelrdfpmathlib, init documentdb-ferretdb May 10, 2025
@yuyuyureka
Copy link
Contributor Author

Bumped to ferretdb 2.2.0 and documentdb 0.103.0-ferretdb-2.2.0.
The documentation hints at the error being related to the pg data dir having been created before installing the documentdb extension. Maybe somehow the initdb binary doesn't pick up the extensions?

@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label May 10, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. and removed 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels May 10, 2025
@wolfgangwalther
Copy link
Contributor

You probably need to run CREATE EXTENSION somewhere.

@yuyuyureka
Copy link
Contributor Author

I added a `CREATE EXTENSION documentdb CASCADE;' on the postgres database.
It revealed some missing dependency extensions, but didn't help with the error.

Copy link
Contributor

@AlekSi AlekSi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yuyuyureka
Copy link
Contributor Author

Shouldn't https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/databases/ferretdb.nix also be updated?

True, but I'm trying to get it to work in the nixosTest first. Afterwards, I'll look into rewriting the module to remove sqlite support and probably also remove support for remote postgresql servers, since it makes little sense with the documentdb extension being fine tuned to match the ferretdb version.

@yuyuyureka
Copy link
Contributor Author

Just wanted to make transparent that the FerretDB authors have asked again to enable telemetry by default. My personal opinion is that enabled-by-default tracking is a huge anti-feature, and nixpkgs as a distribution should protect its users from this anti-feature.

Since we are not getting any help from FerretDB Inc employees to get this working, I'd like some help from the nixpkgs maintainers @dit7ya @noisersup @JulienMalka

@wolfgangwalther
Copy link
Contributor

Just wanted to make transparent that the FerretDB authors have asked again to enable telemetry by default. My personal opinion is that enabled-by-default tracking is a huge anti-feature, and nixpkgs as a distribution should protect its users from this anti-feature.

I fully agree here, stay strong!

@JulienMalka
Copy link
Member

I am completely against activating telemetry in nixpkgs by default. @yuyuyureka Thank you for this work. As soon as I have a bit of time I'll try helping fixing the module.

@AlekSi
Copy link
Contributor

AlekSi commented May 13, 2025

I responded about telemetry there. In particular, I want to stress that I did not ask for telemetry to be enabled by default – it is the #288493 that made it a binary choice. Let's keep that part of the conversation in the discussion outside of PR, if you don't mind.

Since we are not getting any help from FerretDB Inc employees to get this working, I'd like some help from the nixpkgs maintainers @dit7ya @noisersup @JulienMalka.

One of those maintainers is FerretDB Inc. employee.

@JulienMalka
Copy link
Member

In the current NixOS module implementation, telemetry is opt-in. There is a clear toggle (visible on search.nixos.org) to activate it. I think it is how it should be. When running things as a NixOS service, there is rarely a good opportunity to prompt the user for their consent to use telemetry, and waiting 1h before sending data (aka the "undecided" default option in ferretdb) doesn't meet the threshold for user consent according to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants