Skip to content

fix: prevent Chain and Result installation on lite profile#3341

Open
alliasgher wants to merge 1 commit intotektoncd:mainfrom
alliasgher:fix-lite-profile-extra-components
Open

fix: prevent Chain and Result installation on lite profile#3341
alliasgher wants to merge 1 commit intotektoncd:mainfrom
alliasgher:fix-lite-profile-extra-components

Conversation

@alliasgher
Copy link
Copy Markdown

Changes

Fix the lite profile installing TektonChain and TektonResult components when it should only install TektonPipelines.

Root Cause

The TektonTrigger section correctly gates creation on both the disabled flag AND the profile:

if !tc.Spec.Trigger.Disabled && (tc.Spec.Profile == v1alpha1.ProfileAll || tc.Spec.Profile == v1alpha1.ProfileBasic) {

But the TektonChain and TektonResult sections only checked the disabled flag:

if !tc.Spec.Chain.Disabled {   // missing profile check
if !tc.Spec.Result.Disabled {  // missing profile check

Since Chain.Disabled and Result.Disabled default to false, the lite profile would create these components, then the FinalizeKind path would try to delete them, causing a reconciliation loop.

Fix

Add the same ProfileAll || ProfileBasic check to both Chain and Result conditions, matching the existing Trigger pattern.

Verification

  • go build ./... passes
  • Lite profile will now only create TektonPipelines (as documented)
  • Basic profile continues to create Pipelines + Triggers + Chains + Results
  • All profile creates everything including Dashboard

Fixes #2781

NONE

The lite profile should only install TektonPipelines, but the
reconciler was creating TektonChain and TektonResult CRs because
their conditions only checked .Spec.Chain.Disabled (default: false)
without also checking the profile.

This follows the same pattern already used for TektonTrigger, which
correctly gates on both the disabled flag AND the profile:

    if !tc.Spec.Trigger.Disabled && (tc.Spec.Profile == ProfileAll || tc.Spec.Profile == ProfileBasic)

Apply the same profile check to Chain and Result so they are only
created for the "all" and "basic" profiles.

Fixes tektoncd#2781

```release-note
NONE
```
@tekton-robot tekton-robot added the release-note-none Denotes a PR that doesnt merit a release note. label Apr 13, 2026
@tekton-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign savitaashture after the PR has been reviewed.
You can assign the PR to them by writing /assign @savitaashture in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 13, 2026
Copy link
Copy Markdown
Contributor

@khrm khrm left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 13, 2026
@alliasgher
Copy link
Copy Markdown
Author

/assign @savitaashture

@anithapriyanatarajan
Copy link
Copy Markdown
Contributor

/ok-to-test

@alliasgher
Copy link
Copy Markdown
Author

The e2e test TestTektonConfigTestSuite/Test02_ChangeProfile is failing in CI (run) on this PR. The test sequence is default → lite → basic → all, and it's timing out on the lite → basic transition with:

config   devel   False   Components not in ready state: TektonResult reconcile again and proceed

Some analysis on why my fix exposes this:

  • Before this PR, the lite profile silently installed Chain + Result in addition to Pipelines (the bug). So the existing Result CR was always present, and lite → basic was effectively a no-op for Result.
  • With this PR, lite correctly deletes Result. The lite → basic transition has to re-create it, and that re-creation appears to be hitting a race condition or stuck state (see the controller status above).

This is a real underlying issue in the Result reconciliation/transition flow, but my fix is what surfaced it. Two ways forward:

  1. Land this fix as-is and treat the transition issue as a separate bug to fix in the Result reconciler.
  2. Leave the buggy behavior in place until the transition issue is fixed.

I'd appreciate guidance from @khrm / @savitaashture on the preferred path. Happy to investigate the Result reconciler stuck-transition issue as a follow-up if option (1) is preferred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug Report: Profile ‘lite’ is creating extra components

5 participants