Skip to content

PLZ: request abort on failing setup function #669

@yorugac

Description

@yorugac

Feature Description

Currently, if setup function fails (in PLZ tests), it is reported as a reconciliation error and the TestRun can be stuck in an infinite loop (unless user ends it manually; GCk6 doesn't force it to finish as of now). Initially, it was implemented that way to ensure that setup function will be retried on a failing network. But the setup function itself can fail too and in that case, k6 process should be stopped.

For example, this kind of test should fail after setup:

import http from 'k6/http';
import {expect} from 'https://jslib.k6.io/k6chaijs/4.3.4.3/index.js';

export const options = {
  cloud: {
    projectID: ...,
    name: "failing setup",
    distribution: {
      plz: {loadZone: "...", percent: 100}
    }
  }
}

export function setup() {
  let x = 100;
  expect(x, 'expected value').to.equal(200);
}

export default function () {
  http.get('https://quickpizza.grafana.com');
};

Suggested Solution (optional)

Add a distinction between network errors and failing setup: retry reconciliation on the former and request abort on the later.

Already existing or connected issues / PRs (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    GCk6pertaining to cloud test runs and communication between k6-operator and GCk6PLZenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions