Skip to content

Comments

fix: constructor options take precedence over env vars in Configuration#3384

Open
B4nan wants to merge 1 commit intov4from
fix/config-priority-3080
Open

fix: constructor options take precedence over env vars in Configuration#3384
B4nan wants to merge 1 commit intov4from
fix/config-priority-3080

Conversation

@B4nan
Copy link
Member

@B4nan B4nan commented Feb 4, 2026

Summary

  • Changes configuration priority so user-provided constructor options take precedence over environment variables
  • Environment variables still override defaults and crawlee.json settings
  • Fixes a bug where crawlee.json was incorrectly overwriting constructor options

New priority: constructor options > env vars > crawlee.json > defaults

This allows users to programmatically override environment variables. For example, new Configuration({ headless: false }) now works even if CRAWLEE_HEADLESS=true is set.

Closes #3080

Test plan

  • Existing Configuration-related tests pass
  • Browser launcher tests pass
  • Manual verification confirms constructor options override env vars

🤖 Generated with Claude Code

@B4nan B4nan added the adhoc Ad-hoc unplanned task added during the sprint. label Feb 4, 2026
@B4nan B4nan force-pushed the fix/config-priority-3080 branch 2 times, most recently from 1348c85 to 2fb30c4 Compare February 4, 2026 14:28
…on (#3080)

Changes the configuration priority so that user-provided constructor options
take precedence over environment variables, while env vars still override
defaults and crawlee.json settings.

New priority: constructor options > env vars > crawlee.json > defaults

This allows users to programmatically override environment variables, e.g.,
`new Configuration({ headless: false })` now works even if CRAWLEE_HEADLESS=true.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@B4nan B4nan force-pushed the fix/config-priority-3080 branch from 2fb30c4 to d6946be Compare February 4, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant