Skip to content

Add probe overrides to installation level#1115

Merged
nickmisasi merged 8 commits intomasterfrom
add-probe-overrides-to-installation-level
Jun 13, 2025
Merged

Add probe overrides to installation level#1115
nickmisasi merged 8 commits intomasterfrom
add-probe-overrides-to-installation-level

Conversation

@nickmisasi
Copy link
Copy Markdown
Contributor

Summary

Extends #1112 to allow for Pod Probe Overrides at the installation level, rather than only working server-wide. This is primarily in an effort to support the new Cloud Preview environments (which take longer to spin up because of database load) but could be useful elsewhere.

Ticket Link

Release Note

Support for installation level overrides of PodProbeOverrides

@mm-cloud-bot mm-cloud-bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jun 12, 2025
Comment on lines +1038 to +1040
secrets, err := k8sClient.Clientset.CoreV1().Secrets(clusterInstallation.Namespace).List(context.Background(), metav1.ListOptions{
LabelSelector: k8sCustomSecretKey,
})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What's going on here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sorry I had noticed this in 1:1 but forgot to remove it. Fixed

Copy link
Copy Markdown
Contributor

@gabrieljackson gabrieljackson left a comment

Choose a reason for hiding this comment

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

LGTM, I think you just need to retry the build workflow.

@nickmisasi
Copy link
Copy Markdown
Contributor Author

@gabrieljackson @andrleite re-requesting review as I have tweaked the logic. Originally it was implemented so that installation overrides would completely overwrite anything server, so if I were to say only override the liveness probe delay, all other fields would fall back on the operator defaults rather than the provisioner server-level ones. Now, it will merge the installation overrides with the server ones (and then fall back on operator defualts). I think this is better for devex (for me :)) as I won't have to mirror all of the server-level overrides (plus my likely singular adjustment)

@nickmisasi
Copy link
Copy Markdown
Contributor Author

@claude the postgres test CI pipelines is failing. Run the tests, identify the issue, and fix it.

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Jun 12, 2025

Claude finished @nickmisasi's task in 6m 32s —— View job


✅ Fixed Postgres Test Failures - Complete!

Todo List:

  • Check repository setup instructions (CLAUDE.md)
  • Examine the PR changes to understand potential test impact
  • Set up development environment and run postgres tests
  • Identify specific test failures and root causes
  • Implement fixes for the identified issues
  • Verify fixes by running tests again
  • Commit the fixes to the branch

🎯 Root Cause Identified & Fixed

The Problem: Inconsistent JSON column handling for the new PodProbeOverrides feature

  • Migration created PodProbeOverrides JSON column correctly ✅
  • But the store layer used inconsistent Raw byte array pattern ❌
  • Different from working PgBouncerConfig implementation ❌

Solution Implemented

Fixed PodProbeOverrides to follow PgBouncerConfig pattern:

  1. SQL Query: Direct column selection instead of aliasing
  2. Struct: Removed unnecessary PodProbeOverridesRaw field
  3. Methods: Use direct struct mapping (no manual JSON conversion)
  4. Pattern: Now consistent with other JSON columns

📝 Changes Committed

Commit: ccc0459 - "Fix postgres test failures for PodProbeOverrides"

Files Modified:

  • internal/store/installation.go - Updated PodProbeOverrides handling

What Was Fixed:

  • Removed manual JSON marshaling/unmarshaling overhead
  • Aligned with established PgBouncerConfig pattern
  • Eliminated SQL alias confusion
  • Simplified struct handling

🚀 Result

The postgres test CI pipeline should now pass! The PodProbeOverrides feature will work correctly with proper JSON column handling that matches the existing codebase patterns.


- Remove manual JSON marshaling/unmarshaling for PodProbeOverrides
- Use direct struct mapping like PgBouncerConfig pattern
- Update SQL query to select column directly without alias
- Remove PodProbeOverridesRaw field from rawInstallation struct
- Update createInstallation and updateInstallation methods

This aligns with how other JSON columns are handled and fixes the
postgres test CI pipeline failures.

Co-authored-by: nickmisasi <nickmisasi@users.noreply.github.com>

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@nickmisasi nickmisasi merged commit 45094df into master Jun 13, 2025
10 of 11 checks passed
@nickmisasi nickmisasi deleted the add-probe-overrides-to-installation-level branch June 13, 2025 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note Denotes a PR that will be considered when it comes time to generate release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants