Refresh the page after clicking continue button
What does this MR do and why?
Refresh the page after clicking continue button
This change fixes an issue that prevents users from continuing with the right integration information.
When the page is preloaded the integration form is regenerated adding the fields preselected values.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
Recording showing that the page refreshes correctly and shows the underlying integration data after it gets updated in the background via an API call:
Screen_Recording_2024-03-08_at_14.50.35
How to set up and validate locally
-
Simulate a SAAS instance in local GDK
-
In rails console enable the required FF
Feature.enable(:google_cloud_support_feature_flag)
-
Visit
Settings > Integrations > Google Cloud IAM
for any group or project -
Click
Guided setup
-
Execute the provided script or the following one if you don't have a GCP WIF setup (make sure to set
GL_PAT
to a token withapi
access and replace the<project ID>
):
#!/bin/bash
set -eu
set -o pipefail
update_integration_data() {
JSON_PAYLOAD=$(cat <<EOF
{
"workload_identity_federation_project_id": "dev-gcp-s3c-integrati-9abafed1",
"workload_identity_federation_project_number": "604150606412",
"workload_identity_pool_id": "gitlab-wlif",
"workload_identity_pool_provider_id": "gitlab-wlif-oidc-provider"
}
EOF
)
curl -X PUT https://gitlab.com/api/v4/projects/<project ID>/integrations/google-cloud-platform-workload-identity-federation \
--header "Content-Type: application/json" \
--header "PRIVATE-TOKEN: $GL_PAT" \
--data "$JSON_PAYLOAD"
}
update_integration_data
Related to #448831 (closed)