Skip to content

Conversation

@Tofel
Copy link
Contributor

@Tofel Tofel commented Nov 19, 2024

Also:

  • fixed API token generation to work with latest Grafana and service accounts
  • small streamlining of Profile.Run()
  • some new examples


At a minimum, you need to provide the following environment variables, as WASP requires Loki:

* `LOKI_TENANT_ID` - *(optional)* A tenant ID that acts as a bucket identifier for logs, logically separating them from other sets of logs. If the tenant ID doesn't exist, Loki will create it. Can be empty if log separation is not a concern.
Copy link

Choose a reason for hiding this comment

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

@Tofel probaby worth splitting to Required and Optional here? I see "Required" and immediately first var is optional :)


// Define RPS schedule
rpsSchedule := wasp.Combine(
wasp.Steps(1, 1, 9, 10*time.Second), // Start with 1 RPS, increment by 1 RPS in 9 steps over 10 seconds
Copy link

Choose a reason for hiding this comment

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

named parameters would go a long way here

@@ -0,0 +1,3 @@
# WASP - k8s

TBD No newline at end of file
Copy link

Choose a reason for hiding this comment

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

Just checking that this is not lost in action


```go
epsilonSchedule := wasp.Combine(
wasp.Steps(1, 1, 4, 10*time.Second), // Start at 1 RPS, increment by 1 RPS in 4 steps over 10 seconds (1 increment every 2.5 seconds)
Copy link

Choose a reason for hiding this comment

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

Named params will help a lot here and below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@AKhozya but I think that's out of scope for this PR. If we want named parameters we should change these methods to accept structs with named fields, no other way in go. If only it was Kotlin....

Copy link

Choose a reason for hiding this comment

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

ah, cool - I thought they come for free - my kotlin and ruby past :P

wasp/Makefile Outdated
start:
docker compose -f compose/docker-compose.yaml up -d
sleep 5 && curl -X POST -H "Content-Type: application/json" -d '{"name":"test", "role": "Admin"}' http://localhost:3000/api/auth/keys | jq .key
sleep 5
Copy link

Choose a reason for hiding this comment

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

Wonder if this should be replaced with proper waiting, e.g. for log message or process up

@Tofel Tofel marked this pull request as ready for review November 25, 2024 15:06
@Tofel Tofel requested review from a team and sebawo as code owners November 25, 2024 15:06
@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
19.8% Duplication on New Code (required ≤ 5%)

See analysis details on SonarQube

@Tofel Tofel merged commit 279fb34 into main Nov 26, 2024
45 of 49 checks passed
@Tofel Tofel deleted the tt-1722-wasp-mdbook branch November 26, 2024 09:02
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.

3 participants