openfga / openfga/api

Breaking Change in Proto Field Ordering

Open
#126 5 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
27
Forks
24
Avg merge
12d 6h
Merged PRs (30d)
1

Description

This proto field re-ordering breaks compatibility. The user and object fields get swapped, and tuple checks are just entirely misinterpreted:
https://github.com/openfga/api/commit/5daf658e21c2aa392532f7ab1e0549a877f48eeb#diff-2a88655b667aad16ec564eded7b5739e88e7d8b9da8a5231008519c3d3b80bb9L28

PR here: https://github.com/openfga/api/pull/97#

It looks like assertions were similarly affected and that change was reverted. Was there some kind of safe, backwards compatible migration that I missed? I would have assumed more people would be affected by this breaking change.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked commit diff and PR #97, then compare the proto field ordering with the affected user, object, tuple, and assertion fields. Determine whether a safe backwards-compatible migration exists and record a clear resolution for the compatibility break.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend-api-design
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.