Skip to content

Conversation

@jan-janssen
Copy link
Member

@jan-janssen jan-janssen commented Dec 30, 2025

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling when selecting values from returned data: invalid or non-existent selectors now produce clearer error messages to help identify mismatches between requested selectors and actual results. The behavior for empty/null results remains unchanged.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 30, 2025

📝 Walkthrough

Walkthrough

FutureSelector.result now guards access to result[self._selector]: it returns the indexed value only when the selector is an int and result is a tuple/list, or when the selector exists as a key in the result; otherwise it raises a detailed KeyError. None results still return None.

Changes

Cohort / File(s) Summary
FutureSelector change
src/executorlib/standalone/select.py
Replace unconditional indexing with guarded access: allow integer indexing into sequences or keyed lookup into mappings; when lookup fails, raise a KeyError with selector and result-type details; preserve None handling.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 I peeked inside a result with care,
"Are you a list, tuple, or keyed affair?"
If keys are missing, I bark a KeyError drum,
Else out pops the value — hop, here we come! 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Feature: Extend selector error message' clearly and directly describes the main change: improving error messages in the selector functionality.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e2bba51 and 0e937b9.

📒 Files selected for processing (1)
  • src/executorlib/standalone/select.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: unittest_openmpi (macos-latest, 3.13)
  • GitHub Check: benchmark (ubuntu-latest, 3.13, .ci_support/environment-mpich.yml)
  • GitHub Check: unittest_win
  • GitHub Check: benchmark (ubuntu-latest, 3.13, .ci_support/environment-openmpi.yml)
  • GitHub Check: notebooks

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3281a55 and e2bba51.

📒 Files selected for processing (1)
  • src/executorlib/standalone/select.py
🧰 Additional context used
🧬 Code graph analysis (1)
src/executorlib/standalone/select.py (1)
src/executorlib/task_scheduler/file/shared.py (1)
  • result (24-38)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: unittest_slurm_mpich
  • GitHub Check: benchmark (ubuntu-latest, 3.13, .ci_support/environment-mpich.yml)
  • GitHub Check: unittest_win
  • GitHub Check: benchmark (ubuntu-latest, 3.13, .ci_support/environment-openmpi.yml)

@codecov
Copy link

codecov bot commented Dec 30, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.22%. Comparing base (b92cfdb) to head (0e937b9).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/executorlib/standalone/select.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #875      +/-   ##
==========================================
- Coverage   93.27%   93.22%   -0.05%     
==========================================
  Files          38       38              
  Lines        1800     1802       +2     
==========================================
+ Hits         1679     1680       +1     
- Misses        121      122       +1     

☔ View full report in Codecov by Sentry.
📢 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.

@jan-janssen jan-janssen marked this pull request as draft December 30, 2025 10:12
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.

2 participants