-
Notifications
You must be signed in to change notification settings - Fork 1
Update subgraph deploy workflow #97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,8 +6,7 @@ jobs: | |
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| submodules: recursive | ||
|
|
@@ -29,7 +28,26 @@ jobs: | |
| # 1G = 1073741824 | ||
| gc-max-store-size-linux: 1G | ||
|
|
||
| - run: nix develop --command subgraph-deploy | ||
| env: | ||
| GOLDSKY_TOKEN: ${{ secrets.CI_GOLDSKY_TOKEN }} | ||
| GOLDSKY_NAME_AND_VERSION: "test-polygon/0.0.1" | ||
| - run: nix develop -c rainix-sol-prelude | ||
|
|
||
| - run: nix develop -c npm ci | ||
| working-directory: subgraph | ||
|
|
||
| - run: nix develop -c graph codegen | ||
| working-directory: subgraph | ||
|
|
||
| - run: nix develop -c goldsky login --token ${{ secrets.CI_GOLDSKY_TOKEN }} | ||
|
|
||
| - name: Deploy to all networks | ||
| working-directory: subgraph | ||
| run: | | ||
| for NETWORK in $(nix develop -c jq -r 'keys[]' networks.json); do | ||
| DEPLOY_NAME="rain-metaboard-${NETWORK}" | ||
| if nix develop -c goldsky subgraph list --filter deployments --summary 2>&1 | grep -q "${DEPLOY_NAME}"; then | ||
| echo "Skipping ${DEPLOY_NAME} - already deployed" | ||
| else | ||
| echo "Deploying ${DEPLOY_NAME}..." | ||
| nix develop -c graph build --network "${NETWORK}" | ||
| nix develop -c goldsky subgraph deploy "${DEPLOY_NAME}/$(date -Idate)" | ||
| fi | ||
|
Comment on lines
+44
to
+52
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
# Show the overlapping network names from the repo data.
jq -r 'keys[]' subgraph/networks.json | sort
# Reproduce the current grep behavior against a plausible Goldsky summary line.
deploy_name="rain-metaboard-base"
simulated_summary=$'rain-metaboard-base-sepolia/2026-03-12'
if printf '%s\n' "$simulated_summary" | grep -q "${deploy_name}"; then
echo "BUG reproduced: ${deploy_name} is reported as existing when only base-sepolia is present."
else
echo "No collision reproduced."
fiRepository: rainlanguage/rain.metadata Length of output: 207 🏁 Script executed: sed -n '25,55p' .github/workflows/manual-subgraph-deploy.ymlRepository: rainlanguage/rain.metadata Length of output: 1259 🏁 Script executed: # Search for subgraph-build and subgraph-test definitions
rg -i "subgraph-build|subgraph-test" --type json --type sh --type yml
# Also check package.json in subgraph directory
cat subgraph/package.json | grep -A 20 '"scripts"'Repository: rainlanguage/rain.metadata Length of output: 596 🏁 Script executed: # Search for Nix files and check for subgraph-build/subgraph-test definitions
find . -name "flake.nix" -o -name "default.nix" -o -name "shell.nix" | head -20
# Search for these commands in Nix files
rg "subgraph-build|subgraph-test" -g "*.nix"Repository: rainlanguage/rain.metadata Length of output: 81 🏁 Script executed: cat flake.nixRepository: rainlanguage/rain.metadata Length of output: 1725 Use an exact deployment lookup here instead of grepping summary text. Line 46 uses 🤖 Prompt for AI Agents |
||
| done | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gate this workflow on the repo’s canonical subgraph build/test commands.
This path now deploys artifacts built with raw
graph codegen/graph buildcommands and never runssubgraph-test, so the manual deploy workflow can publish a subgraph that has not gone through the repo’s required build/test path. Please switch this workflow tosubgraph-buildand runsubgraph-testbefore deploy. Based on learnings, Subgraph must be built usingnix develop -c subgraph-buildand tested usingnix develop -c subgraph-test.Also applies to: 50-51
🤖 Prompt for AI Agents