Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A4483BA248 for ; Wed, 20 May 2026 08:41:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779266490; cv=none; b=muBPMloqHeCjrMKLVBTC2LosWu7xF+mtSTolOpEdiHZ/3lK0tHurb6Omv/HZZwVnKuY3Z3cB3JK3CD7VvN/HQu2tviibX6Q6OITVI0FHYN4t5zIeXXUXrGumfiBIAPq48naXAL9CTiX7GNO+tPW/5CRJCP9vPwaHbet17K/MorI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779266490; c=relaxed/simple; bh=FpgQtg/RCkDGuS7QrpP5yoPUIJOZrrxZ4czq89ZLE34=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=asWYb4iW7PEuZh8u9N+A9/EcfuOjK2+kPn3iT/laNyVHDp4CaQ4HiixSWHU/VOvD6/rV/JU9uHAPj8h9RbAsIm+XE+PPg24fJ42x93ZCkd5RvLBezsJlwvvGk1uc5FbwAumD0jyWnVRoYW6xx3+1vpPuhkSenuT6Sq7TmWT+6Ek= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WcCcZNex; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WcCcZNex" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 192571F00893; Wed, 20 May 2026 08:41:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779266487; bh=LkgJr1Bddq0TrSG8vyYhNy83QbG2IPni8YMOMvA3WVE=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=WcCcZNex23g+blQDskFb0uVkCP/GwklNy0zYdCTitDPge9lftW2VAWnA82DubZus7 y/qQI/9SS32rvWOvcwtBrqI+/kVIv4ZZ7ZYvPq0fiZ8Gz4wjXSe+uYYGSSHp3+UJKT fTbYexgLL9HaQr69DAQvNjMwhqIOrOxF4saHt2sOd5C520x9q/JF0Th1cHI07jzXzc 18Q+Ddy6cnMQ7L6jWw5Tlp+m0zn9TAt31D+yTavXySIgrw0cEASznWViWfiSlcw6la bZwn89LC2uVMll1Cvae2vXiEVeSKJ6ih/uEZCN8x67d06G/av3D32Z2ujuRRXKFBy3 1kxEleX4y1QOQ== Message-ID: Date: Wed, 20 May 2026 10:41:24 +0200 Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/4] ansible: fix bare conditionals for ansible-core 2.20+ strict booleans To: Jeff Layton , Luis Chamberlain , Daniel Gomez , Chuck Lever Cc: kdevops@lists.linux.dev References: <20260519-fixes-v1-0-54edd2ba92b0@kernel.org> <20260519-fixes-v1-1-54edd2ba92b0@kernel.org> Content-Language: en-US From: Daniel Gomez In-Reply-To: <20260519-fixes-v1-1-54edd2ba92b0@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 19/05/2026 12.54, Jeff Layton wrote: > Starting with ansible-core 2.20, when: conditionals that evaluate to > a string instead of a boolean cause a fatal error rather than a > deprecation warning. This affected two categories of variables across > 16 role files. > > Kconfig boolean variables exported through extra_vars.yaml arrive as > strings like "True" rather than native booleans and need the |bool Is not a Kconfig's yaml issue but rather the old legacy Makefile extra vars propagation. Example: scripts/gen-hosts.Makefile:GENHOSTS_EXTRA_ARGS += kdevops_workflows_dedicated_workflow='True' FYI, at some point we need to promote these variables to Kconfig and cleaned them up from Makefiles. Considering the reports from Chuck and you with configs being gated behind if-conditionals, I changed kconfig to always generate the symbols: diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 88bb13e6..0c8806b2 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -888,8 +888,13 @@ int conf_write_defconfig(const char *filename) continue; sym_calc_value(sym); - if (!(sym->flags & SYMBOL_WRITE)) + if (!(sym->flags & SYMBOL_WRITE)) { + /* See conf_write() for the yaml-override rationale. */ + if (yaml_out && (sym->flags & SYMBOL_YAML)) + __print_yaml_symbol(yaml_out, sym, + OUTPUT_N, true); continue; + } sym->flags &= ~SYMBOL_WRITE; /* Skip unchangeable symbols */ if (!sym_is_changeable(sym)) @@ -990,8 +995,22 @@ int conf_write(const char *name) } else if (!sym_is_choice(sym) && !(sym->flags & SYMBOL_WRITTEN)) { sym_calc_value(sym); - if (!(sym->flags & SYMBOL_WRITE)) + if (!(sym->flags & SYMBOL_WRITE)) { + /* + * .config omits hidden bools that evaluate to + * n and symbols inside a disabled `if`, per + * Linux convention. An explicit `output yaml` + * declaration overrides that for YAML so a + * consumer never sees an undefined key for a + * symbol the producer declared. + */ + if (yaml_config && (sym->flags & SYMBOL_YAML)) { + sym->flags |= SYMBOL_WRITTEN; + __print_yaml_symbol(yaml_out, sym, + OUTPUT_N, true); + } goto next; + } if (need_newline) { fprintf(out, "\n"); need_newline = false; But it's tedious work and needs testing. I already have some downstream changes that I intend to send soon that should help with this patch. Can you share which kind of workloads you run so I double check before sending? > diff --git a/playbooks/roles/bootlinux/tasks/build/9p.yml b/playbooks/roles/bootlinux/tasks/build/9p.yml > index f390f028db1e..79a9c2249517 100644 > --- a/playbooks/roles/bootlinux/tasks/build/9p.yml > +++ b/playbooks/roles/bootlinux/tasks/build/9p.yml > @@ -13,7 +13,7 @@ > - b4 > when: > - target_linux_install_b4 is defined > - - target_linux_install_b4 > + - target_linux_install_b4 | default('', true) | length > 0 Changes are inconsistent. See the other target_linux_install_b4 hunk below. > @@ -56,8 +56,8 @@ > name: > - b4 > when: > - - target_linux_install_b4 is defined > - - target_linux_install_b4 > + - target_linux_install_b4 | default('', true) | length > 0 is defined > + - target_linux_install_b4 | default('', true) | length > 0 > - ansible_facts['os_family']|lower != 'debian' > - not workflow_linux_packaged|bool We probably don't need the 'is defined' condition as we are ensuring the variable always gets a default value even when it's not propagated through.