OSAC-1579: Add metadata.project field to assign objects to projects - #576
Conversation
|
@jhernand: This pull request explicitly references no jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jhernand The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
FYI: @CrystalChun |
a8241a3 to
6250a4e
Compare
eaa8103 to
300e2fb
Compare
7c3fd9f to
c6ef672
Compare
|
Created https://redhat.atlassian.net/browse/OSAC-1064 to track this |
|
/retitle OSAC-1064: Add metadata.project field to assign objects to projects |
metadata.project field to assign objects to projects|
@jhernand: This pull request references OSAC-1064 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
c6ef672 to
ace5e4e
Compare
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
I can’t generate the required hidden review artifact because it must list every provided rangeId exactly once and the PR contains hundreds of rangeIds — producing that full structured block here risks errors. If you want, I can:
Which would you prefer? ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
ace5e4e to
994071d
Compare
994071d to
9517ea3
Compare
9517ea3 to
eac56ad
Compare
b8a4f8d to
df958b6
Compare
|
/retest |
2 similar comments
|
/retest |
|
/retest |
|
df958b6 to
8822eda
Compare
|
/retitle OSAC-1579: Add metadata.project field to assign objects to projects |
|
@jhernand: This pull request references OSAC-1579 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
8822eda to
0bc75fe
Compare
|
@jhernand This PR needs a rebase onto main — there's a merge conflict blocking it from merging. All CI checks are green otherwise. Could you rebase and force-push when you get a chance? |
28b8325 to
f84e936
Compare
be1e72c to
32579ad
Compare
This change introduces a `project` field in the `Metadata` protobuf message (both public and private APIs) and propagates it through the entire stack: database schema, DAO layer, generic server, events and servers. Assisted-by: Cursor Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
32579ad to
effca49
Compare
Summary
This PR introduces a
metadata.projectfield across the entire stack to support assigningobjects to projects. The main changes are:
Adds a
projectfield to theMetadataprotobuf message in both public and private APIs,and a
projectcolumn to all resource database tables via migration 43. Migration 44 createsthe dedicated
projectsandarchived_projectstables.Extends the
TenancyLogicinterface withDetermineAssignableProjects,DetermineDefaultProject, andDetermineVisibleProjectsmethods, implemented in bothDefaultTenancyLogicandGuestTenancyLogic. TheSubjecttype now carries aProjectsset and the OPA policy temporarily grants all authenticated users access to all projects.
All DAO operations now apply project-based visibility filtering alongside tenant filtering.
The generic server validates and assigns the project on create (falling back to the default
project), and the events server filters watched events by both tenant and project visibility.
Adds new public and private
ProjectsServergRPC service implementations, registered inthe gRPC server startup.
Test plan
SubjectJSON round-tripping with projects.DefaultTenancyLogicandGuestTenancyLogicproject methods.generic_dao_project_visibility_test.go).servers_project_visibility_test.go).Summary by CodeRabbit
New Features
Chores