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

enforce collection id for login parameters #1043

Merged
merged 3 commits into from
Oct 24, 2024

Conversation

wintonzheng
Copy link
Contributor

@wintonzheng wintonzheng commented Oct 24, 2024

Important

Enforces bitwarden_collection_id requirement for BITWARDEN_LOGIN_CREDENTIAL parameters, raising an exception if missing.

  • Behavior:
    • Enforces bitwarden_collection_id requirement for BITWARDEN_LOGIN_CREDENTIAL parameters in create_workflow_from_request() in service.py.
    • Raises WorkflowParameterMissingRequiredValue if bitwarden_collection_id is missing.
  • Exceptions:
    • Adds WorkflowParameterMissingRequiredValue to exceptions.py for missing required workflow parameter values.
  • Error Handling:
    • Catches WorkflowParameterMissingRequiredValue in create_workflow() and update_workflow() in agent_protocol.py.

This description was created by Ellipsis for e9b9cdb. 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.

👍 Looks good to me! Reviewed everything up to 1a1ba58 in 15 seconds

More details
  • Looked at 42 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/forge/sdk/workflow/service.py:961
  • Draft comment:
    Ensure bitwarden_collection_id is checked for all relevant parameter types, not just BITWARDEN_LOGIN_CREDENTIAL. This includes BITWARDEN_SENSITIVE_INFORMATION and BITWARDEN_CREDIT_CARD_DATA in create_workflow_from_request.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_e6wM7d2gi9ZdAzmY


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 fc5e561 in 25 seconds

More details
  • Looked at 26 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_YmI5q2l73uo9ZSNy


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.

@@ -707,6 +711,8 @@ async def create_workflow(
return await app.WORKFLOW_SERVICE.create_workflow_from_request(
organization=current_org, request=workflow_create_request
)
except WorkflowParameterMissingRequiredValue as e:
Copy link
Contributor

Choose a reason for hiding this comment

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

Catching WorkflowParameterMissingRequiredValue and re-raising it is redundant. Consider removing this except block.

Suggested change
except WorkflowParameterMissingRequiredValue as e:

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 e9b9cdb in 27 seconds

More details
  • Looked at 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_4xbKHqNy7qTEbo4G


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.

@@ -753,6 +759,8 @@ async def update_workflow(
request=workflow_create_request,
workflow_permanent_id=workflow_permanent_id,
)
except WorkflowParameterMissingRequiredValue as e:
Copy link
Contributor

Choose a reason for hiding this comment

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

Redundant exception handling for WorkflowParameterMissingRequiredValue. The exception is caught and immediately re-raised without any additional processing. Consider removing this except block.

Suggested change
except WorkflowParameterMissingRequiredValue as e:

@wintonzheng wintonzheng merged commit b308c6b into main Oct 24, 2024
2 checks passed
@wintonzheng wintonzheng deleted the shu/enforce_bitwarden_collection_id branch October 24, 2024 06:20
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.

1 participant