Skip to content

Add LIKE support to cloud API#1155

Merged
yasserfaraazkhan merged 1 commit intomasterfrom
clear_e2e_instances
Apr 10, 2026
Merged

Add LIKE support to cloud API#1155
yasserfaraazkhan merged 1 commit intomasterfrom
clear_e2e_instances

Conversation

@yasserfaraazkhan
Copy link
Copy Markdown
Contributor

The servers created when running mobile or desktop e2e have a hex in the DNS name.
Deleting the server is failing silently as the DNS look up is for exact name and doesn't account for dynamic hex for the servers.

NONE

@mm-cloud-bot mm-cloud-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Apr 5, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 5, 2026

📝 Walkthrough

Walkthrough

Modified DNS filter matching in the installation store to support wildcard patterns. When a DNS filter contains the % character, the query now uses SQL LIKE operator instead of equality matching. Added corresponding test cases validating wildcard and non-matching patterns.

Changes

Cohort / File(s) Summary
DNS Filter Wildcard Support
internal/store/installation.go
Updated applyInstallationFilter to conditionally use SQL LIKE operator for DNS domain matching when the filter contains % character; otherwise uses equality matching as before. Added strings import.
Filter Test Coverage
internal/store/installation_test.go
Added two new test cases to TestInstallations: one validating wildcard pattern matching ("dns-%") returns matching installations, another verifying non-matching pattern ("nonexistent-%") returns no results.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description explains the problem context: servers created during e2e tests have dynamic hex segments in DNS names, and the deletion is failing due to exact name matching instead of wildcard matching.
Title check ✅ Passed The title 'Add LIKE support to cloud API' accurately describes the main change: adding LIKE query support for DNS filtering in the installation store.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch clear_e2e_instances

Comment @coderabbitai help to get the list of available commands and usage tips.

@yasserfaraazkhan yasserfaraazkhan changed the title Add LIKE support to cloud APIo Add LIKE support to cloud API Apr 6, 2026
Copy link
Copy Markdown

@saturninoabril saturninoabril left a comment

Choose a reason for hiding this comment

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

Thanks @yasserfaraazkhan, LGTM.

@esarafianou esarafianou requested a review from andrleite April 6, 2026 09:10
@yasserfaraazkhan yasserfaraazkhan merged commit 06adb2a into master Apr 10, 2026
16 checks passed
@yasserfaraazkhan yasserfaraazkhan deleted the clear_e2e_instances branch April 10, 2026 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note-none Denotes a PR that doesn't merit a release note.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants