Test.js file size is 900kb, Starter and Pods are not created due to timeout error

My Test.js file size is 900kb. Initializer is completed. But Starter and other pods are not starting. Earlier it used to run without any issues. Recently, I updated my K6-Operator
I am getting below error at k6-operator logs in k8. Please provide any work around.

Errorr: “error”: “invalid character ‘i’ in literal true (expecting ‘r’)”}

Logs:

Connected

ProTip: Hold the Command key when opening logs to launch a new window.

7/21/2022 1:35:03 PM 2022-07-21T17:35:03.233Z INFO controllers.K6 Reconcile(); stage = {"k6": "k6-test/k6test"}

7/21/2022 1:35:03 PM 2022-07-21T17:35:03.233Z INFO controllers.K6 Initialize test {"k6": "k6-test/k6test"}

7/21/2022 1:35:03 PM 2022-07-21T17:35:03.233Z INFO controllers.K6 Changing stage of K6 status to initialization {"k6": "k6-test/k6test"}

7/21/2022 1:35:03 PM 2022-07-21T17:35:03.243Z INFO controllers.K6 Initializer job is ready to start with image `****************.dkr.ecr.us-east-2.amazonaws.com/np-211124-k6-eks:latest` and command `[sh -c k6 archive /test/TestScript.js -O ./TestScript.js.archived.tar && k6 inspect --execution-requirements ./TestScript.js.archived.tar]` {"k6": "k6-test/k6test"}

7/21/2022 1:35:03 PM 2022-07-21T17:35:03.251Z INFO controllers.K6 No initializing pod found yet {"k6": "k6-test/k6test"}

7/21/2022 1:35:08 PM 2022-07-21T17:35:08.252Z INFO controllers.K6 Waiting for initializing pod to finish {"k6": "k6-test/k6test"}

7/21/2022 1:35:13 PM 2022-07-21T17:35:13.252Z INFO controllers.K6 Waiting for initializing pod to finish {"k6": "k6-test/k6test"}

7/21/2022 1:35:18 PM 2022-07-21T17:35:18.264Z ERROR controllers.K6 unable to marshal: `time="2022-07-21T17:35:05Z" level=warning msg="The source for `file:///test/TestScript.js` needs to go through babel but is over 256000 bytes. For performance reasons source map support will be disabled for this particular file."

7/21/2022 1:35:18 PM time="2022-07-21T17:35:10Z" level=warning msg="The source for `file:///test/TestScript.js` needs to go through babel but is over 256000 bytes. For performance reasons source map support will be disabled for this particular file."

7/21/2022 1:35:18 PM {

7/21/2022 1:35:18 PM "paused": null,

7/21/2022 1:35:18 PM "vus": null,

7/21/2022 1:35:18 PM "duration": null,

7/21/2022 1:35:18 PM "iterations": null,

7/21/2022 1:35:18 PM "stages": null,

7/21/2022 1:35:18 PM "scenarios": {

7/21/2022 1:35:18 PM "API45": {

7/21/2022 1:35:18 PM "executor": "constant-arrival-rate",

7/21/2022 1:35:18 PM "startTime": null,

7/21/2022 1:35:18 PM "gracefulStop": null,

7/21/2022 1:35:18 PM "env": null,

7/21/2022 1:35:18 PM "exec": "Reggie45",

7/21/2022 1:35:18 PM "tags": null,

7/21/2022 1:35:18 PM "rate": 2,

7/21/2022 1:35:18 PM "timeUnit": "1m0s",

7/21/2022 1:35:18 PM "duration": "1m0s",

7/21/2022 1:35:18 PM "preAllocatedVUs": 20,

7/21/2022 1:35:18 PM "maxVUs": 20

7/21/2022 1:35:18 PM }

7/21/2022 1:35:18 PM },

7/21/2022 1:35:18 PM "executionSegment": null,

7/21/2022 1:35:18 PM "executionSegmentSequence": null,

7/21/2022 1:35:18 PM "noSetup": null,

7/21/2022 1:35:18 PM "setupTimeout": null,

7/21/2022 1:35:18 PM "noTeardown": null,

7/21/2022 1:35:18 PM "teardownTimeout": null,

7/21/2022 1:35:18 PM "rps": null,

7/21/2022 1:35:18 PM "dns": {

7/21/2022 1:35:18 PM "ttl": null,

7/21/2022 1:35:18 PM "select": null,

7/21/2022 1:35:18 PM "policy": null

7/21/2022 1:35:18 PM },

7/21/2022 1:35:18 PM "maxRedirects": null,

7/21/2022 1:35:18 PM "userAgent": null,

7/21/2022 1:35:18 PM "batch": null,

7/21/2022 1:35:18 PM "batchPerHost": null,

7/21/2022 1:35:18 PM "httpDebug": null,

7/21/2022 1:35:18 PM "insecureSkipTLSVerify": null,

7/21/2022 1:35:18 PM "tlsCipherSuites": null,

7/21/2022 1:35:18 PM "tlsVersion": null,

7/21/2022 1:35:18 PM "tlsAuth": null,

7/21/2022 1:35:18 PM "throw": null,

7/21/2022 1:35:18 PM "thresholds": null,

7/21/2022 1:35:18 PM "blacklistIPs": null,

7/21/2022 1:35:18 PM "blockHostnames": null,

7/21/2022 1:35:18 PM "hosts": null,

7/21/2022 1:35:18 PM "noConnectionReuse": null,

7/21/2022 1:35:18 PM "noVUConnectionReuse": null,

7/21/2022 1:35:18 PM "minIterationDuration": null,

7/21/2022 1:35:18 PM "ext": null,

7/21/2022 1:35:18 PM "summaryTrendStats": [

7/21/2022 1:35:18 PM "avg",

7/21/2022 1:35:18 PM "min",

7/21/2022 1:35:18 PM "med",

7/21/2022 1:35:18 PM "max",

7/21/2022 1:35:18 PM "p(90)",

7/21/2022 1:35:18 PM "p(95)"

7/21/2022 1:35:18 PM ],

7/21/2022 1:35:18 PM "summaryTimeUnit": null,

7/21/2022 1:35:18 PM "systemTags": [

7/21/2022 1:35:18 PM "check",

7/21/2022 1:35:18 PM "error",

7/21/2022 1:35:18 PM "error_code",

7/21/2022 1:35:18 PM "expected_response",

7/21/2022 1:35:18 PM "group",

7/21/2022 1:35:18 PM "method",

7/21/2022 1:35:18 PM "name",

7/21/2022 1:35:18 PM "proto",

7/21/2022 1:35:18 PM "scenario",

7/21/2022 1:35:18 PM "service",

7/21/2022 1:35:18 PM "status",

7/21/2022 1:35:18 PM "subproto",

7/21/2022 1:35:18 PM "tls_version",

7/21/2022 1:35:18 PM "url"

7/21/2022 1:35:18 PM ],

7/21/2022 1:35:18 PM "tags": {

7/21/2022 1:35:18 PM "AppName": "MY API",

7/21/2022 1:35:18 PM "Application ID": "20000845",

7/21/2022 1:35:18 PM "QualityGate": "Performance",

7/21/2022 1:35:18 PM "TrainName": "Fees Services"

7/21/2022 1:35:18 PM },

7/21/2022 1:35:18 PM "metricSamplesBufferSize": null,

7/21/2022 1:35:18 PM "noCookiesReset": null,

7/21/2022 1:35:18 PM "discardResponseBodies": false,

7/21/2022 1:35:18 PM "totalDuration": "1m30s",

7/21/2022 1:35:18 PM "maxVUs": 20

7/21/2022 1:35:18 PM }` {"k6": "k6-test/k6test", "error": "invalid character 'i' in literal true (expecting 'r')"}

7/21/2022 1:35:18 PM github.com/go-logr/zapr.(*zapLogger).Error

7/21/2022 1:35:18 PM /go/pkg/mod/github.com/go-logr/zapr@v0.1.0/zapr.go:128

7/21/2022 1:35:18 PM github.com/grafana/k6-operator/controllers.InitializeJobs.func1

7/21/2022 1:35:18 PM /workspace/controllers/k6_initialize.go:131

7/21/2022 1:35:18 PM k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtection

7/21/2022 1:35:18 PM /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:211

7/21/2022 1:35:18 PM k8s.io/apimachinery/pkg/util/wait.WaitFor

7/21/2022 1:35:18 PM /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:541

7/21/2022 1:35:18 PM k8s.io/apimachinery/pkg/util/wait.pollInternal

7/21/2022 1:35:18 PM /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:427

7/21/2022 1:35:18 PM k8s.io/apimachinery/pkg/util/wait.pollImmediateInternal

7/21/2022 1:35:18 PM /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:452

7/21/2022 1:35:18 PM k8s.io/apimachinery/pkg/util/wait.PollImmediate

7/21/2022 1:35:18 PM /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:441

7/21/2022 1:35:18 PM github.com/grafana/k6-operator/controllers.InitializeJobs

7/21/2022 1:35:18 PM /workspace/controllers/k6_initialize.go:64

7/21/2022 1:35:18 PM github.com/grafana/k6-operator/controllers.(*K6Reconciler).Reconcile

7/21/2022 1:35:18 PM /workspace/controllers/k6_controller.go:63

7/21/2022 1:35:18 PM sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler

7/21/2022 1:35:18 PM /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:235

7/21/2022 1:35:18 PM sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem

7/21/2022 1:35:18 PM /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:209

7/21/2022 1:35:18 PM sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker

7/21/2022 1:35:18 PM /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:188

7/21/2022 1:35:18 PM k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1

7/21/2022 1:35:18 PM /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:155

7/21/2022 1:35:18 PM k8s.io/apimachinery/pkg/util/wait.BackoffUntil

7/21/2022 1:35:18 PM /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:156

7/21/2022 1:35:18 PM k8s.io/apimachinery/pkg/util/wait.JitterUntil

7/21/2022 1:35:18 PM /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:133

7/21/2022 1:35:18 PM k8s.io/apimachinery/pkg/util/wait.Until

7/21/2022 1:35:18 PM /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:90

7/21/2022 1:35:18 PM 2022-07-21T17:35:18.264Z ERROR controllers.K6 Failed to initialize the script {"k6": "k6-test/k6test", "error": "invalid character 'i' in literal true (expecting 'r')"}

7/21/2022 1:35:18 PM github.com/go-logr/zapr.(*zapLogger).Error

7/21/2022 1:35:18 PM /go/pkg/mod/github.com/go-logr/zapr@v0.1.0/zapr.go:128

7/21/2022 1:35:18 PM github.com/grafana/k6-operator/controllers.InitializeJobs

7/21/2022 1:35:18 PM /workspace/controllers/k6_initialize.go:152

7/21/2022 1:35:18 PM github.com/grafana/k6-operator/controllers.(*K6Reconciler).Reconcile

7/21/2022 1:35:18 PM /workspace/controllers/k6_controller.go:63

7/21/2022 1:35:18 PM sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler

7/21/2022 1:35:18 PM /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:235

7/21/2022 1:35:18 PM sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem

7/21/2022 1:35:18 PM /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:209

7/21/2022 1:35:18 PM sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker

7/21/2022 1:35:18 PM /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:188

7/21/2022 1:35:18 PM k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1

7/21/2022 1:35:18 PM /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:155

7/21/2022 1:35:18 PM k8s.io/apimachinery/pkg/util/wait.BackoffUntil

7/21/2022 1:35:18 PM /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:156

7/21/2022 1:35:18 PM k8s.io/apimachinery/pkg/util/wait.JitterUntil

7/21/2022 1:35:18 PM /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:133

7/21/2022 1:35:18 PM k8s.io/apimachinery/pkg/util/wait.Until

7/21/2022 1:35:18 PM /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:90

7/21/2022 1:35:18 PM 2022-07-21T17:35:18.264Z ERROR controller Reconciler error {"reconcilerGroup": "k6.io", "reconcilerKind": "K6", "controller": "k6", "name": "k6test", "namespace": "k6-test", "error": "invalid character 'i' in literal true (expecting 'r')"}

7/21/2022 1:35:18 PM github.com/go-logr/zapr.(*zapLogger).Error

7/21/2022 1:35:18 PM /go/pkg/mod/github.com/go-logr/zapr@v0.1.0/zapr.go:128

7/21/2022 1:35:18 PM sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler

7/21/2022 1:35:18 PM /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:237

7/21/2022 1:35:18 PM sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem

7/21/2022 1:35:18 PM /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:209

7/21/2022 1:35:18 PM sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker

7/21/2022 1:35:18 PM /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:188

7/21/2022 1:35:18 PM k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1

7/21/2022 1:35:18 PM /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:155

7/21/2022 1:35:18 PM k8s.io/apimachinery/pkg/util/wait.BackoffUntil

7/21/2022 1:35:18 PM /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:156

7/21/2022 1:35:18 PM k8s.io/apimachinery/pkg/util/wait.JitterUntil

7/21/2022 1:35:18 PM /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:133

7/21/2022 1:35:18 PM k8s.io/apimachinery/pkg/util/wait.Until

7/21/2022 1:35:18 PM /go/pkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:90

7/21/2022 1:35:19 PM 2022-07-21T17:35:19.265Z INFO controllers.K6 Reconcile(); stage = initialization {"k6": "k6-test/k6test"}

7/21/2022 1:35:19 PM 2022-07-21T17:35:19.265Z DEBUG controller Successfully Reconciled {"reconcilerGroup": "k6.io", "reconcilerKind": "K6", "controller": "k6", "name": "k6test", "namespace": "k6-test"}

Wrap lines Previous Container

Scroll to Top Scroll to Bottom Download Logs Clear Screen

I have found this Failure to run load tests. do we have any other option than rollback

Hi @ppyneni
This actually can be considered a bug. Rather a rare one since it is the first time it is being reported. This warning about the size of file is considered temporary so it should disappear with some future version of k6 but probably not very soon.

The current workaround is to use --log-output=none as argument to k6 but it had the drawback of not getting any logs during running the test. Anything better would likely require changes either to k6 or to k6-operator. Unless of course, you could make your file smaller to get rid of the warning? That would be a solution too.

Thank you for your reply @olha. I tried to use --log-output=none as argument at yaml. Starter and actual pods are not started upon completion of k6test-initializer-****

@ppyneni,
Thank you for trying this out and describing the bug! I think I’ve found another way to fix this case with the smallest impact on anyone – the fix was just pushed to the main branch of the k6-operator and built as latest. You don’t to have to pass any arguments, just use the operator as usual. I’ve tested the fix with bogus data and it seems to work correctly. Please try it out and let me know if there’s anything else off :slightly_smiling_face:

Thank you @olha. I have tried multiple times by re-deploying the k6 - operator. I am getting same error

{"k6": "k6-test/k6test", "error": "invalid character 'i' in literal true (expecting 'r')"}

I am using XML Payload and each payload contains around 8000 lines. Total 3 end points with different payloads

That’s strange. Could it be an issue with the latest being cached locally and not being updated during re-deployment? The last image can be seen here:

I guess you can also try passing the ghcr.io/grafana/operator:0abaa3af1f955e5c6fa2638bc9d85cdac0c31afb directly as IMG.