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

fix get latest step #1412

Merged
merged 1 commit into from
Dec 18, 2024
Merged

fix get latest step #1412

merged 1 commit into from
Dec 18, 2024

Conversation

LawyZheng
Copy link
Collaborator

@LawyZheng LawyZheng commented Dec 18, 2024

Important

Fix get_latest_step in client.py to correctly order by retry_index after order to retrieve the latest step.

  • Behavior:
    • Fix get_latest_step in client.py to order by StepModel.retry_index.desc() after StepModel.order.desc() to correctly retrieve the latest step considering retries.

This description was created by Ellipsis for 1f85d47. 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 1f85d47 in 11 seconds

More details
  • Looked at 12 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/forge/sdk/db/client.py:382
  • Draft comment:
    The addition of order_by(StepModel.retry_index.desc()) is consistent with the existing pattern in the codebase and ensures that the latest step is correctly identified when there are multiple retries for the same order. This change is necessary and correct.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The change in the PR adds an additional order_by clause to the get_latest_step method. This is consistent with the existing pattern in the codebase where both order and retry_index are used for ordering steps. This change is necessary to ensure that the latest step is correctly identified when there are multiple retries for the same order.

Workflow ID: wflow_lzW6Xi3sHF1tbRAW


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

@LawyZheng LawyZheng merged commit a6fec7b into main Dec 18, 2024
1 of 2 checks passed
@LawyZheng LawyZheng deleted the lawy/fix-get-last-step branch December 18, 2024 05:35
init-object pushed a commit to init-object/skyvern that referenced this pull request Dec 20, 2024
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