This repository was archived by the owner on Feb 6, 2026. It is now read-only.
Repository navigation
feat(clover): break out utility funcs to be shareable in pipelines - #8247
Merged
Merged
Conversation
Dependency Review✅ No vulnerabilities or OpenSSF Scorecard issues found.Scanned FilesNone |
|
Working with Module Index at: https://module-index.systeminit.com Google - 0 new, 1936 changed asset(s) |
sprutton1
force-pushed
the
feat/clover/gcp/shared-func-utilities
branch
2 times, most recently
from
January 12, 2026 20:35
955da2a to
b356dbf
Compare
|
Working with Module Index at: https://module-index.systeminit.com Google - 0 new, 1936 changed asset(s) |
1 similar comment
|
Working with Module Index at: https://module-index.systeminit.com Google - 0 new, 1936 changed asset(s) |
sprutton1
force-pushed
the
feat/clover/gcp/shared-func-utilities
branch
from
January 13, 2026 16:45
b356dbf to
76071a4
Compare
sprutton1
marked this pull request as ready for review
January 13, 2026 16:54
|
Working with Module Index at: https://module-index.systeminit.com Google - 0 new, 1936 changed asset(s) |
aaron-dernley
self-requested a review
January 13, 2026 17:06
- Create shared/utils.ts with common GCP functions (getAccessToken, normalizeGcpResourceValues, buildUrlWithParams, etc.) - Modify createDefaultFuncSpec to automatically prepend shared utilities to all GCP func files - Remove duplicated helper functions from individual func files (create, update, delete, refresh, discover, import) - Maintain self-contained constraint by prepending utilities at build time - Reduces ~200+ lines of duplicated code across 6+ files - Improves maintainability while preserving existing architecture This resolves code duplication while keeping each func file self-contained and ensures consistent helper implementations across all GCP functions.
sprutton1
force-pushed
the
feat/clover/gcp/shared-func-utilities
branch
from
January 13, 2026 17:16
76071a4 to
5cabbf2
Compare
|
Working with Module Index at: https://module-index.systeminit.com Google - 0 new, 1936 changed asset(s) |
aaron-dernley
approved these changes
Jan 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
How does this PR change the system?
This adds a simple and naive code sharing paradigm to clover funcs. Given that SI does not support sharing code across funcs, we end up duplicating the same helpers in every func. This has lead to issues where we fix bugs in the helpers and fail to update the helpers in all files.
utils.tsfile that just contains all of the helper funcs reused across the other gcp funcssharedUtilsPathand prepend its contents to other funcs if it is presentThis now means we only need to make changes to those funcs in one place if they need updating.
Other stuff:
SI_BEARER_TOKENoptional as it is only actually needed when pulling from the module indexAGENTS.mdso claude and friends can more easily automate parts of the spec generation test flowOut of Scope:
This could be a lot smarter and have a per-func opt-in so you could call out which utility each func needs. Also, there's no way to reuse these for override funcs at the moment, but that should be a simple thing to add.
How was it tested?
I tested this pretty thoroughly using claude to regenerate specs, upload them, and test crud and mgmt still worked as expected. It was able to churn through a few different scenarios without much trouble
Does it require a docs change?
In short: 🔗