Skip to content

Catalog feature checks instance Duo feature availability

What does this MR do and why?

Currently, we only check a feature flag. When the feature flag is removed, or made to be default enabled, it would make AI Catalog visible for instances that haven't enabled Duo features.

This MR updates the AI Catalog to additionally check duo_features_enabled, which is true when the instance has Duo features enabled.

How to set up and validate locally

  1. In rails console enable the feature flag
    Feature.enable(:global_ai_catalog)
  2. Set the instance's duo_features_enabled property to false, replace <YOUR PAT> with a Personal Access Token for your root user on your local GDK instance.
     curl --location --request PUT 'http://gdk.test:3000/api/v4/application/settings?duo_features_enabled=false&lock_duo_features_enabled=true' \
     --header 'Authorization: Bearer <YOUR PAT>'
  3. Visit http://gdk.test:3000/explore you should not set an AI Catalog menu item
  4. Visit http://gdk.test:3000/explore/ai-catalog you should see a 404
  5. Use the search bar, and search for catalog, you should not see any AI Catalog links
  6. Now set the instance's duo_features_enabled property to true. Wait about 30s for caches to clear.
     curl --location --request PUT 'http://gdk.test:3000/api/v4/application/settings?duo_features_enabled=true&lock_duo_features_enabled=false' \
     --header 'Authorization: Bearer <YOUR PAT>'
  7. Visit http://gdk.test:3000/explore you should see an AI Catalog menu item
  8. Visit http://gdk.test:3000/explore/ai-catalog should load
  9. Use the search bar, and search for catalog, you should see some AI Catalog Jump to links

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Luke Duncalfe

Merge request reports

Loading