Skip to content

Conversation

@anomit
Copy link
Member

@anomit anomit commented Sep 12, 2025

Fixes #152

Checklist

  • My branch is up-to-date with upstream/develop branch.
  • Everything works and tested for Python 3.8.0 and above.
  • I ran pre-commit checks against my changes.
  • I've written tests against my changes and all the current present tests are passing.

Current behaviour

The collector_test.sh script unconditionally searches for available ports and overwrites the LOCAL_COLLECTOR_PORT in the environment file whenever no active collector is found, regardless of whether the configured port is actually in use. This causes the script to ignore explicitly configured port values and replace them with the first available port in the range (50051-51050), even when the configured port is perfectly available.

New expected behaviour

The script now respects explicitly configured LOCAL_COLLECTOR_PORT values and only searches for alternative ports when there is an actual port conflict. When the configured port is available, it uses that port without modifying the environment file. Port replacement only occurs when the configured port is genuinely in use by another service.

Change logs

Fixed

  • Fixed unconditional port override behavior that ignored explicitly configured LOCAL_COLLECTOR_PORT values
  • Eliminated duplicate port connectivity checks by reusing test_ping results from initial connectivity test
  • Fixed environment file being unnecessarily modified when configured port is available

Deployment Instructions

  • Pull the dockerify branch of the lite node and confirm whether the free local collector port as configured in your env is correctly picked up by the build.sh setup and local collector spawned on it.

xadahiya
xadahiya previously approved these changes Sep 12, 2025
Copy link
Contributor

@xadahiya xadahiya left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@xadahiya xadahiya left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@SwaroopH SwaroopH left a comment

Choose a reason for hiding this comment

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

LGTM

@SwaroopH SwaroopH merged commit 327484f into main Sep 17, 2025
1 check 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.

collector_test.sh overrides local collector port as configured in env even if available

4 participants