Skip to content

test(drive): retry duplicate-remote push in live E2E#1403

Merged
liangshuo-1 merged 3 commits into
larksuite:mainfrom
yxzhaao:codex/drive-dup-e2e-retry
Jun 12, 2026
Merged

test(drive): retry duplicate-remote push in live E2E#1403
liangshuo-1 merged 3 commits into
larksuite:mainfrom
yxzhaao:codex/drive-dup-e2e-retry

Conversation

@yxzhaao

@yxzhaao yxzhaao commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • retry the duplicate-remote live drive push step up to 3 times
  • keep the retry scoped to this single live E2E subcase
  • keep the final convergence assertions unchanged

Why

This live E2E exercises duplicate remote resolution plus --delete-remote. CI showed an intermittent partial failure after the correct duplicate had already been targeted. We could not stably reproduce a CLI logic bug locally, so this change treats the push step as a flaky live integration boundary and retries the whole step rather than keying off one exact error signature.

Verification

  • go test ./tests/cli_e2e/drive -run '^TestDrive_DuplicateRemoteWorkflow$' -count=1

Summary by CodeRabbit

  • Tests
    • Improved reliability of duplicate-file push tests by adding retry handling to the push step (default retry options), reducing intermittent CI flakiness while preserving assertions and status convergence.
    • Updated a dry-run shortcut test to use environment-only identity hints (removing reliance on a fake access token) and clarified the test comment to avoid network/user-info verification during startup.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Two e2e test tweaks: the duplicate-remote subtest now uses clie2e.RunCmdWithRetry for drive +push (empty RetryOptions), and the IM feed dry-run test switches to env-only identity hints (LARKSUITE_CLI_STRICT_MODE=user, LARKSUITE_CLI_DEFAULT_AS=user) removing the fake token.

Changes

E2E test updates

Layer / File(s) Summary
Retry integration for duplicate-remote push
tests/cli_e2e/drive/drive_duplicate_sync_workflow_test.go
Replaced the drive +push invocation from clie2e.RunCmd to clie2e.RunCmdWithRetry and added a clie2e.RetryOptions argument (passed as the default/empty struct).
IM feed dry-run: env-only identity hints
tests/cli_e2e/im/feed_shortcut_workflow_test.go
Removed LARKSUITE_CLI_USER_ACCESS_TOKEN=fake_user_token and set LARKSUITE_CLI_STRICT_MODE=user and LARKSUITE_CLI_DEFAULT_AS=user for dry-run identity, with an updated header comment about short-circuiting before network calls.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

size/M, domain/ccm

Suggested reviewers

  • wittam-01

Poem

🐰 I nudged the push to try once more,

The test now waits to retry the chore.
For dry-run feeds I don my cloak of env,
No network calls — a quiet little trend.
🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding retry logic to the duplicate-remote push step in a live E2E test.
Description check ✅ Passed The description includes all required sections (Summary, Changes implicit in summary, Why/rationale, and Verification) with clear context about the retry implementation and intent.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the size/S Low-risk docs, CI, test, or chore only changes label Jun 11, 2026
@yxzhaao yxzhaao changed the title test(drive): retry transient duplicate delete failure test(drive): retry duplicate-remote push in live E2E Jun 11, 2026
@yxzhaao
yxzhaao force-pushed the codex/drive-dup-e2e-retry branch 3 times, most recently from d14d15a to 61826c9 Compare June 11, 2026 09:03
@yxzhaao
yxzhaao force-pushed the codex/drive-dup-e2e-retry branch from 61826c9 to a2160dc Compare June 11, 2026 09:05
liangshuo-1
liangshuo-1 previously approved these changes Jun 11, 2026
@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.83%. Comparing base (3f77ede) to head (5647f8a).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1403   +/-   ##
=======================================
  Coverage   72.82%   72.83%           
=======================================
  Files         731      732    +1     
  Lines       69096    69140   +44     
=======================================
+ Hits        50320    50356   +36     
- Misses      14999    15003    +4     
- Partials     3777     3781    +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@5647f8ad91ebc318ae08427417a29351d7a918f4

🧩 Skill update

npx skills add yxzhaao/cli#codex/drive-dup-e2e-retry -y -g

@yxzhaao
yxzhaao requested a review from liangshuo-1 June 12, 2026 03:20
@liangshuo-1
liangshuo-1 merged commit 2a7e9c7 into larksuite:main Jun 12, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Low-risk docs, CI, test, or chore only changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants