Skip to content

feat(main): update to service v 0.12.0#139

Open
b-long wants to merge 2 commits intomainfrom
feat/update-service-0-12-0
Open

feat(main): update to service v 0.12.0#139
b-long wants to merge 2 commits intomainfrom
feat/update-service-0-12-0

Conversation

@b-long
Copy link
Copy Markdown
Owner

@b-long b-long commented May 8, 2026

No description provided.

b-long added 2 commits May 7, 2026 22:01
… run which

The sub-project's uv environment does not contain protoc-gen-connect-python,
so `uv run which` failed and silently aborted buf generate. Now checks the
parent repo's .venv first, falling back to the system PATH.
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the protobuf definitions to align with version 0.12.0 of the OpenTDF platform, introducing features such as obligation fulfillment context, namespace certificates, and an allow_traversal flag for attribute definitions. It also adds a manager field to key provider configurations and implements validation rules across various policy and authorization messages. Feedback identifies misleading documentation in the ValueTriggerRequest message regarding entity identification and suggests improving the cross-platform portability of the plugin resolution logic in the generation script by using shutil.which().

Comment on lines +27 to +30
// Required. The ID of the action that will trigger this obligation value policy decisioning.
common.IdNameIdentifier action = 1 [(buf.validate.field).required = true];
// Required. The attribute value ID that will trigger this obligation value policy decisioning.
common.IdFqnIdentifier attribute_value = 2 [(buf.validate.field).required = true];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The comments for the action and attribute_value fields in ValueTriggerRequest are misleading. They mention 'ID', but the types IdNameIdentifier and IdFqnIdentifier allow identifying the entities by either ID or Name/FQN. The comments should be updated to reflect this flexibility.

Comment on lines +145 to +161
# Resolve the connect-python plugin path. The buf.gen.yaml uses a relative
# path (e.g. ../.venv/bin/protoc-gen-connect-python) that is correct for
# running buf directly, but we need an absolute path when rewriting the file.
# Try the known relative location first; fall back to searching the PATH.
candidate = (
proto_gen_dir / ".." / ".venv" / "bin" / "protoc-gen-connect-python"
).resolve()
if candidate.exists():
connect_plugin_path = str(candidate)
else:
result = subprocess.run(
["which", "protoc-gen-connect-python"],
capture_output=True,
text=True,
check=True,
)
connect_plugin_path = result.stdout.strip()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The logic for resolving the protoc-gen-connect-python plugin path is not cross-platform. It hardcodes the bin directory (which is Scripts on Windows) and uses the Unix-specific which command as a fallback. Using shutil.which() would be more portable and idiomatic for searching the PATH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant