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

Update grafana client generation #226

Merged
merged 11 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 2 additions & 74 deletions .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ENV=DEV # PROD or DEV
ONLY_RELAY_SERVICE=FALSE # TRUE - This will start only nightly relay service without cloud service
ONLY_RELAY_SERVICE=TRUE # TRUE - This will start only nightly relay service without cloud service
NONCE=VERY_SECRET_NONCE
[email protected]
# Different than db address specified in infra/.env due to docker shenanigans, used in setting up datasource in grafana
Expand All @@ -13,76 +13,4 @@ GF_SECURITY_ADMIN_USER=admin
GF_SECURITY_ADMIN_PASSWORD=admin
# TEST PASSWORD DO NO USE IN PRODUCTION
MAILER_PASSWORD=ZtA5gFKMsXzHmEm
MAILER_ACTIVE=FALSE

# Generated so it can work with grafana
# ssh-keygen -t rsa -b 4096 -m PEM -f grafana.key -N ""
# openssl rsa -in grafana.key -pubout -outform PEM -out grafana.key.pub
# TEST KEY DO NO USE IN PRODUCTION
JWT_SECRET="-----BEGIN RSA PRIVATE KEY-----
MIIJKQIBAAKCAgEAzlUYIpqSUAyLJaf8ZUef06YBh5DcmaTrwGcVwC57VtywY7bH
XQUtGooULQjiYgnyOPxHDt2W+gQW1axiMxOQew0MF0kXYQhg0+WA1dcWOsxCDpyL
c4z+E7EmdV7MTuvsDR2TLhZ6DFmVbN4ca64Wvftz//3Ptc/I1/VpfGsHWb0Vpmph
kbE9vWGHzzJVp/Lvtk7ybcpfxiiNWEi7unr7/TIEsqy93lCRfpLKIvO06ITH1GZz
7+VPL/8q8lrH5kSwxqo5szq1mEa0pNN6hTpocz00x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LKIvO06ITH1GZz7+VPL/8q8lrH5kSwxqo5szq1mEa0pNN6hTpo
cz00x5oBfL9K/TNLQNgdb5uOOfjQ9pYtZ49UDyMLs5lCsZ6ue+SIbWrJXDEPMIEg
Lzx9nnvytL9wbiwo5GQdIaDAZXMwVVdKQGyqx+UhaHmrb1u0RVRcFzO/QPWzNCWv
oxJGfg9dVTxfjaa1HzQ0irPs86zCQUnt0OyTuq0SmUgTCNXLSQaN8MigN++zwT4c
IRDB0WMgmu8sxtnmA3Zq+2GYT97jmbdVMB34DVbXI4UigD3UieVe4rO95cEssoUT
AFG0pthv64BRKIIRNch+eiBBjkGpnWKRybzsmqnEqpMf9v7KQU9hmpBJDbi6KA6w
3fg3KSroJZwosbAwdBuylCfQgq1jZ6UfR/ss9kYGhaWbCB3ARmY9XHFc+OZuFW0p
ohgfBfs9RDMDVkTa4tzBAGsCAwEAAQ==
-----END PUBLIC KEY-----
"
MAILER_ACTIVE=FALSE
2 changes: 1 addition & 1 deletion .github/workflows/connect-test-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
run: |
cargo test-integration
cargo run --bin nightly-connect-server &
sleep 5
sleep 50
- name: test base local
run: |
pnpm test:ci
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ tower = { version = "0.4.13", features = [
"limit",
] }
tower-http = { version = "0.5.2", features = ["cors", "trace"] }
reqwest = {version = "0.11.24", features = ["json"]}
reqwest = { version = "0.11.24", features = ["json"] }
tokio = { version = "1.35.1", features = ["full"] }
async-trait = "0.1.77"
r-cache = "0.5.0"
Expand All @@ -48,6 +48,7 @@ sqlx = { version = "0.7.3", features = [
"chrono",
] }
chrono = { version = "0.4.22", features = ["serde"] }
configparser = "3.1.0"

[profile.dev]
debug = 0
Expand Down
5 changes: 5 additions & 0 deletions database/migrations/0014_domain_verifications.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ CREATE UNIQUE INDEX idx_unique_verified_domains ON domain_verifications (domain_
WHERE finished_at IS NOT NULL AND deleted_at IS NULL;

CREATE INDEX domain_verifications_app_id_idx ON domain_verifications(app_id);

-- Safety measure to prevent multiple verification requests for the same domain for the same app
CREATE UNIQUE INDEX idx_unique_active_domain_verifications
ON domain_verifications (domain_name, app_id)
WHERE finished_at IS NULL AND cancelled_at IS NULL AND deleted_at IS NULL;
47 changes: 42 additions & 5 deletions database/src/tables/domain_verifications/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,14 @@ mod tests {
.await
.unwrap();

assert_eq!(data.len(), 1);
let verification = data.get(0).unwrap();
assert!(verification.cancelled_at.is_some());
assert!(verification.domain_name == "valid_domain_name_2");
assert_eq!(data.len(), 2);
// Find the cancelled verification
let cancelled_verification = data
.iter()
.find(|v| v.domain_name == "valid_domain_name_2".to_string())
.unwrap();

assert!(cancelled_verification.cancelled_at.is_some());
}

#[tokio::test]
Expand Down Expand Up @@ -284,7 +288,40 @@ mod tests {

// Check
let data = db
.get_domain_verifications_by_app_id(&&app_id)
.get_domain_verifications_by_app_id(&app_id)
.await
.unwrap();

assert_eq!(data.len(), 1);
assert!(data.get(0).unwrap().deleted_at.is_none());

// FInish verification
let mut tx = db.connection_pool.begin().await.unwrap();
db.finish_domain_verification(&mut tx, &domain_name, &app_id)
.await
.unwrap();
tx.commit().await.unwrap();

// Check
let data = db
.get_domain_verifications_by_app_id(&app_id)
.await
.unwrap();

assert_eq!(data.len(), 1);
assert!(data.get(0).unwrap().finished_at.is_some());

// Delete verification
let mut tx = db.connection_pool.begin().await.unwrap();
db.delete_domain_verification(&mut tx, &domain_name, &app_id)
.await
.unwrap();

tx.commit().await.unwrap();

// Check
let data = db
.get_domain_verifications_by_app_id(&app_id)
.await
.unwrap();

Expand Down
78 changes: 67 additions & 11 deletions grafana-client-gen/run_codegen.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,67 @@
#!/bin/bash
# Source both .env files
if [ -f .env ]; then
export $(cat .env | xargs)
fi

echo "Build path: "$OPENAPI_GENERATOR_DIR
echo "Language: "$OPENAPI_LANGUAGE
# Source Grafana version from the other directory
if [ -f ../grafana/.env ]; then
export $(cat ../grafana/.env | xargs)
elif [ -f ../grafana-client-gen/.env ]; then
export $(cat ../grafana-client-gen/.env | xargs)
fi

if [ -z "$GRAFANA_VERSION" ]; then
echo "Error: GRAFANA_VERSION not found in environment variables"
exit 1
fi

echo "Build path: $OPENAPI_GENERATOR_DIR"
echo "Language: $OPENAPI_LANGUAGE"
echo "Grafana Version: $GRAFANA_VERSION"

# Remove v prefix if present in version
GRAFANA_VERSION_CLEAN=${GRAFANA_VERSION#v}

echo "Removing existing build directory..."
rm -rf $OPENAPI_GENERATOR_DIR

echo "Setting up new build directory and downloading the OpenAPI spec..."
echo "Setting up new build directory..."
mkdir -p $OPENAPI_GENERATOR_DIR
curl -o $OPENAPI_GENERATOR_DIR/openapi3.json https://raw.githubusercontent.com/grafana/grafana/main/public/openapi3.json

# First, get the tag reference
TAG_URL="https://api.github.com/repos/grafana/grafana/git/refs/tags/v$GRAFANA_VERSION_CLEAN"
echo "Fetching from tag URL: $TAG_URL"
TAG_DATA=$(curl -s "$TAG_URL")
echo "Tag API Response:"
echo "$TAG_DATA"

# Get the SHA of the tag object
TAG_SHA=$(echo "$TAG_DATA" | grep -o '"sha": "[^"]*"' | head -1 | cut -d'"' -f4)
echo "Tag SHA: $TAG_SHA"

# Now get the actual commit SHA that this tag points to
TAG_URL="https://api.github.com/repos/grafana/grafana/git/tags/$TAG_SHA"
echo "Fetching tag details from: $TAG_URL"
TAG_DETAILS=$(curl -s "$TAG_URL")
echo "Tag Details Response:"
echo "$TAG_DETAILS"

# Extract the actual commit SHA
COMMIT_HASH=$(echo "$TAG_DETAILS" | grep -o '"sha": "[^"]*"' | tail -1 | cut -d'"' -f4)

if [ -z "$COMMIT_HASH" ] || [ "$COMMIT_HASH" = "null" ]; then
echo "Failed to get proper commit hash for version $GRAFANA_VERSION_CLEAN"
exit 1
fi

echo "Found commit hash: $COMMIT_HASH"

# Download the OpenAPI spec for the specific version
echo "Downloading OpenAPI spec for commit $COMMIT_HASH..."
SPEC_URL="https://raw.githubusercontent.com/grafana/grafana/$COMMIT_HASH/public/openapi3.json"
echo "Downloading from: $SPEC_URL"
curl -L -o $OPENAPI_GENERATOR_DIR/openapi3.json "$SPEC_URL"

if [ -f $OPENAPI_GENERATOR_DIR/openapi3.json ]; then
echo "OPENAPI file downloaded successfully."
Expand All @@ -20,8 +70,15 @@ else
exit 1
fi

# Get current user's UID and GID
USER_ID=$(id -u)
GROUP_ID=$(id -g)

echo "Running Docker to generate code..."
docker run --rm -v ${PWD}/${OPENAPI_GENERATOR_DIR}:/local openapitools/openapi-generator-cli generate \
docker run --rm \
--user $USER_ID:$GROUP_ID \
-v ${PWD}/${OPENAPI_GENERATOR_DIR}:/local \
openapitools/openapi-generator-cli generate \
-i /local/openapi3.json \
-g $OPENAPI_LANGUAGE \
-o /local/grafana-rust-client
Expand All @@ -35,17 +92,16 @@ if [ -d "$OPENAPI_GENERATOR_DIR/grafana-rust-client/src" ]; then
rm -rf "$OPENAPI_GENERATOR_DIR/grafana-rust-client/.travis.yml"
rm -f "$OPENAPI_GENERATOR_DIR/grafana-rust-client/.gitignore"
rm -f "$OPENAPI_GENERATOR_DIR/grafana-rust-client/git_push.sh"

echo "Copying generated package to the target directory..."
rm -rf "$TARGET_DIR"
cp -r "$OPENAPI_GENERATOR_DIR/grafana-rust-client" "$TARGET_DIR"
echo "Files copied successfully to $TARGET_DIR."

echo "Setting full permissions for $TARGET_DIR..."
echo "Setting permissions for $TARGET_DIR..."
chmod -R 777 "$TARGET_DIR"
echo "Permissions set to 777 for all files and directories in $TARGET_DIR."
echo "Permissions set for all files and directories in $TARGET_DIR."
else
echo "Code generation did not complete successfully; src directory not found."
exit 1
fi

fi
3 changes: 3 additions & 0 deletions grafana/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# We can't just put the version inside main .env file as docker developers denied this feature due to skill issues
# https://github.com/docker/compose/issues/11122
GRAFANA_VERSION=11.0.0
2 changes: 1 addition & 1 deletion grafana/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
grafana:
image: grafana/grafana:11.0.0
image: grafana/grafana:${GRAFANA_VERSION}
user: "${GRAFANA_USER_ID:-1000:1000}"
volumes:
- ./grafana-data:/var/lib/grafana # Persists Grafana data
Expand Down
9 changes: 8 additions & 1 deletion grafana/grafana.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
; Auth via jwt token is not working perfectly by design https://github.com/grafana/grafana/pull/78602
[auth.jwt]
enabled = true
header_name = X-JWT-Assertion
Expand All @@ -8,4 +9,10 @@ key_file = /etc/grafana/public-key.pem
url_login = true

[feature_toggles]
enable = dashboardScene
enable = dashboardScene

[security]
; TEST USERNAME DO NOT USE IN PRODUCTION
admin_user = admin
; TEST PASSWORD DO NOT USE IN PRODUCTION
admin_password = admin
3 changes: 3 additions & 0 deletions jwt_keys/note.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generated so it can work with grafana
# ssh-keygen -t rsa -b 4096 -m PEM -f grafana.key -N ""
# openssl rsa -in grafana.key -pubout -outform PEM -out grafana.key.pub
15 changes: 0 additions & 15 deletions openapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,6 @@ Class | Method | HTTP request | Description
*LicensingApi* | [**post_license_token**](docs/LicensingApi.md#post_license_token) | **POST** /licensing/token | Create license token.
*LicensingApi* | [**post_renew_license_token**](docs/LicensingApi.md#post_renew_license_token) | **POST** /licensing/token/renew | Manually force license refresh.
*LicensingApi* | [**refresh_license_stats**](docs/LicensingApi.md#refresh_license_stats) | **GET** /licensing/refresh-stats | Refresh license stats.
*MigrationsApi* | [**create_cloud_migration_token**](docs/MigrationsApi.md#create_cloud_migration_token) | **POST** /cloudmigration/token | Create gcom access token.
*MigrationsApi* | [**create_migration**](docs/MigrationsApi.md#create_migration) | **POST** /cloudmigration/migration | Create a migration.
*MigrationsApi* | [**delete_cloud_migration**](docs/MigrationsApi.md#delete_cloud_migration) | **DELETE** /cloudmigration/migration/{id} | Delete a migration.
*MigrationsApi* | [**get_cloud_migration**](docs/MigrationsApi.md#get_cloud_migration) | **GET** /cloudmigration/migration/{id} | Get a cloud migration.
*MigrationsApi* | [**get_cloud_migration_run**](docs/MigrationsApi.md#get_cloud_migration_run) | **GET** /cloudmigration/migration/{id}/run/{runID} | Get the result of a single migration run.
*MigrationsApi* | [**get_cloud_migration_run_list**](docs/MigrationsApi.md#get_cloud_migration_run_list) | **GET** /cloudmigration/migration/{id}/run | Get a list of migration runs for a migration.
*MigrationsApi* | [**get_migration_list**](docs/MigrationsApi.md#get_migration_list) | **GET** /cloudmigration/migration | Get a list of all cloud migrations.
*MigrationsApi* | [**run_cloud_migration**](docs/MigrationsApi.md#run_cloud_migration) | **POST** /cloudmigration/migration/{id}/run | Trigger the run of a migration to the Grafana Cloud.
*OrgApi* | [**add_org_user_to_current_org**](docs/OrgApi.md#add_org_user_to_current_org) | **POST** /org/users | Add a new user to the current organization.
*OrgApi* | [**get_current_org**](docs/OrgApi.md#get_current_org) | **GET** /org | Get current Organization.
*OrgApi* | [**get_org_users_for_current_org**](docs/OrgApi.md#get_org_users_for_current_org) | **GET** /org/users | Get all users within the current organization.
Expand Down Expand Up @@ -446,18 +438,13 @@ Class | Method | HTTP request | Description
- [Certificate](docs/Certificate.md)
- [ChangeUserPasswordCommand](docs/ChangeUserPasswordCommand.md)
- [ClearHelpFlags200Response](docs/ClearHelpFlags200Response.md)
- [CloudMigrationListResponse](docs/CloudMigrationListResponse.md)
- [CloudMigrationRequest](docs/CloudMigrationRequest.md)
- [CloudMigrationResponse](docs/CloudMigrationResponse.md)
- [CloudMigrationRunList](docs/CloudMigrationRunList.md)
- [ClusterStatus](docs/ClusterStatus.md)
- [Config](docs/Config.md)
- [ContactPointExport](docs/ContactPointExport.md)
- [CookiePreferences](docs/CookiePreferences.md)
- [Correlation](docs/Correlation.md)
- [CorrelationConfig](docs/CorrelationConfig.md)
- [CorrelationConfigUpdateDto](docs/CorrelationConfigUpdateDto.md)
- [CreateAccessTokenResponseDto](docs/CreateAccessTokenResponseDto.md)
- [CreateCorrelationCommand](docs/CreateCorrelationCommand.md)
- [CreateCorrelationResponseBody](docs/CreateCorrelationResponseBody.md)
- [CreateDashboardSnapshot200Response](docs/CreateDashboardSnapshot200Response.md)
Expand Down Expand Up @@ -566,8 +553,6 @@ Class | Method | HTTP request | Description
- [MassDeleteAnnotationsCmd](docs/MassDeleteAnnotationsCmd.md)
- [Matcher](docs/Matcher.md)
- [MetricRequest](docs/MetricRequest.md)
- [MigrateDataResponseDto](docs/MigrateDataResponseDto.md)
- [MigrateDataResponseItemDto](docs/MigrateDataResponseItemDto.md)
- [MoveFolderCommand](docs/MoveFolderCommand.md)
- [MsTeamsConfig](docs/MsTeamsConfig.md)
- [MuteTimeInterval](docs/MuteTimeInterval.md)
Expand Down
5 changes: 2 additions & 3 deletions openapi/docs/AccessControlApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,18 +301,17 @@ Name | Type | Description | Required | Notes

## list_roles

> Vec<models::RoleDto> list_roles(delegatable, include_hidden)
> Vec<models::RoleDto> list_roles(delegatable)
Get all roles.

Gets all existing roles. The response contains all global and organization local roles, for the organization which user is signed in. You need to have a permission with action `roles:read` and scope `roles:*`. The `delegatable` flag reduces the set of roles to only those for which the signed-in user has permissions to assign.
Gets all existing roles. The response contains all global and organization local roles, for the organization which user is signed in. You need to have a permission with action `roles:read` and scope `roles:*`.

### Parameters


Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**delegatable** | Option<**bool**> | | |
**include_hidden** | Option<**bool**> | | |

### Return type

Expand Down
Loading
Loading