Skip to content
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

F/add user queries #963

Merged
merged 14 commits into from
Dec 16, 2024
Merged

F/add user queries #963

merged 14 commits into from
Dec 16, 2024

Conversation

Vedantsahai18
Copy link
Member

@Vedantsahai18 Vedantsahai18 commented Dec 15, 2024

Important

Adds SQL query functions for user and agent management, updates Agent model, and modifies dependencies and migrations.

  • Behavior:
    • Adds SQL query functions for user management in queries/users/ (create, update, delete, list, get, patch).
    • Adds SQL query functions for agent management in queries/agent/ (create, update, delete, list, get, patch).
    • Updates Agent model to include canonical_name field and modifies name field constraints in Agents.py.
  • Models:
    • Adds canonical_name to Agent model in models.tsp and openapi-1.0.0.yaml.
    • Changes name field type to displayName in models.tsp.
  • Dependencies:
    • Adds psycopg, asyncpg, and sqlglot to pyproject.toml and uv.lock.
  • Migrations:
    • Updates 000007_ann.up.sql to drop existing vectorizer functions and triggers.
  • Misc:
    • Renames models/developer to queries/developer and updates get_developer to use async queries.
    • Adds pg.py client for PostgreSQL connections.
    • Adds tests for user SQL queries in test_user_sql.py.

This description was created by Ellipsis for afc51ab. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Reviewed everything up to f4e6b48 in 1 minute and 32 seconds

More details
  • Looked at 2120 lines of code in 25 files
  • Skipped 1 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. agents-api/agents_api/autogen/Agents.py:30
  • Draft comment:
    The pattern for canonical_name should allow underscores anywhere, not just after the first character. Consider updating the regex pattern to ^[a-zA-Z_][a-zA-Z0-9_]*$.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The current regex pattern ^[a-zA-Z][a-zA-Z0-9_]*$ does not allow underscores as the first character, which aligns with typical naming conventions where identifiers start with a letter. The suggested change would allow underscores as the first character, which might not be desirable. The comment seems to suggest a change that might not be necessary or correct based on common naming conventions.
    I might be missing the context of why underscores should be allowed as the first character. The comment might be suggesting a valid use case that is not immediately obvious.
    The current pattern aligns with common naming conventions, and without strong evidence or context suggesting the need for underscores as the first character, the comment seems speculative.
    The comment suggests a change that might not be necessary or correct based on common naming conventions. It should be deleted.
2. integrations-service/integrations/autogen/Agents.py:30
  • Draft comment:
    The pattern for canonical_name should allow underscores anywhere, not just after the first character. Consider updating the regex pattern to ^[a-zA-Z_][a-zA-Z0-9_]*$. This issue is also present in other files where canonical_name is defined.
  • Reason this comment was not posted:
    Marked as duplicate.
3. agents-api/agents_api/queries/users/create_or_update_user.py:15
  • Draft comment:
    Using a single query for both create and update operations can lead to performance issues if the table is large. Consider separating the logic for create and update operations to optimize performance.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_LHpLzTUuapombvnf


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Incremental review on afc51ab in 1 minute and 0 seconds

More details
  • Looked at 941 lines of code in 10 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. agents-api/agents_api/queries/users/create_user.py:34
  • Draft comment:
    detail="The specified developer does not exist.",
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_QkJHyw1K5m9sak6T


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@Ahmad-mtos Ahmad-mtos merged commit eb11dd0 into f/switch-to-pg Dec 16, 2024
7 of 10 checks passed
@Ahmad-mtos Ahmad-mtos deleted the f/add-user-queries branch December 16, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants