Add dap_session_details_polling feature flag

What does this MR do and why?

Adds the feature flag that gates the session details polling changes, so the follow-up frontend MRs can each ship and roll back on their own. No behaviour change.

  • Add the dap_session_details_polling feature flag (gitlab_com_derisk, disabled by default)
  • Push it to the frontend for the current user on the session details page, including when it renders in the side panel

Implementation

  • ee/config/feature_flags/gitlab_com_derisk/dap_session_details_polling.yml: new flag definition, rollout issue [Feature flag] Rollout of `dap_session_details_... (#635251) • Allison Villa • 19.6
  • push_frontend_feature_flag(:dap_session_details_polling, current_user) added next to dap_session_restarts in the same three places it is pushed:
    • ee/app/controllers/projects/duo_agents_platform_controller.rb
    • ee/app/controllers/groups/duo_agents_platform_controller.rb
    • ee/lib/ee/gitlab/gon_helper.rb, which covers the session page in the side panel outside the Automate routes
  • The flag is read in Vue as glFeatures.dapSessionDetailsPolling by the follow-up MRs

References

Screenshots or screen recordings

No UI changes

How to set up and validate locally

  1. In the Rails console, enable the flag for your user:
    Feature.enable(:dap_session_details_polling, User.find_by_username('<your username>'))
  2. Visit /<project full path>/-/automate/agent-sessions/<session id>.
  3. In the browser console, run gon.features.dapSessionDetailsPolling. It returns true.
  4. Disable the flag with Feature.disable(:dap_session_details_polling) and reload the page. The same check returns false.
Edited by Allison Villa

Merge request reports

Loading
Loading