OpenAssetIO / OpenAssetIO/OpenAssetIO-Manager-BAL

Enforce correct creation of Context

Open
#137 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

difficulty/easy help wanted
Dominant language
Python
Stars
9
Forks
9
PR merge metrics
No merged PRs in 30d

Description

What

Set a flag in the Context.managerState and assert that the same flag exists in the Context passed to each API method

Why

See https://github.com/OpenAssetIO/usdOpenAssetIOResolver/pull/47 where the USD resolver plugin was not creating the Context properly, and it was only when prototyping a feature that required use of the managerState that it became apparent.

By making some use of the managerState, if only to store and check a boolean flag, we could have detected this problem early in the unit tests.

Contributor guide

No contributing guide indexed for this repository

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 by locating Context construction, the API methods that receive Context, and the existing unit tests in this Python repository. Add the managerState flag check described in the issue and verify that the tests detect incorrectly created or passed Context objects.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design, testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.