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

try to fix bitwarden issue #1448

Merged
merged 1 commit into from
Dec 30, 2024
Merged

try to fix bitwarden issue #1448

merged 1 commit into from
Dec 30, 2024

Conversation

LawyZheng
Copy link
Collaborator

@LawyZheng LawyZheng commented Dec 30, 2024

Important

Refactor Bitwarden service to support customizable timeouts and improve retry logic in get_secret_value_from_url.

  • Behavior:
    • run_command in BitwardenService now accepts a timeout parameter, allowing customizable command execution time.
    • Refactor get_secret_value_from_url in BitwardenService to use a loop for retries, dynamically adjusting the timeout for each attempt.
    • Remove remaining_retries parameter from get_secret_value_from_url and replace with max_retries.
  • Logging:
    • Update error logging in run_command to reflect dynamic timeout values.
    • Log retry attempts in get_secret_value_from_url with the number of tries and exception info.

This description was created by Ellipsis for 8072f1d. 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 8072f1d in 39 seconds

More details
  • Looked at 118 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. skyvern/forge/sdk/services/bitwarden.py:117
  • Draft comment:
    The logic for doubling the timeout is incorrect. It multiplies the timeout by the iteration index, which will lead to incorrect timeout values. Consider using an exponential backoff strategy instead.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment is correct that the current implementation uses linear backoff rather than exponential backoff. However, the code already has a FIXME comment acknowledging this is a simple approach that could be improved. The comment doesn't provide any new information beyond what's already acknowledged in the code. Additionally, the current simple approach may be intentional as a first pass.
    The comment correctly identifies a potential improvement area. An exponential backoff would indeed be a more standard approach for retries.
    While the suggestion is technically valid, the code already acknowledges this with a FIXME comment. The comment doesn't add new value beyond what's already documented in the code.
    Delete the comment since it's redundant with the existing FIXME comment in the code that already acknowledges the simple timeout approach.
2. skyvern/forge/sdk/services/bitwarden.py:128
  • Draft comment:
    The timeout parameter is passed to _get_secret_value_from_url, but it is not used in the method. Consider removing it to avoid confusion.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
3. skyvern/forge/sdk/services/bitwarden.py:183
  • Draft comment:
    The timeout parameter is passed to run_command, but it is not used in the method. Consider removing it to avoid confusion.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.

Workflow ID: wflow_6543oS5EpsYshrcI


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@LawyZheng LawyZheng merged commit 15ecec6 into main Dec 30, 2024
2 checks passed
@LawyZheng LawyZheng deleted the lawy/try-to-fix-bitwarden branch December 30, 2024 09:03
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