Skip to content

docs: clarify pytestmark phase and soften import style rule#4616

Open
EdDev wants to merge 2 commits intoRedHatQE:mainfrom
EdDev:docs/std-pytestmark-clarification
Open

docs: clarify pytestmark phase and soften import style rule#4616
EdDev wants to merge 2 commits intoRedHatQE:mainfrom
EdDev:docs/std-pytestmark-clarification

Conversation

@EdDev
Copy link
Copy Markdown
Contributor

@EdDev EdDev commented Apr 28, 2026

What this PR does / why we need it:

Two documentation clarifications surfaced during PR review:

  1. pytestmark is a Phase 2 addition — during STD placeholders (Phase 1), markers live in the Markers: docstring section. During implementation (Phase 2), they are converted to pytestmark expressions or @pytest.mark decorators. This was undocumented, causing reviewers to flag the absence of pytestmark in STDs or its presence in implementation PRs as incorrect.

  2. Import style rule was too strict — the previous rule ("ALWAYS import specific functions, NEVER import module") conflicted with cases where retaining the module name at the call site genuinely improves readability (e.g. libstuntime.ContinuousPing makes the origin clear; a bare ContinuousPing does not). The rule is softened to a context-sensitive guideline.

Which issue(s) this PR fixes:
Special notes for reviewer:
jira-ticket:

EdDev added 2 commits April 28, 2026 11:00
During Phase 1 (STD), markers are listed in the Markers: docstring
section. During Phase 2 (implementation), they are converted to
pytestmark expressions or @pytest.mark decorators. This was not
documented, causing confusion when reviewing implementation PRs that
add pytestmark where the STD placeholder had none.

Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Edward Haas <edwardh@redhat.com>
The previous blanket rule ("ALWAYS import specific functions, NEVER
import module") conflicted with cases where retaining the module name
at the call site genuinely improves readability (e.g.
libstuntime.ContinuousPing makes the origin clear, whereas a bare
ContinuousPing does not). Soften to a context-sensitive guideline:
prefer specific imports for functions and constants, allow module
imports when namespace context adds clarity.

Assisted-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Edward Haas <edwardh@redhat.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 28, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (2)
  • AGENTS.md is excluded by !**/*.md
  • docs/SOFTWARE_TEST_DESCRIPTION.md is excluded by !**/*.md

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2c4abe85-7dde-4945-84f5-cf0fe8092c47

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ 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.

@openshift-virtualization-qe-bot-2
Copy link
Copy Markdown
Contributor

Report bugs in Issues

Welcome! 🎉

This pull request will be automatically processed with the following features:

🔄 Automatic Actions

  • Reviewer Assignment: Reviewers are automatically assigned based on the OWNERS file in the repository root
  • Size Labeling: PR size labels (XS, S, M, L, XL, XXL) are automatically applied based on changes
  • Issue Creation: A tracking issue is created for this PR and will be closed when the PR is merged or closed
  • Branch Labeling: Branch-specific labels are applied to track the target branch
  • Auto-verification: Auto-verified users have their PRs automatically marked as verified
  • Labels: Enabled categories: branch, can-be-merged, cherry-pick, has-conflicts, hold, needs-rebase, size, verified, wip

📋 Available Commands

PR Status Management

  • /wip - Mark PR as work in progress (adds WIP: prefix to title)
  • /wip cancel - Remove work in progress status
  • /hold - Block PR merging (approvers only)
  • /hold cancel - Unblock PR merging
  • /verified - Mark PR as verified
  • /verified cancel - Remove verification status
  • /reprocess - Trigger complete PR workflow reprocessing (useful if webhook failed or configuration changed)
  • /regenerate-welcome - Regenerate this welcome message

Review & Approval

  • /lgtm - Approve changes (looks good to me)
  • /approve - Approve PR (approvers only)
  • /assign-reviewers - Assign reviewers based on OWNERS file
  • /assign-reviewer @username - Assign specific reviewer
  • /check-can-merge - Check if PR meets merge requirements

Testing & Validation

  • /retest tox - Run Python test suite with tox
  • /retest build-container - Rebuild and test container image
  • /retest verify-bugs-are-open - verify-bugs-are-open
  • /retest all - Run all available tests

Container Operations

  • /build-and-push-container - Build and push container image (tagged with PR number)
    • Supports additional build arguments: /build-and-push-container --build-arg KEY=value

Cherry-pick Operations

  • /cherry-pick <branch> - Schedule cherry-pick to target branch when PR is merged
    • Multiple branches: /cherry-pick branch1 branch2 branch3

Label Management

  • /<label-name> - Add a label to the PR
  • /<label-name> cancel - Remove a label from the PR

✅ Merge Requirements

This PR will be automatically approved when the following conditions are met:

  1. Approval: /approve from at least one approver
  2. LGTM Count: Minimum 2 /lgtm from reviewers
  3. Status Checks: All required status checks must pass
  4. No Blockers: No wip, hold, has-conflicts labels and PR must be mergeable (no conflicts)
  5. Verified: PR must be marked as verified

📊 Review Process

Approvers and Reviewers

Approvers:

  • dshchedr
  • myakove
  • rnetser
  • vsibirsk

Reviewers:

  • RoniKishner
  • dshchedr
  • rnetser
  • vsibirsk
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve
AI Features
  • Cherry-Pick Conflict Resolution: Enabled (claude/claude-opus-4-6[1m])

💡 Tips

  • WIP Status: Use /wip when your PR is not ready for review
  • Verification: The verified label is removed on new commits unless the push is detected as a clean rebase
  • Cherry-picking: Cherry-pick labels are processed when the PR is merged
  • Container Builds: Container images are automatically tagged with the PR number
  • Permission Levels: Some commands require approver permissions
  • Auto-verified Users: Certain users have automatic verification and merge privileges

For more information, please refer to the project documentation or contact the maintainers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants