Skip to content

fix: typo in config.ts: WORKER_NETWORK_ID -> WORKER_RESOURCE_ID#268

Open
nytamin wants to merge 1 commit intomainfrom
fix/config
Open

fix: typo in config.ts: WORKER_NETWORK_ID -> WORKER_RESOURCE_ID#268
nytamin wants to merge 1 commit intomainfrom
fix/config

Conversation

@nytamin
Copy link
Member

@nytamin nytamin commented Mar 2, 2026

About Me

This pull request is posted on behalf of the NRK.

Type of Contribution

This is a:

Bug fix

Current Behavior

env WORKER_RESOURCE_ID applies to both resourceId and networkIds of workers.

New Behavior

  • env WORKER_NETWORK_ID applies to networkIds
  • env WORKER_RESOURCE_ID applies to resourceId

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

Summary

This PR fixes a configuration bug in shared/packages/api/src/config.ts where the WORKER_RESOURCE_ID environment variable was incorrectly being used as the default value for both the resourceId and networkIds worker arguments.

Changes

File modified: shared/packages/api/src/config.ts

The networkIds field in workerArgumentsGeneric now correctly uses the dedicated WORKER_NETWORK_ID environment variable instead of WORKER_RESOURCE_ID. This allows:

  • WORKER_RESOURCE_ID to apply exclusively to the worker's resource/computer identifier
  • WORKER_NETWORK_ID to apply exclusively to the worker's network identifiers

The change is minimal (1 line changed) and affects only the default environment variable mapping for the networkIds configuration option. All existing logic, error handling, and API signatures remain unchanged.

@nytamin nytamin requested a review from jstarpl March 2, 2026 07:41
@coderabbitai
Copy link

coderabbitai bot commented Mar 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1a5fc02 and 468e800.

📒 Files selected for processing (1)
  • shared/packages/api/src/config.ts

Walkthrough

Updated the default environment variable name for the worker resource identifier in the configuration from WORKER_NETWORK_ID to WORKER_RESOURCE_ID, affecting only the default value in the workerArgumentsGeneric configuration.

Changes

Cohort / File(s) Summary
Worker Configuration
shared/packages/api/src/config.ts
Changed default environment variable name for worker resource identifier from WORKER_NETWORK_ID to WORKER_RESOURCE_ID in workerArgumentsGeneric configuration.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A variable name, once NETWORK_ID bright,
Now RESOURCE_ID shines with fresh light,
One little change in config so true,
Makes the worker know just what to do! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: renaming the default environment variable from WORKER_NETWORK_ID to WORKER_RESOURCE_ID in config.ts, which directly matches the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/config

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 2, 2026

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.

1 participant