Repository navigation
Add CI that checks the function writes to Neo4j - #4
Merged
Merged
Conversation
CI deployed the SAM app but never started Neo4j or invoked the function. Start both with Docker Compose, set the Neo4j connection through template parameters, and test that an invocation stores the event as a LambdaEvent node. Move to python3.12 and the neo4j 5 driver, since the 4.3 driver cannot talk to current Neo4j. Claude-Session: https://claude.ai/code/session_01DZfDmzUBPqNAu3yFKyfCNM
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.
CI deployed the SAM app but never started Neo4j, never set the function's connection variables and never invoked the function, so it could not tell whether the sample works.
Test:
test.sh(make test) invokes the function withevent.jsonplus a unique marker and checks:FunctionCount,TotalCodeSize)LambdaEventnode holding that event, queried withcypher-shellSample fixes:
update-function-configurationstep after deploy. The template now setsNEO4J_URI,NEO4J_USERNAMEandNEO4J_PASSWORDfrom parameters whose defaults match the compose setup, somake deployproduces a working function. The README shows--parameter-overridesfor other databases.execute_writereplaceswrite_transaction) and pinned the database image toneo4j:5.26instead oflatest.python3.10is past its deprecation date. Moved topython3.12, withjsonpickle4.1 andaws-xray-sdk2.15.make startandmake stopuseddocker-compose, which current runners and Docker installs no longer ship. They usedocker compose, andmake startwaits until LocalStack and Neo4j are ready. Dropped the obsolete composeversionkey andLOCALSTACK_API_KEY.Workflow:
make start(Docker Compose, so the Lambda containers can resolveneo4j), then runsmake deployandmake test, and prints the container logs on failure.permissions: contents: read, 20 minute timeout.Verified by CI.
https://claude.ai/code/session_01DZfDmzUBPqNAu3yFKyfCNM