Skip to content

Fix kong payload to exclude minio config if not private S3#316

Merged
brucetony merged 3 commits intodevelopfrom
fix-kong-payload
Feb 5, 2026
Merged

Fix kong payload to exclude minio config if not private S3#316
brucetony merged 3 commits intodevelopfrom
fix-kong-payload

Conversation

@brucetony
Copy link
Collaborator

@brucetony brucetony commented Feb 5, 2026

Summary by CodeRabbit

  • Refactor
    • Improved type safety and consistency in data store initialization logic by strengthening type definitions and removing hard-coded configuration structures. This change enhances code maintainability and reduces potential for configuration errors.

@coderabbitai
Copy link

coderabbitai bot commented Feb 5, 2026

📝 Walkthrough

Walkthrough

This pull request refactors the data store initialization component to improve type safety by replacing string literals with a DataStoreType enum and introducing a typed API request body (BodyKongInitializeKongInitializePost), while maintaining equivalent functionality.

Changes

Cohort / File(s) Summary
Data Store Initialization Component
components/data-stores/create/DataStoreProjectInitializer.vue
Replaced hard-coded string comparisons with DataStoreType enum. Introduced BodyKongInitializeKongInitializePost for type-safe payload construction. Generated dataStoreTypeOptions from enum instead of hard-coding. Converted selectedDataStoreType from string union to DataStoreType enum. Updated template conditionals and bindings to use enum values.
Component Test File
test/components/data-stores/create/DataStoreProjectInitializer.spec.ts
Updated test helper to accept DataStoreType instead of string parameter. Replaced string literal emissions with enum values (e.g., DataStoreType.S3). Updated assertions to compare lowercase text against enum values.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Strings once loose now caged in types so neat,
Enums guard the data store, keeping flow concrete!
From "S3" to DataStoreType we dance,
API bodies typed—a refactoring romance! ✨

🚥 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 Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main functional change: fixing Kong payload to conditionally exclude minio config based on S3 bucket privacy settings.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-kong-payload

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

@brucetony brucetony merged commit db550ca into develop Feb 5, 2026
5 checks passed
@brucetony brucetony deleted the fix-kong-payload branch February 5, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant