Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monitor feature roll-out #8

Closed
3 tasks
filipefurtad0 opened this issue Apr 4, 2023 · 3 comments
Closed
3 tasks

Monitor feature roll-out #8

filipefurtad0 opened this issue Apr 4, 2023 · 3 comments

Comments

@filipefurtad0
Copy link

filipefurtad0 commented Apr 4, 2023

Delivery Stage

  • Initial proposal: monitor feature roll-out through recurrent DB queries, on core-instances
  • Discuss on the best process to do so: Metabase vs N8N vs. Ansible task
  • Implement the agreed proposal

1. What is the need / problem?

In addition to the communication already done with instances (via Slack, Discourse) it would be good to actually be able to monitor the state in which a given feature is at, in terms of roll-out (which actors, percentage, fully enabled/disabled).

2. Which type of users does this problem affect (and how many, if known)?

  • Relevant to the delivery team, to manage feature roll-out
  • Relevant to interpret Matomo data

3. What tools does this involve?

Metabase, N8N, code-changes on ofn-install (Ansible)

4. Links to connected discussions

Delivery circle meeting from 04.04.2023

5. Implementation Proposal

WIP, to be discussed: Metabase vs N8N vs. Ansible

@jibees jibees self-assigned this Apr 4, 2023
@jibees
Copy link

jibees commented Apr 4, 2023

Using Ansible, on staging

Running:

sql='SELECT fg.feature_key, fg.key, fg.value FROM flipper_gates fg'                                      
ansible all-staging -u openfoodnetwork -a "psql -h localhost openfoodnetwork ofn_user -c '$sql'" --ask-vault-pass

Results:

staging.openfoodnetwork.org.uk | CHANGED | rc=0 >>
    feature_key    |   key   | value 
-------------------+---------+-------
 api_reports       | boolean | true
 api_v1            | boolean | true
 new_products_page | boolean | true
 vouchers          | boolean | true
 white_label       | boolean | true
 split_checkout    | boolean | true
(6 rows)
staging.coopcircuits.fr | CHANGED | rc=0 >>
    feature_key    |   key   |       value       
-------------------+---------+-------------------
 api_v1            | boolean | true
 api_reports       | boolean | true
 dfc_provider      | boolean | true
 new_products_page | boolean | true
 split_checkout    | boolean | true
 admin_style_v2    | actors  | Spree::User;21179
(6 rows)
staging.openfoodnetwork.org.au | CHANGED | rc=0 >>
    feature_key     |   key   |      value       
--------------------+---------+------------------
 api_v1             | actors  | Spree::User;1
 api_v1             | actors  | Spree::User;4378
 api_reports        | boolean | true
 dfc_provider       | boolean | true
 new_products_page  | boolean | true
 split_checkout     | boolean | true
 background_reports | boolean | true
(7 rows)

Explaination:

  • when key = boolean and value is true: means the feature is fully open
  • when key = actors: means that only open for (in this case) User, referenced by its id

Does this sound relatively easy to understand? Should I change, improve something?

@filipefurtad0
Copy link
Author

Yayy - worked locally for me too. Looks perfect to me, thanks JB.

I'm wondering if we would need create a sort of recurring job to query this (every day or week or deployment?) and make it accessible to everyone on the team, so we can all look it up when we need it. Maybe we could output this query on each deployment, somewhere... (slack channel?)

@jibees jibees removed their assignment Jul 11, 2023
@kirstenalarsen
Copy link

Interesting discussion, not a priority for now so closing issue. Thanks @jibees and @filipefurtad0 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants