fix: functions run command with API key header and variable support#41
Merged
giordano-lucas merged 3 commits intomainfrom Feb 4, 2026
Merged
Conversation
7d4574e to
763a3f0
Compare
Fixed two critical issues with the 'functions run' command: 1. Missing x-notte-api-key header - The FunctionRunStartParams required field was not being populated, causing 400 errors 2. Missing request body - API requires function_id in JSON body but generated client doesn't support it Added variable support for workflow execution: - --var flag for key=value pairs (can be used multiple times) - --vars flag for JSON object string - Variables are passed to the function run API Changes: - Added APIKey() method to NotteClient - Rewrote runFunctionRun to manually construct HTTP request with body - Added integration tests for function run and variables - Added unit test for APIKey() method Resolves issue with function run failing with API key validation error
763a3f0 to
2ba4a92
Compare
- Upgrade to golangci-lint v2 to match CI configuration - Fix errcheck issue: properly handle httpResp.Body.Close() error - Fix gofumpt formatting issues in functions.go - Update make lint to suppress cache warnings - Update make pre-commit-run to run full lint on all code - Fix staticcheck SA5011 in client_test.go by removing redundant nil check
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.
Fixed two critical issues with the 'functions run' command:
Added variable support for workflow execution:
Changes:
Resolves issue with function run failing with API key validation error
Greptile Overview
Greptile Summary
Fixed critical issues with the
functions runcommand where the generated API client lacked support for required authentication header and request body.Key Changes:
NotteClientfor exposing authentication credentialsrunFunctionRunto manually construct HTTP request with body containing function ID and variablesThe implementation reuses the existing HTTP client for retry logic and circuit breaker functionality.
Confidence Score: 4/5
Important Files Changed
APIKey()getter method to expose the API key, enabling manual HTTP requests with proper authenticationAPIKey()method, verifying it returns the correct API keyrunFunctionRunto manually construct HTTP request with body containingfunction_idandvariables, added--varand--varsflags for variable support