[Task]: Expose waffle flags/switches and django settings to pinguino
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Start by reading the existing api/v5/site endpoint and its serializers, including how they expose READ_ONLY and site notice Configs. Then trace how waffle switches, flags, Django settings, and admin Configs are defined and how Pinguino consumes site data. The issue leaves the endpoint and exposure design open; done means Pinguino can access the needed configuration values through a consistent implementation.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
We have the capability to turn off features, which are implemented either as:
- waffle switches (off/on per site; real-time toggle)
- waffle flags (off/on -potentially- per user; real-time toggle)
- django settings (set/unset per site; redeploy needed)
- connected: there are also admin Configs, which are strings or other non-boolean values (set/unset per site; real-time setting)
Pinguino, by default, has no way of knowing any of these values, but it does sometimes need to know if, for example, a waffle switch is enabled if an api endpoint is gated by that waffle switch, so a user isn't allowed to submit an api request that will fail (e.g. the support form).
Currently we expose some of these values via the api/v5//site endpoint - the READ_ONLY setting, plus the Configs for the site-wide notice, and submission notice. We need a consistent implementation for other settings/flags/switches.
Options:
- Don't expose them - assume everything is available until the api request fails. cons: bad developer experience, and sometimes we do need to expose values.
- Add more values to the /site endpoint. cons: this is used by frontend already, so gets requested a lot, so we probably don't want to add additional database requests and increase the payload size.
- Add a developer-hub focused /site-developer or similar for non-frontend values. cons: yet another api call.
- Insert the waffle/settings values into the index.html as we serve it via django (similar to how we insert the auth token). cons: bit hacky, and would only get updated on a full page refresh - no client side javascript updates.
- _variant on 1|2 - return these values as additional data on the user profile serializer, similarly as we do for /site on the user profile response, to save the extra api call . cons: the user profile response is called by frontend, so still a lot of inefficiency for every user who is logged on frontend but isn't using pinguino (and may not be an add-on developer at all); also isn't an option for values we need for logged-out users too.
Acceptance Criteria
- various flavours of configuration in django are exposed to pinguino
┆Issue is synchronized with this Jira Task
- Ngôn ngữ chính
- Makefile
- Star
- 135
- Fork
- 52
- Merge trung bình
- 6 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 7
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của mozilla/addons
-
needs:info
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
[Task]: Add new confusable characters to AMO's custom mappingsCó thể đã có người làm @abhn đã nhận 1 ngày trước. Đang mởneeds:info
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
-
[Task]: Add feedback form link to PinguinoCó thể đã có người làm @diox đã nhận 2 ngày trước. Đang mởcomponent:pinguino_devhub
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
[Bug]: Enterprise toggle option is shown in theme version uploadCó thể đã có người làm @eviljeff đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Tất cả issue của mozilla/addons
Issue tương tự
-
triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 64/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
meetecho/juturna_nodes#43 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
ranxianglei/billion-context#7860 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
`RequestHandler.build_request_kwargs` drops empty request bodies such as `{}` or `""`Có thể đã có người làm @abhirajadhikary06 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
typesense/typesense-python#170 ·
Maintainer thường phản hồi trong vòng 1 ngày