Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump k6 version in tests #119

Merged
merged 2 commits into from
Apr 16, 2024
Merged

Bump k6 version in tests #119

merged 2 commits into from
Apr 16, 2024

Conversation

mstoykov
Copy link
Contributor

Description

Bump k6 to latest version

Please fill in this template.

  • Use a meaningful title for the Pull Request. Include the name of the jslib added/modified.
  • Fill the description section of the Pull Request.
  • Test the change in your code, and ensure the npm run test command succeeds.
  • Run yarn run generate-homepage locally and verify the new homepage /lib/index.html file looks legit.

Select one of these and delete the others:

If adding a new jslib:

  • The Pull Request creates a /lib/{jslib_name} folder.
  • The Pull Request creates a /lib/{jslib_name}/{desired_version} folder.
  • The /lib/{jslib_name}/{desired_version}/index.js file containing the jslib's code bundle exists.
  • The Pull Request updates the supported.json file to contain an entry for the newly added jslib and its {desired_version}, as in the following example:
{
  "{jslib_name}": {
    // Available package versions
    "versions": [
      "{desired_version}"
    ],

    // (optional) Documentation's or repository's URL
    "docs-url": "{documentation_or_repository_url}",

    // (optional) As a default, the homepage will point to
    // a package's bundle's index.js. If your package's main
    // bundle name is different; set it here (see the AWS
    // package for instance).
    "bundle-filename": "{index.js}"
}
  • Tests have been added to /tests/basic.js and /tests/testSuite.js to ensure that the added jslib is importable and runnable by k6.

If publishing a new version of an existing jslib:

  • The Pull Request is labeled with the version bump label.
  • The Pull Request adds a /lib/{jslib_name}/{desired_version} folder.
  • The Pull Request adds a /lib/{jslib_name}/{desired_version}/index.js file containing the jslib's code bundle.
  • The Pull Request updates the supported.json file to contain an entry for the newly added jslib version, as in the following example:
{
  "my-lib": [
    "1.0.2",
    // Use semantic versioning
    "{desired_version}"
  ]
}
  • The Pull Request adds the relevant tests to the /tests/basic.js and /tests/testSuite.js files to ensure that the new version of the jslib is importable and runnable by k6.
  • Merge the Pull Request once it is green. PRs adding new jslib versions do not require to get a review to be merged 🚀.

@mstoykov mstoykov requested review from a team as code owners April 16, 2024 09:50
@mstoykov mstoykov requested review from oleiade, joanlopez, w1kman and going-confetti and removed request for a team April 16, 2024 09:50
Copy link

@joanlopez joanlopez left a comment

Choose a reason for hiding this comment

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

Should we add this to the tasks list for k6 releases? 🤔 cc/ @grafana/k6-core

@codebien
Copy link
Contributor

@joanlopez Yes, but if it is possible we should link the latest version so we don't have to update it at all. https://docs.github.com/en/repositories/releasing-projects-on-github/linking-to-releases#linking-to-the-latest-release

@joanlopez
Copy link

@joanlopez Yes, but if it is possible we should link the latest version so we don't have to update it at all. https://docs.github.com/en/repositories/releasing-projects-on-github/linking-to-releases#linking-to-the-latest-release

Even better, right! 🚀

Co-authored-by: Ivan <2103732+codebien@users.noreply.github.com>
@mstoykov
Copy link
Contributor Author

I kind of prefer for us to know we add jslibs that will not work with older versions. Even here I bump it quite a lot more than necesary - I think I only need v0.44.0 or something like this.

Additioanlly our artefacts have the version so it is more involved to get the latest version.

Arguably I would prefer this to run the last 4-5 versions or something like this.

@mstoykov mstoykov merged commit 68adb9f into main Apr 16, 2024
4 checks passed
@mstoykov mstoykov deleted the bumpk6version branch April 16, 2024 14:01
@joanlopez
Copy link

I kind of prefer for us to know we add jslibs that will not work with older versions. Even here I bump it quite a lot more than necesary - I think I only need v0.44.0 or something like this.

Additioanlly our artefacts have the version so it is more involved to get the latest version.

Arguably I would prefer this to run the last 4-5 versions or something like this.

Yeah, if that's the purpose, similar to what we do with Go (std) or xk6 (Go) extensions, then I agree we could run them against a range of the X most recent versions, being X whatever we feel adequate, like 3? 5? 👍🏻

@mstoykov
Copy link
Contributor Author

I opened #120 for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants