Skip to content

Commit

Permalink
Apply automatic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtosisbot authored and github-actions[bot] committed May 22, 2023
1 parent 60d955b commit 3648d91
Show file tree
Hide file tree
Showing 94 changed files with 299 additions and 175 deletions.
4 changes: 2 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Business Source License 1.1
Parameters

Licensor: Kurtosis Technologies, Inc.
Licensed Work: Kurtosis 0.76.7
Licensed Work: Kurtosis 0.76.8
The Licensed Work is (c) 2023 Kurtosis Technologies, Inc.
Additional Use Grant: You may make use of the Licensed Work, provided that
you may not use the Licensed Work for an Environment Orchestration Service.
Expand All @@ -12,7 +12,7 @@ you may not use the Licensed Work for an Environment Orchestration Service.
allows third parties (other than your employees and
contractors) to create distributed system environments.

Change Date: 2027-05-17
Change Date: 2027-05-22

Change License: AGPLv3 (GNU Affero General Public License Version 3)

Expand Down
2 changes: 1 addition & 1 deletion api/golang/kurtosis_version/kurtosis_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ const (
// !!!!!!!!!!! DO NOT UPDATE! WILL BE MANUALLY UPDATED DURING THE RELEASE PROCESS !!!!!!!!!!!!!!!!!!!!!!
// This is necessary so that Kurt Core consumers will know if they're compatible with the currently-running
// API container
KurtosisVersion = "0.76.7"
KurtosisVersion = "0.76.8"
// !!!!!!!!!!! DO NOT UPDATE! WILL BE MANUALLY UPDATED DURING THE RELEASE PROCESS !!!!!!!!!!!!!!!!!!!!!!
)
2 changes: 1 addition & 1 deletion api/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "kurtosis-sdk",
"//": "NOTE: DO NOT UPDATE THIS VERSION MANUALLY - IT WILL BE UPDATED DURING THE RELEASE PROCESS!",
"version": "0.76.7",
"version": "0.76.8",
"main": "./build/index",
"description": "This repo contains a Typescript client for communicating with the Kurtosis Engine server, which is responsible for creating, managing and destroying Kurtosis Enclaves.",
"types": "./build/index",
Expand Down
2 changes: 1 addition & 1 deletion api/typescript/src/kurtosis_version/kurtosis_version.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// !!!!!!!!!!! DO NOT UPDATE! WILL BE MANUALLY UPDATED DURING THE RELEASE PROCESS !!!!!!!!!!!!!!!!!!!!!!
// This is necessary so that Kurt Core consumers (e.g. modules) will know if they're compatible with the currently-running
// API container
export const KURTOSIS_VERSION: string = "0.76.7"
export const KURTOSIS_VERSION: string = "0.76.8"
// !!!!!!!!!!! DO NOT UPDATE! WILL BE MANUALLY UPDATED DURING THE RELEASE PROCESS !!!!!!!!!!!!!!!!!!!!!!
14 changes: 0 additions & 14 deletions docs/versioned_docs/version-0.76.3/cli-reference/files-upload.md

This file was deleted.

44 changes: 44 additions & 0 deletions docs/versioned_docs/version-0.76.8/best-practices.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: Best Practices
sidebar_label: Best Practices
slug: /best-practices
---

Passing package arguments to the CLI
-------------------------------
Passing [package arguments][args-concepts-reference] to the CLI can get hairy due to the interaction between Bash and JSON quotes. The following are tips to make your life easier:

1. **When you have a small number of arguments:** surround the arguments with single quotes so you don't have to escape double quotes in your JSON. E.g.:
```bash
kurtosis run github.com/user/repo '{"some_param":5,"some_other_param":"My value"}'
```
1. **When you have a large number of arguments:** put them in a `.json` file and use [Bash command substitution](https://www.gnu.org/software/bash/manual/html_node/Command-Substitution.html) _inside double quotes_ to slot them into the `kurtosis run` command. E.g.:
```bash
kurtosis run github.com/user/repo "$(cat my-args.json)"
```
The double quotes around the `$(cat my-args.json)` are important so any spaces inside `my-args.json` don't fool Bash into thinking you're passing in two separate arguments.

Choosing the right wait
-----------------------
Kurtosis has three different types of waits. Described here are the three, with tips on when to use each:

1. Automatic waiting on port availability when a service starts (enabled by default; can be configured with [`PortSpec.wait`][port-spec-starlark-reference])
- Should be sufficient for most usecases
- Requires little-to-no extra configuration
- Will cause parallel `Plan.add_services` to fail, allowing for quick aborting
1. Waiting on [`ReadyCondition`][ready-condition-starlark-reference]s (configured in [`ServiceConfig`][service-config-starlark-reference])
- Allows for more advanced checking (e.g. require a certain HTTP response body, ensure a CLI call returns success, etc.)
- More complex to configure
- Will cause parallel `Plan.add_services` to fail, allowing for quick aborting
1. The [`Plan.wait`][plan-wait-starlark-reference]
- Most useful for asserting the system has reached a desired state in tests (e.g. wait until data shows up after loading)
- More complex to configure
- Cannot be used to short-circuit `Plan.add_services`

<!---------------------------------------- ONLY LINKS BELOW HERE!!! ----------------------------------->
[args-concepts-reference]: ./concepts-reference/args.md

[service-config-starlark-reference]: ./starlark-reference/service-config.md
[port-spec-starlark-reference]: ./starlark-reference/port-spec.md
[ready-condition-starlark-reference]: ./starlark-reference/ready-condition.md
[plan-wait-starlark-reference]: ./starlark-reference/plan.md#wait
Original file line number Diff line number Diff line change
@@ -1,5 +1,56 @@
# Changelog

## [0.76.8](https://github.com/kurtosis-tech/kurtosis/compare/0.76.7...0.76.8) (2023-05-22)


### Bug Fixes

* Make printWarningIfArgumentIsDeprecated unit test deterministic ([#633](https://github.com/kurtosis-tech/kurtosis/issues/633)) ([46bbee5](https://github.com/kurtosis-tech/kurtosis/commit/46bbee5dcd67346f0007d6d83326fd9200fa9dda))
* Rollback to previous cluster when cluster set fails ([#631](https://github.com/kurtosis-tech/kurtosis/issues/631)) ([0e212c9](https://github.com/kurtosis-tech/kurtosis/commit/0e212c93f05fc174a6ad47bafb25975e0b95b892))

## [0.76.7](https://github.com/kurtosis-tech/kurtosis/compare/0.76.6...0.76.7) (2023-05-17)


### Bug Fixes

* Exclude resources dir from the internal testsuites ([#622](https://github.com/kurtosis-tech/kurtosis/issues/622)) ([ffd2031](https://github.com/kurtosis-tech/kurtosis/commit/ffd203174db8d515752ddf832a8dbfc924687520))
* Remove the GRPC proxy port from the engine and from the APIC ([#626](https://github.com/kurtosis-tech/kurtosis/issues/626)) ([de284be](https://github.com/kurtosis-tech/kurtosis/commit/de284bed4f9031e51fb4ccafc934e39bea3879d5))
* set MTU to 1440 to fix GitPod networking ([#627](https://github.com/kurtosis-tech/kurtosis/issues/627)) ([19ec18e](https://github.com/kurtosis-tech/kurtosis/commit/19ec18e4174555b51c917e13f34f7275c6ddab1a))

## [0.76.6](https://github.com/kurtosis-tech/kurtosis/compare/0.76.5...0.76.6) (2023-05-12)


### Bug Fixes

* ips are on the range 172.16.0.0/16 ([#618](https://github.com/kurtosis-tech/kurtosis/issues/618)) ([b48cb73](https://github.com/kurtosis-tech/kurtosis/commit/b48cb73dadffdb23922c73b68fed1485840eb846))

## [0.76.5](https://github.com/kurtosis-tech/kurtosis/compare/0.76.4...0.76.5) (2023-05-11)


### Features

* Support path argument autocomplete in all CLI commands ([#607](https://github.com/kurtosis-tech/kurtosis/issues/607)) ([e5a5fe1](https://github.com/kurtosis-tech/kurtosis/commit/e5a5fe1f4c690a4ceeea63e718fb4c446e921940))

## [0.76.4](https://github.com/kurtosis-tech/kurtosis/compare/0.76.3...0.76.4) (2023-05-11)


### Features

* Add Windows support for CLI ([#608](https://github.com/kurtosis-tech/kurtosis/issues/608)) ([4cc1c56](https://github.com/kurtosis-tech/kurtosis/commit/4cc1c56e3cebf41c5a033df718938a4d805a3400))
* added sign-up for kcloud ([#591](https://github.com/kurtosis-tech/kurtosis/issues/591)) ([16641e9](https://github.com/kurtosis-tech/kurtosis/commit/16641e9ed0947ea34d44b0c521b429ace5ab5b50))
* Help developers to work across the project modules ([#596](https://github.com/kurtosis-tech/kurtosis/issues/596)) ([e7f845e](https://github.com/kurtosis-tech/kurtosis/commit/e7f845ecd67c8218b28ff284b12ac18949108364))
* return deprecation warnings to users in yellow in colour. ([#586](https://github.com/kurtosis-tech/kurtosis/issues/586)) ([7609fd8](https://github.com/kurtosis-tech/kurtosis/commit/7609fd8c77994875eae77fd458f1744f267c17fb))


### Bug Fixes

* Enable autocomplete for the `files upload` path argument ([#598](https://github.com/kurtosis-tech/kurtosis/issues/598)) ([be52f9e](https://github.com/kurtosis-tech/kurtosis/commit/be52f9e73c5cd63e09f5c2343add165886bd7313))
* kurtosis --&gt; kurtosistech in readme ([#604](https://github.com/kurtosis-tech/kurtosis/issues/604)) ([d6c2ea2](https://github.com/kurtosis-tech/kurtosis/commit/d6c2ea2f6f8127c799701707e65c7697c8354452))
* Pipe metric reporting logs to logger instead of stderr ([#576](https://github.com/kurtosis-tech/kurtosis/issues/576)) ([7060473](https://github.com/kurtosis-tech/kurtosis/commit/7060473563f12b9d097aeb20eb3e4c5cf3e58d55))
* Refresh the README dev instructions ([#595](https://github.com/kurtosis-tech/kurtosis/issues/595)) ([0c71fac](https://github.com/kurtosis-tech/kurtosis/commit/0c71fac3ae3a36fdf6df56e567b3ba184a6756b6))
* rename cloud--&gt;kloud in readme ([#602](https://github.com/kurtosis-tech/kurtosis/issues/602)) ([a998d39](https://github.com/kurtosis-tech/kurtosis/commit/a998d39a3511cf6ba84759f4b91cb20795cefd3d))
* Support redirects with cookies in the user support URLs validation test ([#600](https://github.com/kurtosis-tech/kurtosis/issues/600)) ([ce9718e](https://github.com/kurtosis-tech/kurtosis/commit/ce9718ed55e60cd227f036149da0c410ba99be09)), closes [#599](https://github.com/kurtosis-tech/kurtosis/issues/599)

## [0.76.3](https://github.com/kurtosis-tech/kurtosis/compare/0.76.2...0.76.3) (2023-04-27)


Expand Down
17 changes: 17 additions & 0 deletions docs/versioned_docs/version-0.76.8/cli-reference/files-upload.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: files upload
sidebar_label: files upload
slug: /files-upload
---

Files can be stored as a [files artifact][files-artifacts] inside an enclave by uploading them:

```bash
kurtosis files upload $THE_ENCLAVE_IDENTIFIER $PATH_TO_FILES
```

where `$THE_ENCLAVE_IDENTIFIER` is the [resource identifier][resource-identifier] for the enclave.

<!-------------------- ONLY LINKS BELOW THIS POINT ----------------------->
[files-artifacts]: ../concepts-reference/files-artifacts.md
[resource-identifier]: ../concepts-reference/resource-identifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ This command has options available to customize its execution:

1. The `--dry-run` flag can be used to print the changes proposed by the script without executing them
1. The `--parallelism` flag can be used to specify to what degree of parallelism certain commands can be run. For example: if the script contains an [`add_services`][add-services-reference] instruction and is run with `--parallelism 100`, up to 100 services will be run at one time.
1. The `--enclave-id` flag can be used to instruct Kurtosis to run the script inside the specified enclave or create a new enclave (with the given enclave [identifier](../concepts-reference/resource-identifier.md)) if one does not exist. If this flag is not used, Kurtosis will create a new enclave with an auto-generated name, and run the script or package inside it.
1. The `--enclave` flag can be used to instruct Kurtosis to run the script inside the specified enclave or create a new enclave (with the given enclave [identifier](../concepts-reference/resource-identifier.md)) if one does not exist. If this flag is not used, Kurtosis will create a new enclave with an auto-generated name, and run the script or package inside it.
1. The `--with-subnetworks` flag can be used to enable [subnetwork capabilties](../concepts-reference/subnetworks.md) within the specified enclave that the script or package is instructed to run within. This flag is false by default.
1. The `--verbosity` flag can be used to set the verbosity of the command output. The options include `BRIEF`, `DETAILED`, or `EXECUTABLE`. If unset, this flag defaults to `BRIEF` for a concise and explicit output. Use `DETAILED` to display the exhaustive list of arguments for each command. Meanwhile, `EXECUTABLE` will generate executable Starlark instructions.

Expand Down
37 changes: 37 additions & 0 deletions docs/versioned_docs/version-0.76.8/concepts-reference/args.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: Args
sidebar_label: Args
---

Kurtosis [packages][packages-reference] can be parameterized with arguments. Arguments can be passed in via the CLI when running the package.

To make your package take in arguments, first change your `run` function from:

```python
def run(plan):
```

to:

```python
def run(plan, args)
```

Then pass JSON-serialized arg values to `kurtosis run` in the CLI. For example:

```bash
kurtosis run github.com/USERNAME/REPO '{"some_parameter":"some_value","some_other_param":5}'
```

Kurtosis will automatically JSON-deserialize the JSON string, and then pass it in to the `run` function in Starlark.

The JSON passed in via the command line will be deserialized to a dictionary in Starlark (_not_ a `struct`). So to access the args above, your `main.star` might look like:

```python
def run(plan, args):
plan.print("some_parameter value: " + args["some_parameter"])
plan.print("some_other_param value: " + args["some_other_param"])
```

<!------------------------------------- ONLY LINKS BELOW HERE --------------------------------->
[packages-reference]: ./packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,12 @@ If you want to run a non-main branch, tag or commit use the following syntax
All these will call the `run(plan)` function of the package's `main.star`.

### Arguments
To accept parameters to the `run(plan)` function, the function should accept an `args` parameter:

```python
def run(plan, args):
print("Hello, " + args["name"])
```

To pass parameters to the `run(plan, args)` function, a JSON object should be passed as the second positional argument after the script or package path:

```
kurtosis run github.com/package-author/package-repo/path/to/directory-with-kurtosis.yml '{"name": "Joseph"}'
```
Kurtosis packages can be parameterized with arguments by adding an `args` parameter to the `run` function. Read more about package arguments [here][args-reference].

<!-------------------- ONLY LINKS BELOW HERE -------------------------->
[kurtosis-yml]: ./kurtosis-yml.md
[locators]: ./locators.md
[kurtosis-managed-packages]: https://github.com/kurtosis-tech?q=package+in%3Aname&type=all&language=&sort=
[how-do-kurtosis-imports-work-explanation]: ../explanations/how-do-kurtosis-imports-work.md
[plan]: ./plan.md
[args-reference]: ./args.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ Enclave Status: RUNNING
Creation Time: Tue, 24 Jan 2023 16:45:13 GMT
API Container Status: RUNNING
API Container Host GRPC Port: 127.0.0.1:54433
API Container Host GRPC Proxy Port: 127.0.0.1:54434
========================================== User Services ==========================================
UUID Name Ports Status
Expand All @@ -37,7 +36,6 @@ Enclave Status: RUNNING
Creation Time: Tue, 24 Jan 2023 16:45:13 GMT
API Container Status: RUNNING
API Container Host GRPC Port: 127.0.0.1:54433
API Container Host GRPC Proxy Port: 127.0.0.1:54434
========================================== User Services ==========================================
UUID Name Ports Status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,4 +330,3 @@ We’d love to hear from you on what went well for you, what could be improved,
### Other examples and guides
We encourage you to check out our [quickstart](https://docs.kurtosis.com/quickstart) (where you’ll build a Postgres database and API on top) and our other examples in our [awesome-kurtosis repository](https://github.com/kurtosis-tech/awesome-kurtosis) where you’ll find some great examples, including packages for:
* [Spinning up the same local Ethereum testnet](https://github.com/kurtosis-tech/eth2-package), but with additional services connected such as a transaction spammer (to simulate transactions), a fork monitor, and a connected Grafana and Prometheus instance
* Performing a [sub-networking test](https://github.com/kurtosis-tech/awesome-kurtosis/tree/main/ethereum-network-partition-test) against the same local Ethereum network
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,16 @@ Download the appropriate artifact from [the release artifacts page][release-arti

<TabItem value="windows" label="Windows">

The Kurtosis CLI cannot be installed directly on Windows. Windows users are encouraged to use [Windows Subsystem for Linux (WSL)][windows-susbsystem-for-linux] to use Kurtosis.
Windows users are encouraged to use [Windows Subsystem for Linux (WSL)][windows-susbsystem-for-linux] to use Kurtosis.
If you want to run a native executable, you can download the latest build for your architechture [here](https://github.com/kurtosis-tech/kurtosis-cli-release-artifacts/tags).

Or do it using PowerShell:

```bash
Invoke-WebRequest -Uri "https://github.com/kurtosis-tech/kurtosis-cli-release-artifacts/releases/download/REPLACE_VERSION/kurtosis-cli_REPLACE_VERSION_windows_REPLACE_ARCH.tar.gz" -OutFile kurtosis.tar.gz
tar -xvzf kurtosis.tar.gz
kurtosis.exe
```

</TabItem>

Expand Down
File renamed without changes.
15 changes: 15 additions & 0 deletions docs/versioned_docs/version-0.76.8/package-index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Package Index
sidebar_label: Package Index
slug: /package-index
---

This page lists where you can find many different types of Kurtosis [packages][packages-concepts-reference]:

- [Awesome Kurtosis][awesome-kurtosis]: A repo containing many different examples of Kurtosis usage across web2 and web3
- [Official Kurtosis packages on Github](https://github.com/kurtosis-tech?q=package+in%3Aname&type=&language=): The multitude of Kurtosis-maintained packages, including the rising [AutoGPT package](https://github.com/kurtosis-tech/autogpt-package)
- [Third-party packages on Github](https://github.com/search?q=-user%3Akurtosis-tech+path%3A**%2Fkurtosis.yml&type=code): Kurtosis packages written by non-Kurtosis parties

<!---------------------------------------- ONLY LINKS BELOW HERE!!! ----------------------------------->
[awesome-kurtosis]: https://github.com/kurtosis-tech/awesome-kurtosis
[packages-concepts-reference]: ./concepts-reference/packages.md
Loading

0 comments on commit 3648d91

Please sign in to comment.