Skip to content

chore: fix array parsing from balancer/backend - #171

Merged
Xeonus merged 3 commits into
mainfrom
fix-subgraph-parsing
Jun 18, 2026
Merged

chore: fix array parsing from balancer/backend#171
Xeonus merged 3 commits into
mainfrom
fix-subgraph-parsing

Conversation

@Xeonus

@Xeonus Xeonus commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

What was wrong

_to_json only rewrote spreads of inline array literals (...[ ] → [ ]). When balancer/backend added workerJobs: [...activeChainWorkerJobsGeneric, ...] (spreads of imported identifiers), those tokens
reached json.loads and raised JSONDecodeError for every chain. Subgraph.get_subgraph_url_from_backend_config() swallowed it (bare try/except → None) and silently fell back to stale
studio.thegraph.com URLs — which regressed the bal_addresses scheduled PR with outdated sources

Fix

This change fixes the issue by adding two regexes right before the existing one to properly handle the new data structure in the backend.

What was wrong

  _to_json only rewrote spreads of inline array literals (...[ ] → [ ]). When balancer/backend added workerJobs: [...activeChainWorkerJobsGeneric, ...] (spreads of imported identifiers), those tokens
  reached json.loads and raised JSONDecodeError for every chain. Subgraph.get_subgraph_url_from_backend_config() swallowed it (bare try/except → None) and silently fell back to stale
  studio.thegraph.com URLs — which regressed the bal_addresses scheduled PR with outdated sources

This change fixes the issue by adding two regexes right before the existing one to properly handle the new data structure in the backend.
@Xeonus
Xeonus requested a review from jalbrekt85 June 17, 2026 09:48

@jalbrekt85 jalbrekt85 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Xeonus
Xeonus merged commit 25b66c2 into main Jun 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants