[Fix] changes of Jira variable according to new migrated jira#1257
[Fix] changes of Jira variable according to new migrated jira#1257dbasunag merged 4 commits intoopendatahub-io:mainfrom
Conversation
Signed-off-by: Milind waykole <mwaykole@redhat.com>
📝 WalkthroughWalkthroughAuthentication mechanism for Jira connection changed from token-based to username/password-based. A pytest hook migrates Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment Tip You can get early access to new features in CodeRabbit.Enable the |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
docs/GETTING_STARTED.md (1)
141-142: Consider documenting the token-to-password migration.Users set
PYTEST_JIRA_TOKENper this doc, bututilities/jira.pyreadsPYTEST_JIRA_PASSWORD. The runtime migration inconftest.pybridges this, but that indirection isn't explained here. A brief note would prevent confusion when debugging authentication issues.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/GETTING_STARTED.md` around lines 141 - 142, Update the GETTING_STARTED.md Jira section to note the token->password env var migration: explain that while the doc instructs setting PYTEST_JIRA_TOKEN, the runtime code in conftest.py will copy that value into PYTEST_JIRA_PASSWORD for backward compatibility and utilities/jira.py reads PYTEST_JIRA_PASSWORD; explicitly mention both variable names and that conftest.py performs the migration so users know why either name may appear and how to troubleshoot authentication issues.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@utilities/jira.py`:
- Around line 25-28: The JIRA client creation uses os.getenv() which can return
None and lead to unclear failures; update the code that returns JIRA(...) (the
JIRA constructor call) to explicitly validate required environment variables
PYTEST_JIRA_URL, PYTEST_JIRA_USERNAME, and PYTEST_JIRA_PASSWORD before
constructing the client, and if any are missing raise a clear exception (e.g.,
ValueError) or log an explicit error mentioning which variables are absent so
callers fail fast with a helpful message rather than passing None into JIRA.
---
Nitpick comments:
In `@docs/GETTING_STARTED.md`:
- Around line 141-142: Update the GETTING_STARTED.md Jira section to note the
token->password env var migration: explain that while the doc instructs setting
PYTEST_JIRA_TOKEN, the runtime code in conftest.py will copy that value into
PYTEST_JIRA_PASSWORD for backward compatibility and utilities/jira.py reads
PYTEST_JIRA_PASSWORD; explicitly mention both variable names and that
conftest.py performs the migration so users know why either name may appear and
how to troubleshoot authentication issues.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 5202c436-749b-4cb7-a154-a7b9be817b05
📒 Files selected for processing (3)
conftest.pydocs/GETTING_STARTED.mdutilities/jira.py
|
The following are automatically added/executed:
Available user actions:
Supported labels{'/cherry-pick', '/wip', '/build-push-pr-image', '/hold', '/verified', '/lgtm'} |
|
/build-and-push-image |
|
/build-and-push-image pr1255 |
|
/build-push-pr-image |
|
Status of building tag pr-1257: success. |
|
I will push my changes against this branch soon. Adding a hold label to indicate that I am working on it. |
Signed-off-by: Debarati Basu-Nag <dbasunag@redhat.com>
|
Status of building tag latest: success. |
Pull Request
Summary
Related Issues
How it has been tested
Additional Requirements
Summary by CodeRabbit
Documentation
Chores