Early access program tracking by namespace settings
What does this MR do and why?
Early access program tracking by namespace settings
In first iteration early access program tracking will be based on participation of namespace instead of individual user.
Issue: gitlab-org/developer-relations/contributor-success/team-task#511
Changelog: changed
Screenshots or screen recordings
Negative scenario 2
Example check for each existing group that aren't participating but feature flag is enabled:
Positive scenario
Example check for group that participates in Early access program AND feature flag is enabled:
How to set up and validate locally
Choose project in group and create/update code snippets there.
Negative scenario 1
Example check for each existing user that didn't do anything:
- As signed in user go to some owned project page.
- On left-sidebar click on
Code > Snippets > New snippet
. - Create snippet with any code you like.
- In rails console check that no tracking event created:
EarlyAccessProgram::TrackingEvent.none?
should returntrue
.
Negative scenario 2
Example check for each existing group that aren't participating but feature flag is enabled:
- In rails console enable feature flag for your user
Feature.enable(:early_access_program, User.find(<your-id>))
- As signed in user go to some owned project page.
- On left-sidebar click on
Code > Snippets > New snippet
. - Create snippet with any code you like. (optionally you can edit existing one)
- In rails console check that no tracking event created:
EarlyAccessProgram::TrackingEvent.none?
should returntrue
.
Positive scenario
Example check for group that participates in Early access program AND feature flag is enabled:
- In rails console enable feature flag for your user
Feature.enable(:early_access_program, User.find(<your-id>))
- In rails console mark your group as Early access program participant by
Group.find(<your-id>).namespace_settings.update!(early_access_program_participant: true)
- As signed in user go to a project of this group.
- On left-sidebar click on
Code > Snippets > New snippet
. - Create snippet with any code you like. (optionally you can edit existing one)
- In rails console check that no tracking event created:
EarlyAccessProgram::TrackingEvent.none?
should returnfalse
. - See list of tracking events by typing
EarlyAccessProgram::TrackingEvent.all
in rails console.