Kinto / Kinto/kinto

Drop request from event

Open
#1,731 0 comments 0 reactions 0 assignees View on GitHub
question stale
Dominant language
Python
Stars
4.4k
Forks
437
Avg merge
1d 2h
Merged PRs (30d)
15

Description

This is a follow-up to #945. Right now events are gathered by resource/parent. When this happens, `payload` becomes essentially meaningless. At best we provide "one of" the payloads that makes sense given the `impacted_records`. The same is true for `request`. Why do we need to provide one of these for each event? Under what circumstances does `request` vary for different `impacted_records` across events in a `request`, or within an event group in the same resource/parent? If there are such circumstances, should we move `request` into each `impacted_record`? If not, can we stop storing `request` for each event, since we already have the request when we're processing its events? This is a sincere question -- my inclination is to deprecate `payload` and `request`, but I know there are a bunch of places where we fabricate requests for reasons and I haven't thought through the implications of what that means for events (e.g. https://github.com/Kinto/kinto/blob/master/kinto/plugins/default_bucket/__init__.py and https://github.com/Kinto/kinto-signer/blob/master/kinto_signer/utils.py#L171).

Contributor guide

Open the contributing guide

Research direction

Start with the follow-up in #945 and trace how events are gathered by resource/parent, including how payload and request are stored. Review kinto/plugins/default_bucket/__init__.py and kinto-signer/kinto_signer/utils.py:171 for fabricated requests. Done requires deciding whether request can be removed or relocated, documenting the implications, and identifying the affected behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.