Skip to content

[DX-3043] make sure all local CRE CLI commands respect the state files#21694

Open
Tofel wants to merge 3 commits intodevelopfrom
codex/dx-3043-local-cre-cli-use-state-file
Open

[DX-3043] make sure all local CRE CLI commands respect the state files#21694
Tofel wants to merge 3 commits intodevelopfrom
codex/dx-3043-local-cre-cli-use-state-file

Conversation

@Tofel
Copy link
Contributor

@Tofel Tofel commented Mar 25, 2026

@github-actions
Copy link
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 25, 2026

✅ No conflicts with other open PRs targeting develop

@trunk-io
Copy link

trunk-io bot commented Mar 25, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

Failed Test Failure Summary Logs
Test_CRE_V2_Suite_Bucket_B/[v2]_Vault_DON_-_workflow-gateway-capabilities/cross_namespace The test failed during a blockchain setup process, likely due to an issue with funding or transaction confirmation on the Ethereum network. Logs ↗︎

View Full Report ↗︎Docs

@Tofel Tofel force-pushed the codex/dx-3043-local-cre-cli-use-state-file branch from 15a0055 to a94ada7 Compare March 25, 2026 15:12
@Tofel Tofel marked this pull request as ready for review March 25, 2026 17:11
@Tofel Tofel requested review from a team as code owners March 25, 2026 17:11
Copilot AI review requested due to automatic review settings March 25, 2026 17:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Risk Rating: MEDIUM — CLI behavior changes across multiple CRE commands; correctness depends on state file parsing and resolution fallbacks.

This PR aims to ensure local CRE CLI commands prefer values from local CRE state files (RPC URL, contract addresses/versions, DON metadata) unless the user explicitly overrides via flags.

Changes:

  • Introduces a LocalCREStateResolver to load and query local CRE state (addresses, RPC, DON/gateway metadata, workflow registry output).
  • Updates workflow and example commands to resolve RPC/addresses/DON IDs from local state when flags aren’t explicitly set.
  • Updates billing startup to hydrate missing config from local CRE state and adds unit tests for the resolver utilities.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
core/scripts/cre/environment/examples/examples.go Resolves RPC URL from local CRE state for example contract deployment commands.
core/scripts/cre/environment/environment/workflow.go Replaces direct state-file reads with shared resolver-based address/version/RPC/DON resolution.
core/scripts/cre/environment/environment/state_resolver.go Adds LocalCREStateResolver implementation for loading/reading local CRE state + helper parsing.
core/scripts/cre/environment/environment/state_resolver_test.go Adds unit tests for resolver behavior and helpers (address refs, DON metadata, docker RPC mapping).
core/scripts/cre/environment/environment/examples.go Uses resolver to hydrate RPC, gateway URL, DON info, and workflow registry address/version for the PoR example workflow command.
core/scripts/cre/environment/environment/billing.go Hydrates billing config from local CRE state when running without a provided SetupOutput; normalizes RPC for Docker access.

@cl-sonarqube-production
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants