Refactor Provider Interface and Service for Safe Bulk Updates#6
Refactor Provider Interface and Service for Safe Bulk Updates#6SamyRai wants to merge 25 commits intofeature/generic-dns-provider-pluginfrom
Conversation
- Add golangci-lint v2 configuration - Add comprehensive test suite with testify - Remove code duplications - Add .golangci.yml to repository - Update README with correct repository URL
Bumps the go_modules group with 1 update in the / directory: [golang.org/x/net](https://github.com/golang/net). Updates `golang.org/x/net` from 0.34.0 to 0.38.0 - [Commits](golang/net@v0.34.0...v0.38.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-version: 0.38.0 dependency-type: indirect dependency-group: go_modules ... Signed-off-by: dependabot[bot] <support@github.com>
- Remove 'comprehensive' from all documentation - Change 'Best Practices' to 'Practices' - Update GitHub repository description - Verify no credentials in git history
- Add CI workflow with test, lint, build, and security scanning - Add release workflow for automated releases on tags - Support multiple Go versions and platforms - Include code coverage reporting
- Update to golangci-lint-action v7 for v2 support - Fix workflow formatting
- Set exit-code to 0 for gosec to report but not fail - Fix workflow formatting
- Add version package with semantic versioning support - Add prominent disclaimer about pre-1.0.0 status - Add version command to CLI (--version flag) - Create version management workflow - Add version bumping script - Update release workflow to inject version info - Mark pre-1.0.0 releases as prerelease in GitHub - Add VERSIONING.md documentation
…bb8b02913 chore(deps): bump golang.org/x/net from 0.34.0 to 0.38.0 in the go_modules group across 1 directory
- Add badges and status indicators - Add tables for better organization - Add collapsible sections - Improve formatting and structure - Remove plugin documentation from source (moved to wiki) - Update plugin README to point to wiki
- Add repository topics (go, cli, dns, namecheap, etc.) - Add CODE_OF_CONDUCT.md - Add CONTRIBUTING.md (links to wiki) - Add issue templates (bug report, feature request) - Add pull request template - Add FUNDING.yml placeholder - Enable all repository features (issues, projects, wiki, discussions)
…vider-plugin Merge feature/record-id-support: add record ID mapping and delete-by-id support
Merge feature/generic-dns-provider-plugin: provider plugin multi-provider refactor (OpenAPI providers, REST adapter, autodiscovery, CLI changes) Note: tests pass and provider-area unit tests added. Linter reports legacy repo issues; recommend follow-up cleanup PRs.
- Add `ProviderCapabilities` to `Provider` interface. - Add granular update methods (`AddRecord`, `UpdateRecord`, `DeleteRecord`) to `Provider` interface. - Add `context.Context` support to all `Provider` and `Service` methods. - Update `NamecheapProvider` and `RESTProvider` to implement new interface. - Refactor `Service.BulkUpdate` to use granular updates for non-atomic providers. - Add `IsBulkReplaceAtomic` capability flag. - Add tests for non-atomic bulk update logic. - Update `TODO.md` with progress.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
…formance suite - Add `context.Context` to all Provider and Service methods. - Introduce `ProviderCapabilities` to distinguish between atomic and non-atomic providers. - Refactor `Service.BulkUpdate` to use safer granular operations for non-atomic providers (avoiding delete-all). - Add `AddRecord`, `UpdateRecord`, `DeleteRecord` to Provider interface. - Implement new interface methods in `NamecheapProvider` and `RESTProvider`. - Create `pkg/dns/provider/conformance` test suite with `MockProvider`. - Update tests to verify atomic vs. non-atomic behavior and fix record renaming logic. - Update `TODO.md` with completed tasks.
This PR refactors the DNS Provider interface and Service layer to improve safety and correctness, specifically addressing data loss risks in bulk updates.
Key changes:
context.Contextto allProviderandServicemethods to enable cancellation and timeout control.ProviderCapabilitiesstruct withIsBulkReplaceAtomicflag.AddRecord,UpdateRecord, andDeleteRecordmethods to theProviderinterface. This allows theServicelayer to perform granular operations instead of dangerous "replace all" operations for providers that don't support atomic bulk replacement (like generic REST providers).Service.BulkUpdateto checkIsBulkReplaceAtomic. If false, it orchestrates the update using granular operations, significantly reducing the risk of data loss if an operation fails.NamecheapProvider(atomic) andRESTProvider(granular) to match the new interface.PR created automatically by Jules for task 6071803260271411599 started by @SamyRai