Tweak the logging levels in CI and in some instrumentation (#318)

This commit is contained in:
Ana Hobden 2023-03-10 11:50:08 -08:00 committed by GitHub
parent f2437037f2
commit 7c2f1b03a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 20 deletions

View file

@ -70,7 +70,7 @@ jobs:
with: with:
local-root: install-root/ local-root: install-root/
logger: pretty logger: pretty
log-directives: nix_installer=trace log-directives: nix_installer=debug
backtrace: full backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Initial uninstall (without a `nix run` first) - name: Initial uninstall (without a `nix run` first)
@ -78,7 +78,7 @@ jobs:
env: env:
NIX_INSTALLER_NO_CONFIRM: true NIX_INSTALLER_NO_CONFIRM: true
NIX_INSTALLER_LOGGER: pretty NIX_INSTALLER_LOGGER: pretty
NIX_INSTALLER_LOG_DIRECTIVES: nix_installer=trace NIX_INSTALLER_LOG_DIRECTIVES: nix_installer=debug
RUST_BACKTRACE: full RUST_BACKTRACE: full
- name: Ensure `nix` is removed - name: Ensure `nix` is removed
run: | run: |
@ -99,7 +99,7 @@ jobs:
with: with:
local-root: install-root/ local-root: install-root/
logger: pretty logger: pretty
log-directives: nix_installer=trace log-directives: nix_installer=debug
backtrace: full backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
- name: echo $PATH - name: echo $PATH
@ -133,7 +133,7 @@ jobs:
env: env:
NIX_INSTALLER_NO_CONFIRM: true NIX_INSTALLER_NO_CONFIRM: true
NIX_INSTALLER_LOGGER: pretty NIX_INSTALLER_LOGGER: pretty
NIX_INSTALLER_LOG_DIRECTIVES: nix_installer=trace NIX_INSTALLER_LOG_DIRECTIVES: nix_installer=debug
RUST_BACKTRACE: full RUST_BACKTRACE: full
- name: Ensure `nix` is removed - name: Ensure `nix` is removed
run: | run: |
@ -176,7 +176,7 @@ jobs:
planner: linux planner: linux
local-root: install-root/ local-root: install-root/
logger: pretty logger: pretty
log-directives: nix_installer=trace log-directives: nix_installer=debug
backtrace: full backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Ensure daemon was not configured with init - name: Ensure daemon was not configured with init
@ -194,7 +194,7 @@ jobs:
env: env:
NIX_INSTALLER_NO_CONFIRM: true NIX_INSTALLER_NO_CONFIRM: true
NIX_INSTALLER_LOGGER: pretty NIX_INSTALLER_LOGGER: pretty
NIX_INSTALLER_LOG_DIRECTIVES: nix_installer=trace NIX_INSTALLER_LOG_DIRECTIVES: nix_installer=debug
RUST_BACKTRACE: full RUST_BACKTRACE: full
- name: Ensure `nix` is removed - name: Ensure `nix` is removed
run: | run: |
@ -209,7 +209,7 @@ jobs:
planner: linux planner: linux
local-root: install-root/ local-root: install-root/
logger: pretty logger: pretty
log-directives: nix_installer=trace log-directives: nix_installer=debug
backtrace: full backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
- name: echo $PATH - name: echo $PATH
@ -243,7 +243,7 @@ jobs:
env: env:
NIX_INSTALLER_NO_CONFIRM: true NIX_INSTALLER_NO_CONFIRM: true
NIX_INSTALLER_LOGGER: pretty NIX_INSTALLER_LOGGER: pretty
NIX_INSTALLER_LOG_DIRECTIVES: nix_installer=trace NIX_INSTALLER_LOG_DIRECTIVES: nix_installer=debug
RUST_BACKTRACE: full RUST_BACKTRACE: full
- name: Ensure `nix` is removed - name: Ensure `nix` is removed
run: | run: |
@ -290,7 +290,7 @@ jobs:
with: with:
local-root: install-root/ local-root: install-root/
logger: pretty logger: pretty
log-directives: nix_installer=trace log-directives: nix_installer=debug
backtrace: full backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
planner: steam-deck planner: steam-deck
@ -300,7 +300,7 @@ jobs:
env: env:
NIX_INSTALLER_NO_CONFIRM: true NIX_INSTALLER_NO_CONFIRM: true
NIX_INSTALLER_LOGGER: pretty NIX_INSTALLER_LOGGER: pretty
NIX_INSTALLER_LOG_DIRECTIVES: nix_installer=trace NIX_INSTALLER_LOG_DIRECTIVES: nix_installer=debug
RUST_BACKTRACE: full RUST_BACKTRACE: full
- name: Ensure `nix` is removed - name: Ensure `nix` is removed
run: | run: |
@ -325,7 +325,7 @@ jobs:
with: with:
local-root: install-root/ local-root: install-root/
logger: pretty logger: pretty
log-directives: nix_installer=trace log-directives: nix_installer=debug
backtrace: full backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
planner: steam-deck planner: steam-deck
@ -361,7 +361,7 @@ jobs:
env: env:
NIX_INSTALLER_NO_CONFIRM: true NIX_INSTALLER_NO_CONFIRM: true
NIX_INSTALLER_LOGGER: pretty NIX_INSTALLER_LOGGER: pretty
NIX_INSTALLER_LOG_DIRECTIVES: nix_installer=trace NIX_INSTALLER_LOG_DIRECTIVES: nix_installer=debug
RUST_BACKTRACE: full RUST_BACKTRACE: full
- name: Ensure `nix` is removed - name: Ensure `nix` is removed
run: | run: |
@ -406,7 +406,7 @@ jobs:
with: with:
local-root: install-root/ local-root: install-root/
logger: pretty logger: pretty
log-directives: nix_installer=trace log-directives: nix_installer=debug
backtrace: full backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
extra-conf: | extra-conf: |
@ -416,14 +416,14 @@ jobs:
env: env:
NIX_INSTALLER_NO_CONFIRM: true NIX_INSTALLER_NO_CONFIRM: true
NIX_INSTALLER_LOGGER: pretty NIX_INSTALLER_LOGGER: pretty
NIX_INSTALLER_LOG_DIRECTIVES: nix_installer=trace NIX_INSTALLER_LOG_DIRECTIVES: nix_installer=debug
RUST_BACKTRACE: full RUST_BACKTRACE: full
- name: Repeated install - name: Repeated install
uses: DeterminateSystems/nix-installer-action@main uses: DeterminateSystems/nix-installer-action@main
with: with:
local-root: install-root/ local-root: install-root/
logger: pretty logger: pretty
log-directives: nix_installer=trace log-directives: nix_installer=debug
backtrace: full backtrace: full
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
extra-conf: trusted-users = root runner extra-conf: trusted-users = root runner
@ -459,5 +459,5 @@ jobs:
env: env:
NIX_INSTALLER_NO_CONFIRM: true NIX_INSTALLER_NO_CONFIRM: true
NIX_INSTALLER_LOGGER: pretty NIX_INSTALLER_LOGGER: pretty
NIX_INSTALLER_LOG_DIRECTIVES: nix_installer=trace NIX_INSTALLER_LOG_DIRECTIVES: nix_installer=debug
RUST_BACKTRACE: full RUST_BACKTRACE: full

View file

@ -3,7 +3,7 @@ COPY nix-installer /nix-installer
RUN chmod +x /nix-installer RUN chmod +x /nix-installer
COPY binary-tarball /binary-tarball COPY binary-tarball /binary-tarball
RUN mv /binary-tarball/nix-*.tar.xz nix.tar.xz RUN mv /binary-tarball/nix-*.tar.xz nix.tar.xz
RUN /nix-installer/bin/nix-installer install linux --nix-package-url file:///nix.tar.xz --init none --extra-conf "sandbox = false" --no-confirm -vvv RUN /nix-installer/bin/nix-installer install linux --logger pretty --log-directive nix_installer=debug --nix-package-url file:///nix.tar.xz --init none --extra-conf "sandbox = false" --no-confirm -vvv
ENV PATH="${PATH}:/nix/var/nix/profiles/default/bin" ENV PATH="${PATH}:/nix/var/nix/profiles/default/bin"
RUN nix-build --no-substitute -E 'derivation { name = "foo"; system = "x86_64-linux"; builder = "/bin/sh"; args = ["-c" "echo foobar > $out"]; }' RUN nix-build --no-substitute -E 'derivation { name = "foo"; system = "x86_64-linux"; builder = "/bin/sh"; args = ["-c" "echo foobar > $out"]; }'
RUN /nix/nix-installer uninstall --no-confirm RUN /nix/nix-installer uninstall --no-confirm

View file

@ -6,7 +6,7 @@ let
install-default = { install-default = {
install = '' install = ''
NIX_PATH=$(readlink -f nix.tar.xz) NIX_PATH=$(readlink -f nix.tar.xz)
RUST_BACKTRACE="full" ./nix-installer install --logger pretty --log-directive nix_installer=trace --nix-package-url "file://$NIX_PATH" --no-confirm RUST_BACKTRACE="full" ./nix-installer install --logger pretty --log-directive nix_installer=debug --nix-package-url "file://$NIX_PATH" --no-confirm
''; '';
check = '' check = ''
set -ex set -ex

View file

@ -34,7 +34,7 @@ pub struct NixInstallerCli {
#[async_trait::async_trait] #[async_trait::async_trait]
impl CommandExecute for NixInstallerCli { impl CommandExecute for NixInstallerCli {
#[tracing::instrument(level = "debug", skip_all)] #[tracing::instrument(level = "trace", skip_all)]
async fn execute(self) -> eyre::Result<ExitCode> { async fn execute(self) -> eyre::Result<ExitCode> {
let Self { let Self {
instrumentation: _, instrumentation: _,

View file

@ -57,7 +57,7 @@ pub struct Install {
#[async_trait::async_trait] #[async_trait::async_trait]
impl CommandExecute for Install { impl CommandExecute for Install {
#[tracing::instrument(level = "debug", skip_all)] #[tracing::instrument(level = "trace", skip_all)]
async fn execute(self) -> eyre::Result<ExitCode> { async fn execute(self) -> eyre::Result<ExitCode> {
let Self { let Self {
no_confirm, no_confirm,