Fix: Support numeric Bill IDs and switch deploy target to Oracle#47
Fix: Support numeric Bill IDs and switch deploy target to Oracle#47
Conversation
Summary of ChangesHello @StatPan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly implements support for numeric Bill IDs by updating get_bill_info to differentiate between BILL_ID and BILL_NO. The get_bill_details function is also simplified as a result. The changes are logical and improve the service's functionality. I've added one comment to make the new ID handling logic in get_bill_info more robust by accounting for potential whitespace in the bill_id input.
| if bill_id: | ||
| # Check if bill_id is numeric (likely a BILL_NO) | ||
| if bill_id.isdigit(): | ||
| params["BILL_NO"] = bill_id | ||
| else: | ||
| params["BILL_ID"] = bill_id |
There was a problem hiding this comment.
The current logic for determining if a bill_id is numeric doesn't account for leading/trailing whitespace. A bill_id like ' 12345 ' would fail the isdigit() check and be incorrectly treated as an alphanumeric BILL_ID. It's better to strip whitespace from bill_id before checking if it's numeric to handle such cases correctly. The logic can also be made more concise.
| if bill_id: | |
| # Check if bill_id is numeric (likely a BILL_NO) | |
| if bill_id.isdigit(): | |
| params["BILL_NO"] = bill_id | |
| else: | |
| params["BILL_ID"] = bill_id | |
| if bill_id: | |
| stripped_id = bill_id.strip() | |
| if stripped_id: | |
| # Check if bill_id is numeric (likely a BILL_NO) | |
| key = "BILL_NO" if stripped_id.isdigit() else "BILL_ID" | |
| params[key] = stripped_id |
Changes
BillService:BILL_NO).get_bill_detailsattempts to search viaget_bill_infofirst for all IDs, ensuring metadata (Bill Name, Proposer, etc.) is retrieved even for numeric IDs like '2208712'.deploy.ymlto use event typedeploy-assemblymcp-oracle, targeting the Oracle infrastructure instead of Cloud Run.Issue