Skip to content

Updates GAR list page table row copy button data

Rahul Chanila requested to merge 425070-copy-image-path into master

What does this MR do and why?

Updates GAR list page table row copy button data

Using GraphQL type updated in !146396 (merged), use uri instead of image & digest for copy button data.

Also changes the text to Copy image path

Context: see discussion

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

Before After
Screenshot_2024-03-04_at_12.02.01_pm Screenshot_2024-03-04_at_11.58.21_am

How to set up and validate locally

  1. Simulate a SAAS instance in local GDK

  2. In rails console enable the experiment

    Feature.enable(:google_cloud_support_feature_flag)
  3. Visit Project > Settings > Integrations > Google Cloud IAM & fill values

  4. Visit Project > Settings > Integrations > Google Cloud Artifact registry & fill values

  5. Visit Project > Deploy > Google Artifact registry

  6. Test the copy button on each item has the value to the uri instead of image & digest

Values for form Google Cloud IAM Screenshot_2024-03-04_at_12.08.17_pm

Google Cloud Artifact Registry Screenshot_2024-03-04_at_12.08.31_pm

Also apply this diff

diff --git a/ee/lib/google_cloud_platform.rb b/ee/lib/google_cloud_platform.rb
index 3aaf984b0504..a0a4f92e0817 100644
--- a/ee/lib/google_cloud_platform.rb
+++ b/ee/lib/google_cloud_platform.rb
@@ -1,11 +1,12 @@
 # frozen_string_literal: true
 
 module GoogleCloudPlatform
-  GLGO_BASE_URL = if Gitlab.staging?
-                    'https://glgo.staging.runway.gitlab.net'
-                  else
-                    'https://auth.gcp.gitlab.com'
-                  end
+  # GLGO_BASE_URL = if Gitlab.staging?
+  #                   'https://glgo.staging.runway.gitlab.net'
+  #                 else
+  #                   'https://auth.gcp.gitlab.com'
+  #                 end
+  GLGO_BASE_URL = 'https://glgo-abo6lqot3a-uc.a.run.app'
 
   GLGO_TOKEN_ENDPOINT_URL = "#{GLGO_BASE_URL}/token".freeze
 
diff --git a/ee/lib/google_cloud_platform/jwt.rb b/ee/lib/google_cloud_platform/jwt.rb
index b12a9bba6ca3..f99a59541812 100644
--- a/ee/lib/google_cloud_platform/jwt.rb
+++ b/ee/lib/google_cloud_platform/jwt.rb
@@ -74,7 +74,8 @@ def user_access_level
 
     override :issuer
     def issuer
-      Gitlab.config.gitlab.url
+      # Gitlab.config.gitlab.url
+      'http://172.16.123.1:3000'
     end
 
     override :audience

Related to #425070 (closed)

Edited by Rahul Chanila

Merge request reports