Skip to content

Commit

Permalink
Merge branch 'main' into bgazzard/rename-cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
Dartoxian committed Dec 5, 2023
2 parents 5c5f2f9 + eeb304b commit 40425e8
Show file tree
Hide file tree
Showing 44 changed files with 426 additions and 165 deletions.
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
# Changelog

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


### Features

* emui design improvements ([#1892](https://github.com/kurtosis-tech/kurtosis/issues/1892)) ([9268a24](https://github.com/kurtosis-tech/kurtosis/commit/9268a2450c125ee95721d0c51a401bf68db5d68a))
* emui handle json/yaml input interchangably ([#1891](https://github.com/kurtosis-tech/kurtosis/issues/1891)) ([cd4263b](https://github.com/kurtosis-tech/kurtosis/commit/cd4263bed4e784eca2dcd9c118e5b69c5d353f06))

## [0.85.40](https://github.com/kurtosis-tech/kurtosis/compare/0.85.39...0.85.40) (2023-12-02)


### Features

* change change license to Apache 2.0 ([#1884](https://github.com/kurtosis-tech/kurtosis/issues/1884)) ([64084d8](https://github.com/kurtosis-tech/kurtosis/commit/64084d8e7ce18ebb86b05d17035db90971c2f867))


### Bug Fixes

* cache bug ([#1885](https://github.com/kurtosis-tech/kurtosis/issues/1885)) ([82e46e2](https://github.com/kurtosis-tech/kurtosis/commit/82e46e249006e85b4f71824798370968d8ee7731))
* change tail package ([#1874](https://github.com/kurtosis-tech/kurtosis/issues/1874)) ([f4e87ec](https://github.com/kurtosis-tech/kurtosis/commit/f4e87ec6757219b089ca3b7d2692bc15c42f8fd1))

## [0.85.39](https://github.com/kurtosis-tech/kurtosis/compare/0.85.38...0.85.39) (2023-11-30)


### Features

* emui package details page ([#1873](https://github.com/kurtosis-tech/kurtosis/issues/1873)) ([e2b75b2](https://github.com/kurtosis-tech/kurtosis/commit/e2b75b25d597ddfc49f0ebec1de5e2f7ca840281))
* User service ports Traefik Docker labels ([#1871](https://github.com/kurtosis-tech/kurtosis/issues/1871)) ([d18f20e](https://github.com/kurtosis-tech/kurtosis/commit/d18f20eee93d94739ea9bf497fc5d6780452d57d))


### Bug Fixes

* move log collector creation logic ([#1870](https://github.com/kurtosis-tech/kurtosis/issues/1870)) ([b695e27](https://github.com/kurtosis-tech/kurtosis/commit/b695e27742c653b635183c4db04e739b182eaec6))
* service name collision error message ([#1863](https://github.com/kurtosis-tech/kurtosis/issues/1863)) ([164b316](https://github.com/kurtosis-tech/kurtosis/commit/164b316d335e128668c9ca8b9f9eb74b22efe9ce))
* Update custom Nix dev deps to work on also linux ([#1862](https://github.com/kurtosis-tech/kurtosis/issues/1862)) ([d11cd37](https://github.com/kurtosis-tech/kurtosis/commit/d11cd37d5b733114937dd3d4e874255a03c1399d))

## [0.85.38](https://github.com/kurtosis-tech/kurtosis/compare/0.85.37...0.85.38) (2023-11-29)


Expand Down
8 changes: 4 additions & 4 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.85.38
Licensed Work: Kurtosis 0.85.41
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,9 +12,9 @@ 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-11-29
Change Date: 2027-12-05

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

For information about alternative licensing arrangements for the Software,
please visit: https://kurtosis.com/
Expand Down Expand Up @@ -97,4 +97,4 @@ other recipients of the licensed work to be provided by Licensor:

3. To specify a Change Date.

4. Not to modify this License in any other way.
4. Not to modify this License in any other way.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Check out an introductory demo video here:

How do I get going?
===================
To see Kurtosis in action, first install it using the instructions [here](https://docs.kurtosis.com/install). _Note that we're working on a cloud-hosted version of Kurtosis that doesn't require any local installation; if this is interesting to you then let us know [here](https://mp2k8nqxxgj.typeform.com/to/U1HcXT1H) and we'll let you know when it's available._
To see Kurtosis in action, first install it using the instructions [here](https://docs.kurtosis.com/install) or visit [Kurtosis Cloud][https://cloud.kurtosis.com/] to provision a remote host.

Then, run the [Redis voting app Kurtosis package](https://github.com/kurtosis-tech/awesome-kurtosis/tree/main/redis-voting-app):

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.85.38"
KurtosisVersion = "0.85.41"
// !!!!!!!!!!! DO NOT UPDATE! WILL BE MANUALLY UPDATED DURING THE RELEASE PROCESS !!!!!!!!!!!!!!!!!!!!!!
)
2 changes: 1 addition & 1 deletion api/rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kurtosis-sdk"
version = "0.85.38"
version = "0.85.41"
license = "BUSL-1.1"
description = "Rust SDK for Kurtosis"
edition = "2021"
Expand Down
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.85.38",
"version": "0.85.41",
"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.85.38"
export const KURTOSIS_VERSION: string = "0.85.41"
// !!!!!!!!!!! DO NOT UPDATE! WILL BE MANUALLY UPDATED DURING THE RELEASE PROCESS !!!!!!!!!!!!!!!!!!!!!!
16 changes: 16 additions & 0 deletions docs/docs/api-reference/starlark-reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@ pagination_next: api-reference/starlark-reference/standard-library

This section details the Kurtosis Starlark DSL used to manipulate the contents of enclaves. Feel free to use the [official Kurtosis Starlark VS Code extension][vscode-plugin] when writing Starlark with VSCode for features like syntax highlighting, method signature suggestions, hover preview for functions, and auto-completion for Kurtosis custom types.

Useful tips for using and writing Starlark
------------------------------------------
If you're using Visual Studio Code, you may find our [Kurtosis VS Code Extension][vscode-plugin] helpful when writing Starlark.

If you're using Vim, you can add the following to your `.vimrc` to get Starlark syntax highlighting:

```
" Add syntax highlighting for Starlark files
autocmd FileType *.star setlocal filetype=python
```

or if you use Neovim:
```
autocmd BufNewFile,BufRead *.star set filetype=python
```

Parameter Naming Convention
---------------------------

Expand Down
17 changes: 16 additions & 1 deletion docs/docs/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,26 @@ Kurtosis service names implements [RFC-1035](https://datatracker.ietf.org/doc/ht

Failure to adhere to the above standards will result in errors when running Kurtosis.

Writing and reading Starlark
----------------------------

If you're using Visual Studio Code, you may find our [Kurtosis VS Code Extension][vscode-plugin] helpful when writing Starlark.

If you're using Vim, you can add the following to your `.vimrc` to get Starlark syntax highlighting:

```
" Add syntax highlighting for Starlark files
autocmd FileType *.star setlocal filetype=python
```

or if you use Neovim:
```
autocmd BufNewFile,BufRead *.star set filetype=python
```

<!---------------------------------------- ONLY LINKS BELOW HERE!!! ----------------------------------->
[package-parameterization]: ./advanced-concepts/packages.md#parameterization

[vscode-plugin]: https://marketplace.visualstudio.com/items?itemName=Kurtosis.kurtosis-extension
[service-config-starlark-reference]: ./api-reference/starlark-reference/service-config.md
[port-spec-starlark-reference]: ./api-reference/starlark-reference/port-spec.md
[ready-condition-starlark-reference]: ./api-reference/starlark-reference/ready-condition.md
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/get-started/write-your-first-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ If you're using Vim, you can add the following to your `.vimrc` to get Starlark
autocmd FileType *.star setlocal filetype=python
```

or if you use Neovim:
```
autocmd BufNewFile,BufRead *.star set filetype=python
```
:::

Finally, [run][kurtosis-run-reference] the script (we'll explain enclaves in the "Review" section):
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guides/running-in-k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ There are many different ways to get a Kubernetes cluster (roughly ordered easie
- Deploy it on a managed Kuberenetes cluster, managing scaling and configurations yourself (e.g. EKS, AKS, GKE)

:::tip Kurtosis Kloud Early Access
If you're looking to run a stress-free "Kurtosis on Kubernetes in the cloud", look no further! We're excited to launch an early access offering for [Kurtosis Kloud](https://mp2k8nqxxgj.typeform.com/to/U1HcXT1H). Once you [sign up](https://mp2k8nqxxgj.typeform.com/to/U1HcXT1H), we'll reach out to you with the next steps.
If you're looking to run a stress-free "Kurtosis on Kubernetes in the cloud", look no further! Check out [Kurtosis Cloud](https://cloud.kurtosis.com/).
:::


Expand Down
5 changes: 5 additions & 0 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ const config = {
position: 'left',
label: 'Kurtosis for Web3',
},
{
href: 'https://www.kurtosis.com/release-notes',
position: 'left',
label: 'Release Notes',
},
{
href: 'https://github.com/kurtosis-tech/kurtosis/issues/new?assignees=leeederek&labels=docs&template=docs-issue.yml',
position: 'right',
Expand Down
34 changes: 20 additions & 14 deletions enclave-manager/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ type WebServer struct {
engineServiceClient *kurtosis_engine_rpc_api_bindingsconnect.EngineServiceClient
enforceAuth bool
instanceConfig *kurtosis_backend_server_rpc_api_bindings.GetCloudInstanceConfigResponse
apiKey *string
instanceConfigMap map[string]*kurtosis_backend_server_rpc_api_bindings.GetCloudInstanceConfigResponse
apiKeyMap map[string]*string
}

func NewWebserver(enforceAuth bool) (*WebServer, error) {
Expand All @@ -57,6 +58,8 @@ func NewWebserver(enforceAuth bool) (*WebServer, error) {
enforceAuth: enforceAuth,
instanceConfigMutex: &sync.RWMutex{},
apiKeyMutex: &sync.RWMutex{},
apiKeyMap: map[string]*string{},
instanceConfigMap: map[string]*kurtosis_backend_server_rpc_api_bindings.GetCloudInstanceConfigResponse{},
}, nil
}

Expand Down Expand Up @@ -92,7 +95,7 @@ func (c *WebServer) ValidateRequestAuthorization(
return false, stacktrace.NewError("An internal error has occurred. An empty API key was found")
}

instanceConfig, err := c.GetCloudInstanceConfig(ctx, auth.ApiKey)
instanceConfig, err := c.GetCloudInstanceConfig(ctx, reqToken, auth.ApiKey)
if err != nil {
return false, stacktrace.Propagate(err, "Failed to retrieve the instance config")
}
Expand All @@ -103,7 +106,9 @@ func (c *WebServer) ValidateRequestAuthorization(
}
reqHost = splitHost[0]
if instanceConfig.LaunchResult.PublicDns != reqHost {
return false, stacktrace.NewError("Instance config public dns '%s' does not match the request host '%s'", instanceConfig.LaunchResult.PublicDns, reqHost)
delete(c.apiKeyMap, reqToken)
delete(c.instanceConfigMap, reqToken)
return false, stacktrace.NewError("either the requested instance does not exist or the user is not authorized to access the resource")
}

return true, nil
Expand Down Expand Up @@ -413,11 +418,12 @@ func (c *WebServer) createKurtosisCloudBackendClient(

func (c *WebServer) GetCloudInstanceConfig(
ctx context.Context,
jwtToken string,
apiKey string,
) (*kurtosis_backend_server_rpc_api_bindings.GetCloudInstanceConfigResponse, error) {
// Check if we have already fetched the instance config, if so return the cache
if c.instanceConfig != nil {
return c.instanceConfig, nil
if c.instanceConfigMap[jwtToken] != nil {
return c.instanceConfigMap[jwtToken], nil
}

// We have not yet fetched the instance configuration, so we write lock, make the external call and cache the result
Expand Down Expand Up @@ -452,7 +458,7 @@ func (c *WebServer) GetCloudInstanceConfig(
return nil, stacktrace.Propagate(err, "Failed to get the instance config")
}

c.instanceConfig = getInstanceConfigResponse.Msg
c.instanceConfigMap[jwtToken] = getInstanceConfigResponse.Msg

return getInstanceConfigResponse.Msg, nil
}
Expand All @@ -468,21 +474,21 @@ func (c *WebServer) ConvertJwtTokenToApiKey(
if err != nil {
return nil, stacktrace.Propagate(err, "Failed to create the Cloud backend client")
}
request := &connect.Request[kurtosis_backend_server_rpc_api_bindings.GetOrCreateApiKeyRequest]{
Msg: &kurtosis_backend_server_rpc_api_bindings.GetOrCreateApiKeyRequest{
AccessToken: jwtToken,
},
}

if c.apiKey != nil {
if c.apiKeyMap[jwtToken] != nil {
return &Authentication{
ApiKey: *c.apiKey,
ApiKey: *c.apiKeyMap[jwtToken],
JwtToken: jwtToken,
}, nil
} else {
c.apiKeyMutex.Lock()
defer c.apiKeyMutex.Unlock()

request := &connect.Request[kurtosis_backend_server_rpc_api_bindings.GetOrCreateApiKeyRequest]{
Msg: &kurtosis_backend_server_rpc_api_bindings.GetOrCreateApiKeyRequest{
AccessToken: jwtToken,
},
}
result, err := (*client).GetOrCreateApiKey(ctx, request)
if err != nil {
return nil, stacktrace.Propagate(err, "Failed to get the API key")
Expand All @@ -494,7 +500,7 @@ func (c *WebServer) ConvertJwtTokenToApiKey(
}

if len(result.Msg.ApiKey) > 0 {
c.apiKey = &result.Msg.ApiKey
c.apiKeyMap[jwtToken] = &result.Msg.ApiKey
return &Authentication{
ApiKey: result.Msg.ApiKey,
JwtToken: jwtToken,
Expand Down
5 changes: 3 additions & 2 deletions enclave-manager/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
"react-icons": "^4.11.0",
"react-markdown": "^9.0.0",
"react-router-dom": "^6.17.0",
"react-scripts": "5.0.1",
"react-virtuoso": "^4.6.2",
"streamsaver": "^2.0.6",
"true-myth": "^7.1.0"
"true-myth": "^7.1.0",
"yaml": "^2.3.4"
},
"devDependencies": {
"@types/js-cookie": "^3.0.6",
Expand All @@ -41,6 +41,7 @@
"monaco-editor": "^0.44.0",
"prettier": "3.0.3",
"prettier-plugin-organize-imports": "^3.2.3",
"react-scripts": "5.0.1",
"serve": "^14.2.1",
"source-map-explorer": "^2.5.3",
"typescript": "^4.4.2"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @generated by protoc-gen-es v1.4.0 with parameter "target=ts"
// @generated by protoc-gen-es v1.4.1 with parameter "target=ts"
// @generated from file kurtosis_package_indexer.proto (package kurtosis_package_indexer, syntax proto3)
/* eslint-disable */
// @ts-nocheck
Expand Down Expand Up @@ -222,6 +222,11 @@ export class KurtosisPackage extends Message<KurtosisPackage> {
*/
version = "";

/**
* @generated from field: string icon_url = 12;
*/
iconUrl = "";

constructor(data?: PartialMessage<KurtosisPackage>) {
super();
proto3.util.initPartial(data, this);
Expand All @@ -241,6 +246,7 @@ export class KurtosisPackage extends Message<KurtosisPackage> {
{ no: 9, name: "parsing_result", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 10, name: "parsing_time", kind: "message", T: Timestamp },
{ no: 11, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 12, name: "icon_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): KurtosisPackage {
Expand Down Expand Up @@ -394,6 +400,16 @@ export class PackageRepository extends Message<PackageRepository> {
*/
rootPath = "";

/**
* @generated from field: google.protobuf.Timestamp last_commit_time = 5;
*/
lastCommitTime?: Timestamp;

/**
* @generated from field: string default_branch = 6;
*/
defaultBranch = "";

constructor(data?: PartialMessage<PackageRepository>) {
super();
proto3.util.initPartial(data, this);
Expand All @@ -406,6 +422,8 @@ export class PackageRepository extends Message<PackageRepository> {
{ no: 2, name: "owner", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "root_path", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "last_commit_time", kind: "message", T: Timestamp },
{ no: 6, name: "default_branch", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PackageRepository {
Expand Down
Loading

0 comments on commit 40425e8

Please sign in to comment.