Skip to content

Add duo_evaluation_ready feature flag

What does this MR do and why?

This MR adds a feature flag for One click Duo Chat evaluation in MRs (#497305 - closed). This duo_evaluation_ready is a signal that the GDK instance is ready for evaluation. This is mainly used in https://gitlab.com/gitlab-org/modelops/ai-model-validation-and-research/ai-evaluation/evaluation-runner.

[4] pry(main)> Feature.enable(:duo_evaluation_ready)
shinya@shinya-XPS-15-9530:~/gdk/gitlab$ curl --header "PRIVATE-TOKEN: [REDACTED]" "http://gdk.test:3000/api/v4/features" | jq --arg name "duo_evaluation_ready" '.[] | select(.name == $name).state'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   433  100   433    0     0  14034      0 --:--:-- --:--:-- --:--:-- 14433
"on"

How this feature flag is used

When evaluation runner kicks off an evaluation pipeline which launches a remote GDK instance, it executes wait-for-instance job to make sure the instance is ready for evaluation, example. We're currently checking the HTTP status from GitLab-Rails url, however this technically returns 200 even before the post-deployment script is complete. We enable the duo_evaluation_ready feature flag at the end of the post-deployment script, and change the wait-for-instance job to request to http://gdk.test:3000/api/v4/features endpoint to get the state of the FF. So that the evaluation won't start until the GDK is ready.

References

Please include cross links to any resources that are relevant to this MR This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

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

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Shinya Maeda

Merge request reports

Loading