refactor(internal/surfer): encapsulate provider logic into new package#4724
refactor(internal/surfer): encapsulate provider logic into new package#4724sarahheacock merged 1 commit intomainfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4724 +/- ##
==========================================
+ Coverage 81.37% 81.39% +0.01%
==========================================
Files 130 131 +1
Lines 10905 10946 +41
==========================================
+ Hits 8874 8909 +35
- Misses 1392 1397 +5
- Partials 639 640 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request successfully refactors the core logic for gcloud command generation into a new provider package. The changes correctly update import paths, function calls, and types to reflect the new package structure, enhancing modularity and encapsulation as described in the pull request description. All moved functions have been appropriately exported and integrated into the provider.Config struct where applicable. The corresponding test files have also been updated to reflect these changes, ensuring continued test coverage for the refactored logic.
1692c92 to
83a1fd3
Compare
74a00ac to
bacd7f8
Compare
6755a03 to
d499318
Compare
bacd7f8 to
4ab12a7
Compare
5ae1737 to
62e300e
Compare
…ation The provider package is relocated from internal/surfer/provider into internal/surfer/gcloud/provider to better encapsulate abstraction code used exclusively by the gcloud command builders. By bringing the provider internals closer to their usage site, we prevent tight coupling across the broader surfer module. Helper functions like FindFieldHelpText are moved into config.go. ReadGcloudConfig migrated from gopkg.in/yaml.v3 over to the internal/yaml generic package.
4ab12a7 to
a19a604
Compare
The core gcloud configuration, field, loader, method, resource, and service information logic has been extracted from the package into a new, dedicated package. This separates generic surfer API rules and configuration definitions from the gcloud-specific command and argument builder implementations.
providershould slowly decrease in size as sidekick improves and the gcloud config decreases in size. This abstracts away the current current sources of data so that they can be updated over time.Fix: #4714