-
Notifications
You must be signed in to change notification settings - Fork 927
Rename custom_api_used column #1429
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: dev
Are you sure you want to change the base?
Rename custom_api_used column #1429
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
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.
Important
Looks good to me! 👍
Reviewed everything up to f57eda4 in 1 minute and 15 seconds. Click for details.
- Reviewed
61
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
4
draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. agents-api/agents_api/queries/usage/create_usage_record.py:98
- Draft comment:
Updated SQL column name from 'custom_api_used' to 'custom_key_used' for insertion. Verify that external consumers using the alias are aware of the change. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
The comment is asking the PR author to verify that external consumers are aware of a change, which violates the rule against asking the author to ensure behavior is intended or to double-check things. The comment does not provide a specific code suggestion or ask for a specific test to be written.
2. agents-api/agents_api/queries/usage/create_usage_record.py:121
- Draft comment:
RETURNING clause now aliases 'custom_key_used' as 'custom_api_used' to preserve external API compatibility. Confirm this aliasing is intentional. - Reason this comment was not posted:
Comment looked like it was already resolved.
3. memory-store/migrations/000036_usage.up.sql:11
- Draft comment:
Column renamed to 'custom_key_used'. Ensure that existing deployments handle this schema change correctly (possibly needing an ALTER if table exists). - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
The comment is asking the PR author to ensure that existing deployments handle the schema change correctly. This falls under the rule of not asking the author to ensure behavior is intended or tested. Therefore, this comment should be removed.
4. memory-store/migrations/000038_usage_cost_monthly.up.sql:7
- Draft comment:
Updated filter condition to use 'custom_key_used'. This ensures the continuous aggregate view reflects the renamed column. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%
<= threshold50%
This comment is purely informative, explaining what was done and why. It doesn't provide a suggestion, ask for confirmation, or point out a potential issue.
Workflow ID: wflow_t00gdVswoTjUuLgs
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
User description
Summary
custom_api_used
column tocustom_key_used
Testing
poe check
(fails: command not found)PR Type
Enhancement
Description
Rename
custom_api_used
column tocustom_key_used
throughout codebaseUpdate SQL queries and migrations to use new column name
Adjust returned fields to maintain backward compatibility in API
Changes walkthrough 📝
create_usage_record.py
Rename and alias `custom_api_used` column in usage record creation
agents-api/agents_api/queries/usage/create_usage_record.py
custom_api_used
tocustom_key_used
in SQL insert statementcustom_key_used
ascustom_api_used
forcompatibility
000036_usage.up.sql
Update usage table schema to use `custom_key_used`
memory-store/migrations/000036_usage.up.sql
custom_key_used
instead ofcustom_api_used
000038_usage_cost_monthly.up.sql
Update monthly cost view to use `custom_key_used`
memory-store/migrations/000038_usage_cost_monthly.up.sql
custom_key_used
columnImportant
Rename
custom_api_used
column tocustom_key_used
and update related SQL queries and migrations.custom_api_used
column tocustom_key_used
in000036_usage.up.sql
.000038_usage_cost_monthly.up.sql
to usecustom_key_used
in the monthly cost calculation.create_usage_record.py
to usecustom_key_used
in theusage_query
and alias it ascustom_api_used
for backward compatibility.This description was created by
for f57eda4. You can customize this summary. It will automatically update as commits are pushed.