Creating a feature with multivariate_options drops each option's key (variations end up unlabelled for Experimentation)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
Direzione di ricerca
Start at the feature creation endpoint, POST /api/v1/projects/{project_pk}/features/, and trace how its request handles multivariate_options; compare that with the PUT /api/v1/projects/{project_pk}/features/{feature_pk}/mv-options/{id}/ behavior described here. Confirm the change by creating a feature with an option key and checking that the response and a later GET preserve it, or reject the request with a validation error.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
When a feature is created with multivariate_options in the body of POST /api/v1/projects/{project_pk}/features/, the key of each option is silently dropped: the response and later GETs return "key": null. No error or warning is returned.
This matters for Experimentation: the docs say exposures are attributed by variation label, and "a variation without a label, for example one created through the API without a key, is not counted" (Run an experiment → Troubleshooting). So a client that creates its variations in one call, passing keys, ends up with unlabelled variations and silently loses exposures.
Steps to reproduce
Self-hosted open source, image flagsmith/flagsmith:2.295.2 (/version/ → "image_tag": "2.295.2", "is_enterprise": false), Admin API key auth.
curl -s -X POST "$API/projects/$PROJECT/features/" \
-H "Authorization: Api-Key $KEY" -H "Content-Type: application/json" \
-d '{
"name": "mv_key_probe",
"type": "MULTIVARIATE",
"initial_value": "control-value",
"multivariate_options": [
{"type": "unicode", "string_value": "variant-a-value",
"default_percentage_allocation": 0, "key": "variant_a"}
]
}'
Expected behaviour
The option is created with "key": "variant_a", or the request is rejected with a validation error if keys can't be set at creation time.
Actual behaviour
"multivariate_options": [
{"id": 5, "type": "unicode", "string_value": "variant-a-value",
"default_percentage_allocation": 0.0, "key": null}
]
GET /api/v1/projects/$PROJECT/features/{id}/ also returns "key": null.
Workaround
Set the key afterwards with PUT /api/v1/projects/{project_pk}/features/{feature_pk}/mv-options/{id}/ and the full body (type, feature, string_value, default_percentage_allocation, key). (PATCH on that endpoint currently returns 500, already tracked in #9119.)
Possibly related
- #6615 (validation on the mv-options endpoint)
- #9119 (PATCH on a multivariate option returns 500)
- Lingua principale
- Python
- Stelle
- 9.9k
- Fork
- 658
- Merge medio
- 1g 15h
- PR unite (30g)
- 171
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Flagsmith/flagsmith
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Flagsmith/flagsmith#9119 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Fix Button Alignment in SDK Installation SectionForse già presa @manueldezman l’ha presa 4 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Flagsmith/flagsmith#9056 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Cloud Python warehouse snippet omits the import needed by its short-lived-job guidanceForse già presa @jcd1991 l’ha presa 5 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
Flagsmith/flagsmith#9045 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Expose whether an organisation is blocked for API usageForse già presa @PiUnknown l’ha presa 39 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Flagsmith/flagsmith#8773 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Flagsmith/flagsmith
Issue simili
-
documentation good first issue help wanted
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
documentation good first issue help wanted
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
documentation good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
[Suggestion]: AgentermAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
collabnix/awesome-mcp-lists#490 ·
I maintainer di solito rispondono entro 2 giorni