Repository navigation
Call symbolicEqual through the evaluation function gateway - #22
Merged
Merged
Conversation
Replace EvaluationFunctionClient, which requires static INVOKER_* access keys, with a small boto3-based invoker that uses the default credential chain (the Lambda execution role). The boto3 client is created lazily so importing the module needs no AWS configuration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Switch from invoking via the Lambda API to an HTTPS POST to the public evaluation function gateway, so no AWS credentials or IAM permissions are needed. The gateway base URL comes from EVALUATION_FUNCTION_GATEWAY_URL, and the -staging/-dev suffix is taken from this function's own name so calls stay within the same environment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop the gateway base URL and environment suffix logic: the env var now holds the full URL of the function to call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
EvaluationFunctionClient(which requiresINVOKER_ID/INVOKER_KEY/INVOKER_REGION) with a smallEvaluationFunctionInvokerthat callssymbolicEqualwith an HTTPSPOST, the same way any other client calls an evaluation function. No AWS credentials or IAM permissions are needed. It uses only the standard library (urllib).SYMBOLIC_EQUAL_URLenv var (e.g.https://<api-id>.execute-api.eu-west-2.amazonaws.com/default/symbolicEqual) and used as given. Pointing each environment at its own function also stops staging from calling prodsymbolicEqual, which the old hard-coded function name did.resultreturned,errorre-raised asEvaluationException). HTTP and network failures raise, and the old client's unparseable-response path (which referenced an undefined variable) is fixed.evaluation.pyno longer needs any AWS config, so tests drop theMissingCredentialsworkaround. Adds unit tests for the invoker and updatesdocs/dev.md.Before deploying
Set
SYMBOLIC_EQUAL_URLon the deployed function in each environment:arraySymbolicEqual-staging:<staging gateway invoke URL>/symbolicEqual-stagingarraySymbolicEqual:<production gateway invoke URL>/symbolicEqualWithout it, grading fails with
SYMBOLIC_EQUAL_URL is not set. Redeploys keep the env var, because the backend only updates function code on existing functions.Test plan
pytestpasses locally (14 tests) with no AWS credentials or configarraySymbolicEqual-staging, deploy, and grade a matrix response end to endsymbolicEqual-staging(not prodsymbolicEqual) receives the staging calls🤖 Generated with Claude Code