Comments (10)
"unexpected end of JSON input" is being returned in the pod logs, it's not something added by the Dashboard. The timestamp is part of the logs too returned by the k8s API server.
from pipeline.
@uqix thanks for the report. I am not sure I understand the relation between the error (in a step unexpected end of JSON input
is the log of a step execution) and the order in the status. The order in the list in the status, doesn't necessarily reflect the execution order (I don't think we give any guarantees there).
Without the definition of the StepAction
, it is a bit hard to debug your issue. Can you share the definition of the StepAction
?
from pipeline.
Sorry for late reply, here's the simplified yaml to reproduce the problem:
- stepaction:
apiVersion: tekton.dev/v1alpha1
kind: StepAction
metadata:
name: git-checkout
labels:
kustomize.toolkit.fluxcd.io/substitute: disabled
app.kubernetes.io/version: "1.0.0"
spec:
image: bitnami/git:2.41.0
script: |
#!/usr/bin/env bash
set -exu -o pipefail +o histexpand
shopt -s inherit_errexit extglob
echo test
- taskrun:
apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
generateName: build-ts-v1-dev-
spec:
taskSpec:
steps:
- name: test
ref:
name: git-checkout-v1
- name: test2
ref:
name: git-checkout-v1
- name: test3
ref:
name: git-checkout-v1
- Error:
- Some experiment:
apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
generateName: build-ts-v1-dev-
spec:
taskSpec:
steps:
- name: test
ref:
name: git-checkout-v1
- name: test2
ref:
name: git-checkout-v1
# - name: test3
# ref:
# name: git-checkout-v1
Comment out 3rd step, it suddenly works.
from pipeline.
Interesting, it just works for me. I wonder if the "unexpected end of json input" might be dashboard related only ? (cc @AlanGreene as I am clueless π )
nit: git-checkout-v1
should be git-checkout
in your TaskRun
example though
from pipeline.
@uqix how does the TaskRun
looks like from the API or CLI ? (kubectl get taskrun build-ts-β¦
)
from pipeline.
Here's some significant diffs of their pods: (left side from the 2-steps task, right side from the 3-steps task)
1st container:
2nd container:
Those container args of the 3-steps task (right side) seem weird.
from pipeline.
My feature-flags
configmap:
apiVersion: v1
kind: ConfigMap
metadata:
namespace: tekton-pipelines
name: feature-flags
data:
enable-api-fields: alpha
enable-param-enum: "true"
enable-step-actions: "true"
from pipeline.
I also diffed taskruns, nothing wrong found:
- 2-steps taskrun:
apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
annotations:
pipeline.tekton.dev/release: d714545
creationTimestamp: "2024-02-26T12:01:38Z"
generateName: build-ts-v1-dev-
generation: 1
labels:
app.kubernetes.io/managed-by: tekton-pipelines
name: build-ts-v1-dev-7m5m9
namespace: tekton-run
resourceVersion: "112152331"
uid: 7274fbc5-786f-43a9-b908-50858bd77cf5
spec:
podTemplate:
env:
- name: TZ
value: Asia/Shanghai
nodeSelector:
ci-load: "true"
serviceAccountName: tekton-run
taskSpec:
steps:
- computeResources: {}
name: test
ref:
name: git-checkout-v1
- computeResources: {}
name: test2
ref:
name: git-checkout-v1
timeout: 1h0m0s
status:
completionTime: "2024-02-26T12:01:45Z"
conditions:
- lastTransitionTime: "2024-02-26T12:01:45Z"
message: All Steps have completed executing
reason: Succeeded
status: "True"
type: Succeeded
podName: build-ts-v1-dev-7m5m9-pod
provenance:
featureFlags:
AwaitSidecarReadiness: true
Coschedule: workspaces
DisableAffinityAssistant: false
DisableCredsInit: false
EnableAPIFields: alpha
EnableCELInWhenExpression: false
EnableKeepPodOnCancel: false
EnableParamEnum: true
EnableProvenanceInStatus: true
EnableStepActions: true
EnableTektonOCIBundles: true
EnforceNonfalsifiability: none
MaxResultSize: 4096
RequireGitSSHSecretKnownHosts: false
ResultExtractionMethod: termination-message
RunningInEnvWithInjectedSidecars: true
ScopeWhenExpressionsToTask: false
SendCloudEventsForRuns: false
SetSecurityContext: false
VerificationNoMatchPolicy: ignore
startTime: "2024-02-26T12:01:39Z"
steps:
- container: step-test
imageID: curlimages/curl@sha256:961cf9e2a1939ea380b3f16e313a581b5d4681dd9dc4b1ace060eb396a71df0d
name: test
terminated:
containerID: containerd://ce735e91d1fb6d2db38c0be5091f57adf690acc5d45dd6b357a4eecebc4271a0
exitCode: 0
finishedAt: "2024-02-26T12:01:44Z"
reason: Completed
startedAt: "2024-02-26T12:01:44Z"
terminationReason: Completed
- container: step-test2
imageID: curlimages/curl@sha256:961cf9e2a1939ea380b3f16e313a581b5d4681dd9dc4b1ace060eb396a71df0d
name: test2
terminated:
containerID: containerd://362a4e0679881f9b7367fffee27d6c2439b1d9c88639516f13f0893b07ed384e
exitCode: 0
finishedAt: "2024-02-26T12:01:44Z"
reason: Completed
startedAt: "2024-02-26T12:01:44Z"
terminationReason: Completed
taskSpec:
steps:
- computeResources: {}
image: curlimages/curl:8.3.0
name: test
script: |
#!/usr/bin/env sh
echo test
- computeResources: {}
image: curlimages/curl:8.3.0
name: test2
script: |
#!/usr/bin/env sh
echo test
- 3-steps taskrun:
apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
annotations:
pipeline.tekton.dev/release: d714545
creationTimestamp: "2024-02-26T11:57:07Z"
generateName: build-ts-v1-dev-
generation: 1
labels:
app.kubernetes.io/managed-by: tekton-pipelines
name: build-ts-v1-dev-695zn
namespace: tekton-run
resourceVersion: "112150352"
uid: 06d379d4-a9db-4241-80f7-144d38df451f
spec:
podTemplate:
env:
- name: TZ
value: Asia/Shanghai
nodeSelector:
ci-load: "true"
serviceAccountName: tekton-run
taskSpec:
steps:
- computeResources: {}
name: test
ref:
name: git-checkout-v1
- computeResources: {}
name: test2
ref:
name: git-checkout-v1
- computeResources: {}
name: test3
ref:
name: git-checkout-v1
timeout: 1h0m0s
status:
completionTime: "2024-02-26T11:57:11Z"
conditions:
- lastTransitionTime: "2024-02-26T11:57:11Z"
message: '"step-test" exited with code 1'
reason: Failed
status: "False"
type: Succeeded
podName: build-ts-v1-dev-695zn-pod
provenance:
featureFlags:
AwaitSidecarReadiness: true
Coschedule: workspaces
DisableAffinityAssistant: false
DisableCredsInit: false
EnableAPIFields: alpha
EnableCELInWhenExpression: false
EnableKeepPodOnCancel: false
EnableParamEnum: true
EnableProvenanceInStatus: true
EnableStepActions: true
EnableTektonOCIBundles: true
EnforceNonfalsifiability: none
MaxResultSize: 4096
RequireGitSSHSecretKnownHosts: false
ResultExtractionMethod: termination-message
RunningInEnvWithInjectedSidecars: true
ScopeWhenExpressionsToTask: false
SendCloudEventsForRuns: false
SetSecurityContext: false
VerificationNoMatchPolicy: ignore
startTime: "2024-02-26T11:57:07Z"
steps:
- container: step-test
imageID: curlimages/curl@sha256:961cf9e2a1939ea380b3f16e313a581b5d4681dd9dc4b1ace060eb396a71df0d
name: test
terminated:
containerID: containerd://18226fec428d930e877709360de2001d245e8d8c3f1db884bdc00e32e3b68b09
exitCode: 1
finishedAt: "2024-02-26T11:57:09Z"
reason: Error
startedAt: "2024-02-26T11:57:09Z"
- container: step-test2
imageID: curlimages/curl@sha256:961cf9e2a1939ea380b3f16e313a581b5d4681dd9dc4b1ace060eb396a71df0d
name: test2
terminated:
containerID: containerd://f91fa78a4a74785144238b62c7e5561fffe3ac2744075cc8b85cfb91ad2af2d1
exitCode: 1
finishedAt: "2024-02-26T11:57:09Z"
reason: Error
startedAt: "2024-02-26T11:57:09Z"
- container: step-test3
imageID: curlimages/curl@sha256:961cf9e2a1939ea380b3f16e313a581b5d4681dd9dc4b1ace060eb396a71df0d
name: test3
terminated:
containerID: containerd://10db25d703f7e60827a1fe8277b46c5a1aaf8fd550cd3e880c8076ff3c6e0353
exitCode: 1
finishedAt: "2024-02-26T11:57:10Z"
reason: Error
startedAt: "2024-02-26T11:57:10Z"
taskSpec:
steps:
- computeResources: {}
image: curlimages/curl:8.3.0
name: test
script: |
#!/usr/bin/env sh
echo test
- computeResources: {}
image: curlimages/curl:8.3.0
name: test2
script: |
#!/usr/bin/env sh
echo test
- computeResources: {}
image: curlimages/curl:8.3.0
name: test3
script: |
#!/usr/bin/env sh
echo test
from pipeline.
Interesting, it just works for me.
Just figured it out: our k8s contains some kyverno policy that auto rewrites pod image addresses like this:
curlimages/curl:8.3.0 -> our.harbor/some-ns/curlimages/curl:8.3.0
this image
rewriting causes StepAction
trouble.
from pipeline.
@uqix good to know, I think we can close this then πΌπΌ
from pipeline.
Related Issues (20)
- Maximum parallel tasks sharing a workspace HOT 2
- The Pipeline format is too cumbersome HOT 2
- Pipelines ignoring following name fields on resolvers HOT 2
- Invalid Validation of StepTemplate with StepAction Ref
- Too Strict validation of the Resolver Name during Webhook Validation HOT 3
- Increase Task Reuse HOT 4
- 2nd of two inline tasks gets new affinityassistant annotation but no new assistant pod
- Website wrongly shows specifying-task-level-computeresources as alpha feature HOT 1
- Missing substitution of propagated workspace in WorkingDirs
- affinity assistant will schedule onto nodes with insufficient resources to run a pod in the pipeline, it should not
- Matrix: invalid param type when consuming results from CustomRun on task matrix.params field
- Occasionally, taskrun fails to retrieve task results from sidecar logs HOT 1
- PipelineRun is canceled prior to its child TaskRuns being canceled. HOT 9
- How to build entry point without SPIRE?
- When performing an upgrade using install.yaml, a pipeline that ran in the past is now running. HOT 1
- The pipeline controller keeps refreshing logs HOT 1
- Error message when PipelineRun is missing parameters required by Pipeline is nonsensical HOT 6
- DryRun Validate should return the mutated Object HOT 2
- Incorrect param type passed to stepaction makes it use default value HOT 2
- Index out of range panic in CheckMissingResultReferences when references are missing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pipeline.