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

Release 2.0.0 rc.2 #45

Merged
merged 10 commits into from
Apr 3, 2023
Merged

Release 2.0.0 rc.2 #45

merged 10 commits into from
Apr 3, 2023

Conversation

fschade
Copy link
Collaborator

@fschade fschade commented Mar 30, 2023

How to review (what)

  • need's a technical review (TS-Code, package structure, clone and build, ...)
  • needs a content review (docs, markdown, fat finger errors, ...)
  • needs a test-test (the bundled scenarios, no repo clone needed, see below bash examples)

Overview

first of all, sorry for the pr size, under the given circumstances it was unfortunately not possible to keep it smaller,
the foundations for this pr were laid in the rc.1, and every function builds on that.

this pr introduces several things, and i will list them before i go into detail.

  • new koko-010-login test and documentation
  • new koko-020-navigate-file-tree test and documentation
  • new koko-040-upload-delete test and documentation
  • new koko-050-upload-download test and documentation
  • new koko-060-create-rename-folder test and documentation
  • new sample-kitchen-sink test and documentation
  • monorepo structure
  • switch from yarn to pnpm to align with our other projects
  • introduce turbowatch for dev builds
  • introduce esbuild for blazing fast builds
  • shared esbuild, tsconfig and eslint packages to simplify development
  • the api picks on its own which endpoints to use, for example oCis uses the graph api whenever possible
  • k6-tdk package, could be published later, in a nutshell it abstracts and wraps every functionality to build cloud compatible tests, (cjs, esm)

to explain it in one sentence, it contains the needed buildingblocks and tests to be able to fulfil the koko load testing paper!

ok now let me explain in detail what this is all about.

k6-tdk

One of the main reasons of cdPerf is to be able to tests the 3 major cloud platforms, to do so the api must be aligned.
Since we've already started to introduce new apis in ocis we've needed a way to use the old and new api's side by side in the same test scenario. Thats the reason why i've created the k6-tdk (k6 test development toolkit).

It should speed up test development and abstract away the compatibility problem.

k6-tests

this maybe is the most important part, it should enable us to test oCis (other clouds work too) while developing it, but also prove the tests required by the koko performance paper (sorry, sources are private). Beside the koko specific tests it also contain other valuable test scenarios, let me list and explain all of those:

koko-010-login

The login test is intended to log a configurable number of users into the system and then log out again. The purpose of the test is primarily to put the idp under load and see how it handles it.

https://github.com/owncloud/cdperf/blob/next-rc2/packages/k6-tests/src/koko/010-login.md

k6 run https://raw.githubusercontent.com/owncloud/cdperf/next-rc2/packages/k6-tests/artifacts/koko-010-login.js

koko-020-navigate-file-tree

The navigate file tree test is intended to see how the instance behaves when many users move through a configurable deep folder hierarchy at the same time.

https://github.com/owncloud/cdperf/blob/next-rc2/packages/k6-tests/src/koko/020-navigate-file-tree.md

k6 run https://raw.githubusercontent.com/owncloud/cdperf/next-rc2/packages/k6-tests/artifacts/koko-020-navigate-file-tree.js

koko-040-upload-delete

The upload delete test is intended to see how the instance behaves when many users upload N files of size S, M and L each, and then deletes them again.

https://github.com/owncloud/cdperf/blob/next-rc2/packages/k6-tests/src/koko/040-upload-delete.md

k6 run https://raw.githubusercontent.com/owncloud/cdperf/next-rc2/packages/k6-tests/artifacts/koko-040-upload-delete.js

koko-050-upload-download

The upload download test is intended to see how the instance behaves when many users upload N files of size S, M and L each, and then download each.

https://github.com/owncloud/cdperf/blob/next-rc2/packages/k6-tests/src/koko/050-upload-download.md

k6 run https://raw.githubusercontent.com/owncloud/cdperf/next-rc2/packages/k6-tests/artifacts/koko-050-upload-download.js

koko-060-create-rename-folder

The create rename folder test is intended to see how the instance behaves when many users move through a configurable
deep folder hierarchy and then rename each of these folders after entering.

https://github.com/owncloud/cdperf/blob/next-rc2/packages/k6-tests/src/koko/060-create-rename-folder.md

k6 run https://raw.githubusercontent.com/owncloud/cdperf/next-rc2/packages/k6-tests/artifacts/koko-060-create-rename-folder.js

oc-share-upload-rename

The share upload rename test mimics a typical end user resource sharing scenario.

The admin user shares a parent folder with each of his colleagues, who in turn create a folder
in the received share per iteration and user then uploads a fixed number of files.
To finish, the folder in which the files are located is renamed by each user.

https://github.com/owncloud/cdperf/blob/next-rc2/packages/k6-tests/src/oc/share-upload-rename.md

k6 run https://raw.githubusercontent.com/owncloud/cdperf/next-rc2/packages/k6-tests/artifacts/oc-share-upload-rename.js

sample-kitchen-sink

The kitchen sink test is intended to demonstrate the whole api and client from our k6-tdk (k6 test development kit).
The test does not follow any user story, it is a good starting point to get inspired how the framework can be used.

https://github.com/owncloud/cdperf/blob/next-rc2/packages/k6-tests/src/sample/kitchen-sink.md

k6 run https://raw.githubusercontent.com/owncloud/cdperf/next-rc2/packages/k6-tests/artifacts/sample-kitchen-sink.js

surf-upload

The upload test mimics a typical end user resource uploading scenario.

The test idea originally came from surf, where the process was used to compare the individual cloud platforms.

https://github.com/owncloud/cdperf/blob/next-rc2/packages/k6-tests/src/surf/upload.md

k6 run https://raw.githubusercontent.com/owncloud/cdperf/next-rc2/packages/k6-tests/artifacts/surf-upload.js

misc

  • all the tests are now based on vu iterations, the benefit is that the user have to decide how many test users are provisioned and used --vus 2 --iterations 10
  • instead of creating a wrapper like we did in v1, it now uses k6 only to run tests (no docker, no wrapping bash script)
  • each test works for ownCloud classic, nextCloud and oCis and uses the newest (and different) api's for each.
  • each tests prepares it's own environment (setup) and manages the teardown on its own, the tests are self containing, no preparation needed.
  • each test uses the latest api dy default (oCis) and as host https://localhost:9200 (oCis default), oidc (oCis default), admin:admin login (oCis default), to change it, following environment variables are available BASE_URL, AUTH_ADAPTER , API_VERSION , ADMIN_LOGIN, ADMIN_PASSWORD `, please read the test docs (*.md) to get a deep dive and list of available options.

ToDo's

  • technical review
  • content review
  • run the tests
    • oCis
    • ownCloud
    • nextCloud

introduce a test which mimics a user login flow, based on the koko load test concept
introduce a test which navigates through a configurable folder tree, based on the koko load test concept
introduce a test which simulates an upload delete workflow, based on the koko load test concept
introduce a test which simulates an upload download workflow, based on the koko load test concept
introduce a test which creates and renames nested folders, based on the koko load test concept
introduce sample tests to show all contained options from the k6-tdk
introduce k6-tdk (test development kit) which exposes building blocks to work with the individual clouds (api, client, utils, auth)
introduce private esbuild package which contains shared building blocks
introduce private eslint config package which contains shared eslint configurations
introduce private tsconfig config package which contains shared typescript configurations
introduce private turbowatch package which contains shared watcher configurations
switch from yarn to pnpm
use a monorepo structure and introduce turbo, esbuild and turbowatch to speed up the development
k6-tdk now exports virtual sub packages and is now available
in cjs and
esm format

[skip ci]
@ownclouders/k6-tdk utils now export the k6 helpers directly without the
namespace
add test docs for each test
fschade and others added 2 commits March 30, 2023 19:20
k6-tdk disable virtual package sideEffects explicitly
Copy link
Contributor

@dragotin dragotin left a comment

Choose a reason for hiding this comment

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

Reviewed documentation and examples, not JS.

Excellent work from my POV!

README.md Outdated Show resolved Hide resolved
packages/k6-tests/src/koko/020-navigate-file-tree.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
package.json Show resolved Hide resolved
@ScharfViktor
Copy link
Contributor

Maybe stupid questions

image
is there any particularity in the name? script 030 is missing?

@fschade fschade marked this pull request as draft March 31, 2023 12:10
@fschade
Copy link
Collaborator Author

fschade commented Mar 31, 2023

i switched the pr back to draft, just in case to not merge it before all parties (test-reviewer, content-reviewer and ts-reviewer) nodded.

@fschade
Copy link
Collaborator Author

fschade commented Mar 31, 2023

Maybe stupid questions

image is there any particularity in the name? script 030 is missing?

the order and naming is from the load testing paper (closed source), the gaps are easy to explain, those tests are still missing and i provide them in a separate PR later.

- add more detail to the navigate folder test description
- fix some wordings in the readme
- build the vLib's after esbuild emission
- use platform node as default in the shared build setup
- update watch glob expression to only watch package src and pnpm workspace dist folders
Copy link

@JammingBen JammingBen left a comment

Choose a reason for hiding this comment

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

Code-wise it looks good to me, although that's hard to tell because of the size of this PR 😅 Some indentations seem to be off in general, 2 nitpicks (or rather questions).

Approving anyway since none of those things are dealbreakers IMO.

packages/k6-tdk/src/api/graph/v1/me.ts Show resolved Hide resolved
packages/k6-tdk/src/client/index.ts Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@fschade fschade marked this pull request as ready for review April 3, 2023 08:57
Co-authored-by: Martin <github@diemattels.at>
@fschade fschade merged commit d39e1b8 into main Apr 3, 2023
@delete-merged-branch delete-merged-branch bot deleted the next-rc2 branch April 3, 2023 09:08
@@ -41,7 +41,7 @@ We collect those metrics over time to get indicators of how the performance chan
for a more detailed instruction how to read the results you should consider reading the k6 manual,
specially the [end of test](https://k6.io/docs/results-output/end-of-test/) section.

## Available test suits
## Test Suits

Choose a reason for hiding this comment

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

I didn't mean to remove the Available, but the e was missing in Suits - sorry for the confusion.

Suggested change
## Test Suits
## Available Test Suites

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status:Needs-Review Needs review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants