-
Notifications
You must be signed in to change notification settings - Fork 0
EXUI-3601: Call Idam api to get issue override value #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: base-sha/6ead1c32c488fc29e0817d010847345ee20a3c2b
Are you sure you want to change the base?
Conversation
This is a benchmark review for experiment This pull request was cloned from Experiment configurationreview_config:
# User configuration for the review
# - benchmark - use the user config from the benchmark reviews
# - <value> - use the value directly
user_review_config:
enable_ai_review: true
enable_rule_comments: false
enable_complexity_comments: benchmark
enable_security_comments: benchmark
enable_tests_comments: benchmark
enable_comment_suggestions: benchmark
enable_pull_request_summary: benchmark
enable_review_guide: benchmark
enable_approvals: false
base_branches: [base-sha.*]
ai_review_config:
# The model responses to use for the experiment
# - benchmark - use the model responses from the benchmark reviews
# - llm - call the language model to generate responses
model_responses:
comments_model: benchmark
comment_validation_model: benchmark
comment_suggestion_model: benchmark
complexity_model: benchmark
security_model: benchmark
tests_model: benchmark
pull_request_summary_model: benchmark
review_guide_model: benchmark
overall_comments_model: benchmark
# The pull request dataset to run the experiment on
pull_request_dataset:
# CodeRabbit
- https://github.com/neerajkumar161/node-coveralls-integration/pull/5
- https://github.com/gunner95/vertx-rest/pull/1
- https://github.com/Altinn/altinn-access-management-frontend/pull/1427
- https://github.com/theMr17/github-notifier/pull/14
- https://github.com/bearycool11/AI_memory_Loops/pull/142
# Greptile
- https://github.com/gumloop/guMCP/pull/119
- https://github.com/autoblocksai/python-sdk/pull/335
- https://github.com/grepdemos/ImageSharp/pull/6
- https://github.com/grepdemos/server/pull/61
- https://github.com/websentry-ai/pipelines/pull/25
# Graphite
- https://github.com/KittyCAD/modeling-app/pull/6648
- https://github.com/KittyCAD/modeling-app/pull/6628
- https://github.com/Varedis-Org/AI-Test-Repo/pull/2
- https://github.com/deeep-network/bedrock/pull/198
- https://github.com/Metta-AI/metta/pull/277
# Copilot
- https://github.com/hmcts/rpx-xui-webapp/pull/4438
- https://github.com/ganchdev/quez/pull/104
- https://github.com/xbcsmith/ymlfxr/pull/13
- https://github.com/tinapayy/B-1N1T/pull/36
- https://github.com/coder/devcontainer-features/pull/6
# Questions to ask to label the review comments
review_comment_labels: []
# - label: correct
# question: Is this comment correct?
# Benchmark reviews generated by running
# python -m scripts.experiment benchmark <experiment_name>
benchmark_reviews: []
|
Reviewer's GuideThe pull request updates the authentication middleware to dynamically fetch the File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Hellebore - I've reviewed your changes - here's some feedback:
- Fetching the
issuerOverride
from the API during startup might delay application readiness; consider the impact of potential IDAM API latency. - Ensure that failures to fetch the
issuerOverride
during startup are adequately monitored, as the current fallback might mask underlying issues.
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
xuiNode.on(AUTH.EVENT.AUTHENTICATE_FAILURE, failureCallback); | ||
|
||
export const getXuiNodeMiddleware = () => { | ||
export const getXuiNodeMiddleware = async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question (bug_risk): Async change in getXuiNodeMiddleware requires careful consideration.
Double-check that every consumer awaits getXuiNodeMiddleware’s promise. You’ve updated api/application.ts, but review other usages to ensure none remain unhandled.
options.serviceOverride = await getClientServiceDetails(); | ||
const type = showFeature(FEATURE_OIDC_ENABLED) ? 'oidc' : 'oauth2'; | ||
nodeLibOptions.auth[type] = options; | ||
logger._logger.info('Setting XuiNodeLib options'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Potential inconsistency using logger._logger.info.
Using logger._logger bypasses the logging abstraction and any middleware hooks. Use logger.info instead unless you specifically need direct access to _logger.
Jira link
https://tools.hmcts.net/jira/browse/EXUI-3061
Change description
Get isserOverride value from Idam api
Checklist
Summary by Sourcery
Modify authentication middleware to dynamically retrieve issuer override value from IDAM API
New Features:
Enhancements:
Chores: