Migrate from APIHarnessV2 to CustomStorage service class#120
Draft
Migrate from APIHarnessV2 to CustomStorage service class#120
Conversation
Replace the generic APIHarnessV2 uber-class with the purpose-built CustomStorage service class for all collection CRUD operations. This uses ext_headers at construction time instead of passing headers on every call, and calls methods directly (PutObject, GetObject, SearchObjects) instead of routing through .command().
Add verifyWorkflowExecutionCompleted() that polls the execution status page until terminal state, catching function failures that were previously invisible. Add extension interaction test that saves preferences to exercise collection write path end-to-end.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Replaces APIHarnessV2 (Uber class) with CustomStorage (service class) for all collection CRUD operations across the three function handlers.
The Falcon Foundry Functions Editor parses
from falconpy import CustomStorageto auto-detect required OAuth scopes (custom-storage:read,custom-storage:write). It cannot parse the Uber class.command()pattern, which means apps using APIHarnessV2 require manual scope configuration.Changes per function:
APIHarnessV2().command("PutObject", ...)→CustomStorage(ext_headers=...).PutObject(...)The
ext_headersconstructor parameter replaces per-requestheaderskwargs, applying theX-CS-APP-IDheader to all requests from the client instance. Response shapes and behavior are unchanged.Draft because the associated blog post needs updating to match the new patterns.