Skip to content

[test]: preserve imported data and mapping - #8342

Merged
CarolineDenis merged 4 commits into
mainfrom
issue-8338
Jul 28, 2026
Merged

[test]: preserve imported data and mapping#8342
CarolineDenis merged 4 commits into
mainfrom
issue-8338

Conversation

@rijulpoudel

@rijulpoudel rijulpoudel commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Fixes #8338

Summary by CodeRabbit

  • Tests
    • Added coverage to verify that imported dataset data, column mappings, row values, and upload plans remain unchanged when a dataset is retrieved after updates.

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

Warning

One or more dependencies are approaching or past End-of-Life.
Please plan upgrades accordingly.

STATUS=WARNING
NODE_VERSION=20
NODE_CYCLE=20
EOL_DATE=2026-04-30
DAYS_REMAINING=-89

--- Node.js ---
Version: 20
EOL: 2026-04-30
Status: WARNING

STATUS=OK
PYTHON_VERSION=3.12
PYTHON_CYCLE=3.12
EOL_DATE=2028-10-31
DAYS_REMAINING=826

--- Python ---
Version: 3.12
EOL: 2028-10-31
Status: OK

STATUS=WARNING
DJANGO_VERSION=4.2
DJANGO_CYCLE=4.2
EOL_DATE=2026-04-07
DAYS_REMAINING=-112

--- Django ---
Version: 4.2
EOL: 2026-04-07
Status: WARNING


@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@maxpatiiuk, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 55 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a0c9e76f-b70d-4920-bf91-11d03932cb22

📥 Commits

Reviewing files that changed from the base of the PR and between ad91a09 and 0aeae1f.

📒 Files selected for processing (4)
  • specifyweb/frontend/js_src/lib/components/Errors/ErrorDialog.tsx
  • specifyweb/frontend/js_src/lib/components/SetupTool/setupResources.ts
  • specifyweb/frontend/js_src/lib/components/WbUtils/datasetVariants.tsx
  • specifyweb/frontend/js_src/lib/localization/utils/validateWeblate.ts
📝 Walkthrough

Walkthrough

Adds a Django test that creates a WorkBench dataset with imported data, applies an upload plan, retrieves the dataset, and verifies the columns, rows, and mapping are preserved.

Changes

Imported dataset preservation

Layer / File(s) Summary
Dataset preservation validation
specifyweb/backend/workbench/tests.py
Adds coverage for creating imported dataset data, updating its uploadplan, retrieving it, and validating preserved columns, rows with a trailing empty value, and mapping.
🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Testing Instructions ⚠️ Warning The PR template’s Testing instructions section is left blank; only the issue reference is provided, so verification steps aren’t clear. Add concise steps to verify the WorkBench dataset change, e.g. run the relevant dataset API test or describe the manual GET/PUT reopen flow.
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the PR’s main change: adding a test to preserve imported data and mapping.
Linked Issues check ✅ Passed The added test directly verifies that imported data and its mapping are preserved in a WorkBench dataset, matching #8338.
Out of Scope Changes check ✅ Passed The change appears scoped to the requested test coverage and does not introduce unrelated modifications.
Automatic Tests ✅ Passed PASS: The PR adds an automated regression test, test_preserve_imported_data_and_mapping, in specifyweb/backend/workbench/tests.py.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-8338

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@specifyweb/backend/workbench/tests.py`:
- Around line 168-172: Update the row assertion in the affected test to compare
dataset["rows"] directly with rows rather than slicing each row to len(columns).
Keep the existing column assertion and ensure the test enforces complete row
payload and row/column alignment.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0b066057-831c-46bf-bf03-0017c08cfb7d

📥 Commits

Reviewing files that changed from the base of the PR and between 7c0e603 and fdc6ff2.

📒 Files selected for processing (1)
  • specifyweb/backend/workbench/tests.py

Comment thread specifyweb/backend/workbench/tests.py
@github-project-automation github-project-automation Bot moved this from 📋Back Log to Dev Attention Needed in General Tester Board Jul 22, 2026
@rijulpoudel

Copy link
Copy Markdown
Collaborator Author

@CodeRabbit Full review

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@specify specify deleted a comment from coderabbitai Bot Jul 22, 2026
@CarolineDenis
CarolineDenis merged commit d060172 into main Jul 28, 2026
20 checks passed
@CarolineDenis
CarolineDenis deleted the issue-8338 branch July 28, 2026 08:38
@github-project-automation github-project-automation Bot moved this from Dev Attention Needed to ✅Done in General Tester Board Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅Done

Development

Successfully merging this pull request may close these issues.

[test]: Preserve imported data and mapping in a WorkBench dataset

2 participants