[AAP-88670] XLAB Bring organization ownership data #411
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 554 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.378
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #411"
general
weight: 0.35
kcagran
[AAP-88670] Bring organization ownership data
Description
<!-- Mandatory: Provide a clear, concise description of the changes and their purpose -->
- Modified
GET users/meto include data about the current user's organizations - a list of organizations he's a member of- note that the data is being fetched directly from the Gateway API upon the endpoint call.
- We need this data for the gamification leaderboard data where we say "Your" organization. We need to be able to tell whether the selected organization is in fact the user's organization or not.
- See above
Type of Change
<!-- Mandatory: Check one or more boxes that apply -->
Self-Review Checklist
<!-- These items help ensure quality - they complement our automated CI checks -->
Testing Instructions
<!-- Optional for test-only changes. Mandatory for all other changes -->
<!-- Must be detailed enough for reviewers to reproduce -->
Prerequisites
<!-- List any specific setup required -->
Follow README.md to set up local environment. Make sure
metrics_serviceis running on host0.0.0.0and port8000.1. Run a local instance (or docker compose) for AWX and Metrics Service databases with all recent migrations
2. Update your environment variables to match your local setup - https://github.com/ansible/metrics-service#quick-start-1
3. A working local AAP-DEV environment
4. AAP-DEV connected to a local metrics-service instance
5. Configured sync AAP-DEV with metrics-service
Steps to Test
1. Prepare testing data (using the AAP-DEV UI instance) - users are written as "username -> assigned organizations"
- four organizations:
a,b,c,d- three testing "Normal" users created:
t1 -> a, b, c, d,t2 -> a, c,t3 -> d- one testing "Admin" user:
ta(administrator doesn't get assigned a specific organization)- one testing "Auditor" user:
tau -> b, c- Password for all users can be
test2. Manually run sync (so that your local metrics_service DB gets updated with the new data we set through UI)
3. Curl: /me/ on each user
Expected Results
Note: This is an output for just user
t1, but it should be similar for all other users. Feel free to try out.Curl output:
As you can see, we get added a list of organizations of which the user is a member of (
member_of_organizations)