Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 64FAD1C84B9 for ; Thu, 4 Sep 2025 06:05:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756965959; cv=none; b=pHgc3Tdr4cPyB+0ZHVkUVubmpmYxC3vLph8LcuGnx/krbF0j0K6WqRVkSihOZRF7IBWNG/M+oPNqmrSMcnr/6qmpUc2qyWskrgmX7xf393+UDyRMt/hZUBdMz9bOYpt6m65Qgi4cALh2Vb91Mkbut20QM8VJp7e5krj5wk6fSk0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756965959; c=relaxed/simple; bh=TiTlo1eqJo0T/VzamkrJ9Q6lh90srz1RtColhpktjU0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=iL9PW1r3VpjZGqCV/vMS+wfWVTaOD6laUu4TZYTDnu1MsdomkVJ9nR83mfntF1+Okaxf57B8hPc0SNm97EE3vKx6Wd/Mht7NZ2EVwdxEwcmHYAFl71ns5k1V82e0cfv+9WHYaPpsFVFGP4YcR7qLA6G8NYBvMGH+sEw8GvqDeUg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iSlRKJHS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iSlRKJHS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDB71C4CEF0; Thu, 4 Sep 2025 06:05:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1756965959; bh=TiTlo1eqJo0T/VzamkrJ9Q6lh90srz1RtColhpktjU0=; h=Date:Reply-To:Subject:To:Cc:References:From:In-Reply-To:From; b=iSlRKJHSKMfGOmRipCmdt6kTXcuMGFEDt0JaFgXoyeMXumKdQpmv8Oc304CTFWY8/ M5OrCZfff9ygP5KOeG9yTiyt5sNEvaatTqXKjBUadXvr1U32EO0Ts+Bv5tRLYN9zVP Rykh9pQP3RKXQav5l3CGjDJmDplAbT78APXIxyJDG4NXp8+htHUi59EgSX54mqXQkG CxP39EkDC37tqOHKxC+FW3y+bk8FCjxCLlNWk5lBnWMTwK9Fmjpqkd9GXAUYApkFnO xTUPWcIvCcnxrmdOneKfGYZ5UehDeqkix6iMRuKx986VX2Rd9w9znp/oKi2RGDjIUm o9Gx7W+HaDQQw== Message-ID: Date: Thu, 4 Sep 2025 08:05:56 +0200 Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Reply-To: Daniel Gomez Subject: Re: [PATCH v4 1/3] gen_hosts: use kdevops_workflow_name directly for template selection To: Luis Chamberlain , Chuck Lever , Daniel Gomez , kdevops@lists.linux.dev Cc: hui81.qi@samsung.com, kundan.kumar@samsung.com References: <20250904001521.1897970-1-mcgrof@kernel.org> <20250904001521.1897970-2-mcgrof@kernel.org> Content-Language: en-US From: Daniel Gomez Organization: kernel.org In-Reply-To: <20250904001521.1897970-2-mcgrof@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 04/09/2025 02.15, Luis Chamberlain wrote: > The hosts.j2 template had become unwieldy with 40+ lines of conditional > logic to select which workflow template to include. Since kdevops already > defines KDEVOPS_WORKFLOW_NAME in Kconfig that's always set (either to the > workflow name or "mix" for non-dedicated), we can eliminate ALL conditional > logic. > > The entire hosts.j2 is now just: > {% include 'workflows/' + kdevops_workflow_name + '.j2' %} > > This massive simplification: > - Reduces hosts.j2 from 40+ lines to just 1 line of logic > - Removes ALL conditional template selection from gen_hosts playbook > - Eliminates ALL workflow-specific template overrides from Makefiles > - Makes adding new workflows trivial - just define KDEVOPS_WORKFLOW_NAME > > Additional changes: > - Split monolithic hosts.j2 into per-workflow templates under workflows/ > - Rename default.j2 to mix.j2 to match non-dedicated workflow name > - Add missing 'cxl' to KDEVOPS_WORKFLOW_NAME in main Kconfig > - Add KDEVOPS_WORKFLOW_NAME to reboot-limit demo workflow > > Generated-by: Claude AI > Signed-off-by: Luis Chamberlain > --- > kconfigs/workflows/Kconfig | 9 + > playbooks/roles/gen_hosts/tasks/main.yml | 293 ++---------------- > playbooks/roles/gen_hosts/templates/hosts.j2 | 240 +------------- > .../roles/gen_hosts/templates/workflows/ai.j2 | 99 ++++++ > .../gen_hosts/templates/workflows/blktests.j2 | 58 ++++ > .../gen_hosts/templates/workflows/cxl.j2 | 7 + > .../templates/workflows/fio-tests.j2 | 38 +++ > .../gen_hosts/templates/workflows/fstests.j2 | 72 +++++ > .../gen_hosts/templates/workflows/gitr.j2 | 41 +++ > .../gen_hosts/templates/workflows/linux.j2 | 110 +++++++ > .../gen_hosts/templates/workflows/ltp.j2 | 41 +++ > .../gen_hosts/templates/workflows/mix.j2 | 62 ++++ > .../gen_hosts/templates/workflows/mmtests.j2 | 77 +++++ > .../gen_hosts/templates/workflows/nfstest.j2 | 41 +++ > .../gen_hosts/templates/workflows/pynfs.j2 | 7 + > .../templates/workflows/reboot-limit.j2 | 33 ++ > .../templates/workflows/selftests.j2 | 53 ++++ > .../gen_hosts/templates/workflows/sysbench.j2 | 53 ++++ > workflows/ai/Makefile | 3 - > workflows/blktests/Makefile | 3 - > workflows/cxl/Makefile | 2 - > workflows/demos/reboot-limit/Kconfig | 5 + > workflows/fio-tests/Makefile | 3 - > workflows/fstests/Makefile | 3 - > workflows/gitr/Makefile | 3 - > workflows/linux/Makefile | 1 - > workflows/ltp/Makefile | 3 - > workflows/mmtests/Makefile | 3 - > workflows/nfstest/Makefile | 3 - > workflows/pynfs/Makefile | 3 - > workflows/selftests/Makefile | 3 - > workflows/sysbench/Makefile | 3 - > 32 files changed, 841 insertions(+), 534 deletions(-) > create mode 100644 playbooks/roles/gen_hosts/templates/workflows/ai.j2 > create mode 100644 playbooks/roles/gen_hosts/templates/workflows/blktests.j2 > create mode 100644 playbooks/roles/gen_hosts/templates/workflows/cxl.j2 > create mode 100644 playbooks/roles/gen_hosts/templates/workflows/fio-tests.j2 > create mode 100644 playbooks/roles/gen_hosts/templates/workflows/fstests.j2 > create mode 100644 playbooks/roles/gen_hosts/templates/workflows/gitr.j2 > create mode 100644 playbooks/roles/gen_hosts/templates/workflows/linux.j2 > create mode 100644 playbooks/roles/gen_hosts/templates/workflows/ltp.j2 > create mode 100644 playbooks/roles/gen_hosts/templates/workflows/mix.j2 > create mode 100644 playbooks/roles/gen_hosts/templates/workflows/mmtests.j2 > create mode 100644 playbooks/roles/gen_hosts/templates/workflows/nfstest.j2 > create mode 100644 playbooks/roles/gen_hosts/templates/workflows/pynfs.j2 > create mode 100644 playbooks/roles/gen_hosts/templates/workflows/reboot-limit.j2 > create mode 100644 playbooks/roles/gen_hosts/templates/workflows/selftests.j2 > create mode 100644 playbooks/roles/gen_hosts/templates/workflows/sysbench.j2 > ... > diff --git a/playbooks/roles/gen_hosts/templates/workflows/pynfs.j2 b/playbooks/roles/gen_hosts/templates/workflows/pynfs.j2 > new file mode 100644 > index 00000000..6145b1a0 > --- /dev/null > +++ b/playbooks/roles/gen_hosts/templates/workflows/pynfs.j2 > @@ -0,0 +1,7 @@ > +{# Workflow template for pynfs #} > +[all] > +localhost ansible_connection=local > +write-your-own-template-for-pynfs-workflow > + > +[all:vars] > +ansible_python_interpreter = "{{ kdevops_python_interpreter }}" Nit, Commit 71f085a4d77f ("kdevops: replace ansible hosts generation jinja2 templating") from kdevops-history introduced the "write-your-own-template-for...". It looks this patch is expanding this to other templates too (I only see this in hosts.j2 in kdevops upstream repo). I'd suggest to remove it as part of the cleanup done.