Revert "fix(jira): update authentication to use Basic Auth instead of Bearer token"#1241
Revert "fix(jira): update authentication to use Basic Auth instead of Bearer token"#1241
Conversation
|
The following are automatically added/executed:
Available user actions:
Supported labels{'/verified', '/build-push-pr-image', '/wip', '/cherry-pick', '/hold', '/lgtm'} |
📝 WalkthroughWalkthroughSwitched Jira authentication from username/password basic auth to token-based auth. Documentation and utility now require Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 cached JIRA client is being created with potentially
missing env vars (PYTEST_JIRA_TOKEN, PYTEST_JIRA_URL) so an invalid client could
be cached; update the function that returns JIRA (the one that calls JIRA(...)
under the `@cache` decorator) to explicitly read and validate
os.getenv("PYTEST_JIRA_TOKEN") and os.getenv("PYTEST_JIRA_URL") before
constructing the JIRA instance and raise a clear exception if either is
missing/empty, so the error is raised immediately and a bad client is never
stored in the cache.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 0620b3ff-ab87-46e4-a4dd-aaba3cee35b9
📒 Files selected for processing (2)
docs/GETTING_STARTED.mdutilities/jira.py
bf3dd40 to
6620c8e
Compare
6620c8e to
9b521c3
Compare
This reverts commit a8f5a88. Signed-off-by: Debarati Basu-Nag <dbasunag@redhat.com>
Signed-off-by: Debarati Basu-Nag <dbasunag@redhat.com>
9b521c3 to
3278c96
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
docs/GETTING_STARTED.md (1)
141-142: Consider rewording to avoid repetitive sentence starts.Three consecutive sentences begin with "To", reducing readability.
♻️ Proposed rewording
-To skip running tests which have open bugs, [pytest_jira](https://github.com/rhevm-qe-automation/pytest_jira) plugin is used. -To run tests with jira integration, you need to set `PYTEST_JIRA_URL` and `PYTEST_JIRA_TOKEN` environment variables. -To make a test with jira marker, add: `@pytest.mark.jira(jira_id="RHOAIENG-0000", run=False)` to the test. +To skip running tests which have open bugs, [pytest_jira](https://github.com/rhevm-qe-automation/pytest_jira) plugin is used. +Enable jira integration by setting `PYTEST_JIRA_URL` and `PYTEST_JIRA_TOKEN` environment variables. +Mark a test with jira by adding: `@pytest.mark.jira(jira_id="RHOAIENG-0000", run=False)` to the test.🤖 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, Reword the three sentences that all start with "To" by combining and varying phrasing: mention environment variables first (PYTEST_JIRA_URL and PYTEST_JIRA_TOKEN) as required for running tests with Jira integration, then explain how to mark a test using `@pytest.mark.jira`(jira_id="RHOAIENG-0000", run=False) in a separate sentence that uses a different lead (e.g., "Mark a test with..." or "Use the marker...") so the lines referencing PYTEST_JIRA_URL, PYTEST_JIRA_TOKEN and the pytest marker are clearer and no longer repetitively start with "To".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/GETTING_STARTED.md`:
- Line 141: Update the GETTING_STARTED.md test setup line to include
PYTEST_JIRA_USERNAME along with PYTEST_JIRA_URL and PYTEST_JIRA_TOKEN and add a
short security guidance sentence instructing developers to store these
credentials in environment variables or a secrets manager (or a gitignored .env)
and never hardcode them or print them to logs; reference utilities/jira.py and
its basic_auth tuple so readers know why PYTEST_JIRA_USERNAME is required and
emphasize avoiding commit of credentials to version control.
---
Nitpick comments:
In `@docs/GETTING_STARTED.md`:
- Around line 141-142: Reword the three sentences that all start with "To" by
combining and varying phrasing: mention environment variables first
(PYTEST_JIRA_URL and PYTEST_JIRA_TOKEN) as required for running tests with Jira
integration, then explain how to mark a test using
`@pytest.mark.jira`(jira_id="RHOAIENG-0000", run=False) in a separate sentence
that uses a different lead (e.g., "Mark a test with..." or "Use the marker...")
so the lines referencing PYTEST_JIRA_URL, PYTEST_JIRA_TOKEN and the pytest
marker are clearer and no longer repetitively start with "To".
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 3d065a15-339a-49c4-9e79-bce576bf942a
📒 Files selected for processing (2)
docs/GETTING_STARTED.mdutilities/jira.py
🚧 Files skipped from review as they are similar to previous changes (1)
- utilities/jira.py
|
Status of building tag latest: success. |
… Bearer token" (opendatahub-io#1241) * revert: undo jira auth change to Basic Auth This reverts commit a8f5a88. Signed-off-by: Debarati Basu-Nag <dbasunag@redhat.com> * fix: updates needed in jira call Signed-off-by: Debarati Basu-Nag <dbasunag@redhat.com> --------- Signed-off-by: Debarati Basu-Nag <dbasunag@redhat.com> Signed-off-by: Shehan Saleem <ssaleem@redhat.com>
Reverts #1233
Summary by CodeRabbit