You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor diagnostics into Feedback, replace ours with detsys-ids-client (#1414)
* Refactor diagnostics into Feedback, replace ours with detsys-ids-client
This replaces the Diagnosticdata and pervasive feature-checking with a trait with a null implementation by default.
The null implementation is more ergonomic for a couple reasons
1. needing to feature-check everywhere made it harder to write correct code for both cases.
2. Option's can't be map()'d and other combinators with async closures.
This also introduces the possibility of feature flagging behavior.
The feature flags come from the `feedback` provider, and the null version has none.
If you specify a `--diagnostic-endpoint` of `file://....` the diagnostics are sent to that path.
The format of this output has changed.
With a file endpoint, you can set the `DETSYS_IDS_CHECKIN_FILE` environment variable to a file to provide the feature flag data.
If you specify a `--diagnostic-endpoint` of an HTTP(S) address, the specific path is truncated and replaced with `/check-in` and `/events/batch`.
Note the default endpoint is now set to None, which means use the default backend.
This is because the specific host used for diagnostics is identified using an SRV record for failover and traffic shaping purposes.
Overall, this change replaces the initial and ad-hoc IDS client with a crate dedicated to the task.
| `--diagnostic-attribution` | Relate the install diagnostic to a specific value | | `NIX_INSTALLER_DIAGNOSTIC_ATTRIBUTION` |
506
-
| `--diagnostic-endpoint` | The URL or file path for an installation diagnostic to be sent | `https://install.determinate.systems/nix/diagnostic` | `NIX_INSTALLER_DIAGNOSTIC_ENDPOINT` |
507
-
| `--explain` | Provide an explanation of the changes the installation process will make to your system | `false` | `NIX_INSTALLER_EXPLAIN` |
508
-
| `--extra-conf` | Extra configuration lines for `/etc/nix.conf` | | `NIX_INSTALLER_EXTRA_CONF` |
509
-
| `--force` | Whether the installer should forcibly recreate files it finds existing | `false` | `NIX_INSTALLER_FORCE` |
510
-
| `--init` | Which init system to configure (if `--init none` Nix will be root-only) | `launchd` (macOS), `systemd` (Linux) | `NIX_INSTALLER_INIT` |
511
-
| `--nix-build-group-id` | The Nix build group GID | `350` (macOS), `30000` (Linux) | `NIX_INSTALLER_NIX_BUILD_GROUP_ID` |
512
-
| `--nix-build-group-name` | The Nix build group name | `nixbld` | `NIX_INSTALLER_NIX_BUILD_GROUP_NAME` |
513
-
| `--nix-build-user-count` | The number of build users to create | `32` | `NIX_INSTALLER_NIX_BUILD_USER_COUNT` |
514
-
| `--nix-build-user-id-base` | The Nix build user base UID (ascending) (NOTE: the first UID will be this base + 1) | `350` (macOS), `30000` (Linux) | `NIX_INSTALLER_NIX_BUILD_USER_ID_BASE` |
515
-
| `--nix-build-user-prefix` | The Nix build user prefix (user numbers will be postfixed) | `_nixbld` (macOS), `nixbld` (Linux) | `NIX_INSTALLER_NIX_BUILD_USER_PREFIX` |
| `--no-confirm` | Run installation without requiring explicit user confirmation | `false` | `NIX_INSTALLER_NO_CONFIRM` |
518
-
| `--no-modify-profile` | Modify the user profile to automatically load Nix. | `true` | `NIX_INSTALLER_MODIFY_PROFILE` |
519
-
| `--proxy` | The proxy to use (if any); valid proxy bases are `https://$URL`, `http://$URL` and `socks5://$URL` | | `NIX_INSTALLER_PROXY` |
520
-
| `--ssl-cert-file` | An SSL cert to use (if any); used for fetching Nix and sets `ssl-cert-file` in `/etc/nix/nix.conf` | | `NIX_INSTALLER_SSL_CERT_FILE` |
521
-
| `--no-start-daemon` | Start the daemon (if not `--init none`) | `true` | `NIX_INSTALLER_START_DAEMON` |
| `--diagnostic-attribution` | Relate the install diagnostic to a specific distinct user ID| | `NIX_INSTALLER_DIAGNOSTIC_ATTRIBUTION` |
506
+
| `--diagnostic-endpoint` | The URL or file path for an installation diagnostic to be sent | | `NIX_INSTALLER_DIAGNOSTIC_ENDPOINT` |
507
+
| `--explain` | Provide an explanation of the changes the installation process will make to your system | `false` | `NIX_INSTALLER_EXPLAIN` |
508
+
| `--extra-conf` | Extra configuration lines for `/etc/nix.conf` | | `NIX_INSTALLER_EXTRA_CONF` |
509
+
| `--force` | Whether the installer should forcibly recreate files it finds existing | `false` | `NIX_INSTALLER_FORCE` |
510
+
| `--init` | Which init system to configure (if `--init none` Nix will be root-only) | `launchd` (macOS), `systemd` (Linux) | `NIX_INSTALLER_INIT` |
511
+
| `--nix-build-group-id` | The Nix build group GID | `350` (macOS), `30000` (Linux) | `NIX_INSTALLER_NIX_BUILD_GROUP_ID` |
512
+
| `--nix-build-group-name` | The Nix build group name | `nixbld` | `NIX_INSTALLER_NIX_BUILD_GROUP_NAME` |
513
+
| `--nix-build-user-count` | The number of build users to create | `32` | `NIX_INSTALLER_NIX_BUILD_USER_COUNT` |
514
+
| `--nix-build-user-id-base` | The Nix build user base UID (ascending) (NOTE: the first UID will be this base + 1) | `350` (macOS), `30000` (Linux) | `NIX_INSTALLER_NIX_BUILD_USER_ID_BASE` |
515
+
| `--nix-build-user-prefix` | The Nix build user prefix (user numbers will be postfixed) | `_nixbld` (macOS), `nixbld` (Linux) | `NIX_INSTALLER_NIX_BUILD_USER_PREFIX` |
| `--no-confirm` | Run installation without requiring explicit user confirmation | `false` | `NIX_INSTALLER_NO_CONFIRM` |
518
+
| `--no-modify-profile` | Modify the user profile to automatically load Nix. | `true` | `NIX_INSTALLER_MODIFY_PROFILE` |
519
+
| `--proxy` | The proxy to use (if any); valid proxy bases are `https://$URL`, `http://$URL` and `socks5://$URL` | | `NIX_INSTALLER_PROXY` |
520
+
| `--ssl-cert-file` | An SSL cert to use (if any); used for fetching Nix and sets `ssl-cert-file` in `/etc/nix/nix.conf` | | `NIX_INSTALLER_SSL_CERT_FILE` |
521
+
| `--no-start-daemon` | Start the daemon (if not `--init none`) | `true` | `NIX_INSTALLER_START_DAEMON` |
522
522
523
523
You can also specify a planner with the first argument:
| `version` | The version of Determinate Nix Installer. |
574
-
| `planner` | The method of installing Nix (`linux`, `macos`, `steam-deck`) |
575
-
| `configured_settings` | The names of planner settings which were changed from their default. Does _not_ include the values. |
576
-
| `os_name` | The running operating system. |
577
-
| `os_version` | The version of the operating system. |
578
-
| `triple` | The architecture/operating system/binary format of your system. |
579
-
| `is_ci` | Whether the installer is being used in CI (e.g. GitHub Actions). |
580
-
| `action` | Either `Install` or `Uninstall`. |
581
-
| `status` | One of `Success`, `Failure`, `Pending`, or `Cancelled`. |
582
-
| `attribution` | Optionally defined by the user, associate the diagnostics of this run to the provided value. |
583
-
| `failure_chain` | A high level description of what the failure was, if any. For example: `Command("diskutil")`if the command `diskutil list` failed. |
567
+
The `curl | sh` pipeline and the installer collects a little bit of anonymous diagnostic information to help us make that true.
568
+
569
+
The anonymous diagnostics we collect to help us improve the installer includes:
570
+
571
+
- The installer version
572
+
- Which planner is used (`linux`, `macos`, `steam-deck`)
573
+
- What action was taken (install, uninstall)
574
+
- The result (`Success`, `Failure`, `Pending`, or `Cancelled`)
575
+
- The customized planner setting names (_not_ the values)
576
+
- Information about your host, like the OS and version, architecture, binary format, etc.
577
+
- Whether you're in CI or not
578
+
- A high level description of what the failure was, like if a specific command failed.
584
579
585
580
To disable diagnostic reporting, set the diagnostics URL to an empty string by passing `--diagnostic-endpoint=""` or setting `NIX_INSTALLER_DIAGNOSTIC_ENDPOINT=""`.
586
581
@@ -595,7 +590,6 @@ You can read the full privacy policy for [Determinate Systems][detsys], the crea
0 commit comments