Skip to content

only register beholder with chip router if the latter is running#22263

Merged
Tofel merged 4 commits intodevelopfrom
fix-running-beholder-chip-router
May 5, 2026
Merged

only register beholder with chip router if the latter is running#22263
Tofel merged 4 commits intodevelopfrom
fix-running-beholder-chip-router

Conversation

@Tofel
Copy link
Copy Markdown
Contributor

@Tofel Tofel commented Apr 30, 2026

No description provided.

@github-actions
Copy link
Copy Markdown
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
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

✅ No conflicts with other open PRs targeting develop

@trunk-io
Copy link
Copy Markdown

trunk-io Bot commented Apr 30, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

Failed Test Failure Summary Logs
TestIntegration_MercuryV3 The test failed without a clear error message, indicating an unspecified failure during the integration test execution. Logs ↗︎
TestIntegration_MercuryV2 The test failed without a clear error message, indicating an unspecified issue during the integration test execution. Logs ↗︎
TestIntegration_MercuryV4/receives_at_least_one_report_per_feed_for_every_server_from_each_oracle_when_EAs_are_at_100%_reliability The test failed without providing specific error details, indicating an issue with report reception or reliability checks. Logs ↗︎
TestIntegration_MercuryV2/receives_at_least_one_report_per_feed_from_each_oracle_when_EAs_are_at_80%_reliability The test failed during the integration test for MercuryV2, specifically when checking report reception from oracles at 80% reliability. Logs ↗︎

... and 3 more

View Full Report ↗︎Docs

@Tofel Tofel marked this pull request as ready for review May 5, 2026 09:30
Copilot AI review requested due to automatic review settings May 5, 2026 09:30
@Tofel Tofel requested review from a team as code owners May 5, 2026 09:30
Copy link
Copy Markdown
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

This PR changes how Beholder interacts with the local ChIP router: it now reads router connection details from persisted local CRE state, skips router registration when the router is unavailable, and tries to preserve prior Beholder state across env start failures/interruptions. In the broader codebase, these changes sit in the local CRE lifecycle and test helper path, so they affect both developer workflows and system-test setup.

Changes:

  • Switched chiprouter client initialization to load router endpoints from persisted local CRE state instead of CTF_CONFIGS.
  • Made Beholder startup register with the router only when chiprouter.EnsureStarted succeeds.
  • Added restoration of persisted Beholder state during env start panic/signal recovery and ensured the state directory exists before rewriting chip_ingress.toml.

Scrupulous human review areas:

  • Error handling around chiprouter.EnsureStarted in Beholder startup, especially which failures should be ignored versus surfaced.
  • Recovery/cleanup flows in env start, because they now recreate only part of the deleted Beholder state after startup interruption/failure.
  • Interactions between persisted local state, router subscriber IDs, and env beholder stop.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
system-tests/lib/cre/chiprouter/router.go Changes chiprouter client bootstrap to read from persisted local CRE state.
core/scripts/cre/environment/environment/environment.go Threads persisted Beholder state through env start recovery/signal handling.
core/scripts/cre/environment/environment/beholder.go Removes mandatory router startup check, delays conditional router registration, and updates Beholder state restoration.

Comment thread core/scripts/cre/environment/environment/beholder.go
Comment thread core/scripts/cre/environment/environment/beholder.go
@Tofel Tofel enabled auto-merge May 5, 2026 11:09
@cl-sonarqube-production
Copy link
Copy Markdown

@skudasov skudasov self-requested a review May 5, 2026 12:57
@Tofel Tofel added this pull request to the merge queue May 5, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 5, 2026
@Tofel Tofel added this pull request to the merge queue May 5, 2026
Merged via the queue into develop with commit 9b6a4fd May 5, 2026
137 of 140 checks passed
@Tofel Tofel deleted the fix-running-beholder-chip-router branch May 5, 2026 16:59
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.

4 participants