Skip to content

Prevent panic when running nil/empty search queries against Postgres#1236

Merged
rhybrillou merged 2 commits intomasterfrom
yann/fix_panic_on_postgres_for_nil_search_queries
Apr 8, 2022
Merged

Prevent panic when running nil/empty search queries against Postgres#1236
rhybrillou merged 2 commits intomasterfrom
yann/fix_panic_on_postgres_for_nil_search_queries

Conversation

@rhybrillou
Copy link
Copy Markdown
Contributor

Description

Postgres integration tests for secret datastore highlighted a panic condition when looking up pagination information on nil queries.
This change prevents the situation leading to the panic.

Checklist

  • Investigated and inspected CI test results
  • Unit test and regression tests added
    - [ ] Evaluated and added CHANGELOG entry if required
    -~~ [ ] Determined and documented upgrade steps~~
    - [ ] Documented user facing changes (create PR based on stackrox/openshift-docs and merge into rhacs-docs)

If any of these don't apply, please comment below.

Testing Performed

Manual testing of the tests from PR #942 against the development of #1235

@ghost
Copy link
Copy Markdown

ghost commented Apr 8, 2022

Tag for build #410368 is 3.69.x-334-g30feb6970c.

💻 For deploying this image using the dev scripts, run the following first:

export MAIN_IMAGE_TAG='3.69.x-334-g30feb6970c'

🕹️ A roxctl binary can be downloaded from the CircleCI artifacts.

@rhybrillou rhybrillou merged commit 9c2dfa5 into master Apr 8, 2022
@rhybrillou rhybrillou deleted the yann/fix_panic_on_postgres_for_nil_search_queries branch April 8, 2022 16:54
janisz added a commit that referenced this pull request Apr 13, 2026
Replace manual pipe-separated text formatting with Slack's native
table block API for cleaner, more readable reports.

Changes:
- Use table blocks with proper cell types (raw_text, rich_text)
- Jira issues displayed as clickable links in table cells
- Header row: U | Issue | Fix | Aff | Priority | Severity | Deadline | PRs
- Legend moved to section text above table
- PRs and orphaned issues remain as section blocks
- Removed obsolete _split_slack_sections function

Table format per Slack API:
- Headers: First row in rows array
- Cells: raw_text (simple) or rich_text (links)
- Max 100 rows, 20 columns per table

Example table output:
┌─────┬───────────┬─────┬─────┬──────────────────┬──────────┬──────────────┬──────┐
│  U  │   Issue   │ Fix │ Aff │    Priority      │ Severity │   Deadline   │ PRs  │
├─────┼───────────┼─────┼─────┼──────────────────┼──────────┼──────────────┼──────┤
│ 🔴  │ ROX-12345 │ ❌  │ ✅  │ :jira-critical:  │ Important│ Due: 2d      │ #1234│
│ 🟡  │ ROX-12346 │ ✅  │ ❌  │ :jira-major:     │ Moderate │ Due: 12d     │ #1236│
└─────┴───────────┴─────┴─────┴──────────────────┴──────────┴──────────────┴──────┘

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
janisz added a commit that referenced this pull request Apr 13, 2026
Replace separate "PRs Missing Jira" and "Issues with Missing Metadata"
sections with one unified "Release Contents" table showing everything.

Changes:
- New _create_all_pr_rows() function collects all PRs and issues
- All PRs shown in table (with or without Jira)
- All issues shown (complete and incomplete metadata)
- PRs without Jira show "No Jira" in Issue column
- Problems sorted first (incomplete), then by urgency
- Complete items shown after problems

Table structure:
- Urgency | Issue | fixVersion | affectedVersion | Priority | Severity | Deadline | PRs
- Shows ❌ for missing metadata, ✅ for present
- "No Jira" for PRs without Jira reference
- "—" for N/A fields

Benefits:
- Single comprehensive view of entire release
- Problems highlighted at top (sorted by completeness, then urgency)
- No separate sections to cross-reference
- Easy to see both what's good and what needs attention

Example rows:
- ❌ issue: ROX-123 | ❌ | ✅ | :jira-critical: | Important | Due: 2d | #1234
- ✅ issue: ROX-456 | ✅ | ✅ | :jira-major: | — | — | #1235
- No Jira PR: — | No Jira | — | — | — | — | — | #1236

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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