tektoncd / pipeline

A cloud-native Pipeline resource.
https://tekton.dev
Apache License 2.0
8.51k stars 1.78k forks source link

featureFlags.EnableTektonOCIBundles becomes unknown fields #8359

Open jkandasa opened 3 weeks ago

jkandasa commented 3 weeks ago

Pipeline Version: v0.62.4

unable to delete a pipelinerun with EnableTektonOCIBundles flag, getting below error even while removing finalizer

error: pipelineruns.tekton.dev "installer-l0v75d" could not be patched: admission webhook "webhook.pipeline.tekton.dev" denied the request: mutation failed: cannot decode incoming new object: json: unknown field "EnableTektonOCIBundles"

For some reason, EnableTektonOCIBundles added into pipelinerun status.provenance.featureFlags, EnableTektonOCIBundles - completely removed on 0.62.x [1] so it becomes unknown field. The Pipelinerun resources were already marked for deletion, and we can not change the resource, other than removing the finalizers. But here the pipeline webhook 0.62.x doesn't like unknown field EnableTektonOCIBundles and rejecting. It is a kind of dead lock now.

[1] - https://github.com/tektoncd/pipeline/pull/7789/files#diff-43c816abe932bdd16552907bcaac8c510320e205a874f5ff04dea69553e1bc7cR187

apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
  creationTimestamp: "2024-10-09T14:33:12Z"
  deletionGracePeriodSeconds: 0
  deletionTimestamp: "2024-10-09T14:57:52Z"
  finalizers:
  - chains.tekton.dev/pipelinerun
  name: installer-l0v75d
  namespace: jk
status:
  provenance:
    featureFlags:
      AwaitSidecarReadiness: true
      Coschedule: workspaces
      DisableAffinityAssistant: true
      DisableCredsInit: false
      DisableInlineSpec: ""
      EnableAPIFields: beta
      EnableArtifacts: false
      EnableCELInWhenExpression: false
      EnableKeepPodOnCancel: false
      EnableParamEnum: false
      EnableProvenanceInStatus: true
      EnableStepActions: false
      EnableTektonOCIBundles: false        <----
      EnforceNonfalsifiability: none
      MaxResultSize: 4096
      RequireGitSSHSecretKnownHosts: false
      ResultExtractionMethod: termination-message
      RunningInEnvWithInjectedSidecars: true
      ScopeWhenExpressionsToTask: false
      SendCloudEventsForRuns: false
      SetSecurityContext: false
      VerificationNoMatchPolicy: ignore

Expected Behavior

Should not throw unknown field error for EnableTektonOCIBundles

Actual Behavior

Blocked on EnableTektonOCIBundles as unknown field

jkandasa commented 3 weeks ago

/assign @jkandasa