Skip to content

Improving Environment Variable Default values#245

Merged
jacob6838 merged 641 commits intodevelopfrom
env-defaults
Dec 30, 2025
Merged

Improving Environment Variable Default values#245
jacob6838 merged 641 commits intodevelopfrom
env-defaults

Conversation

@jacob6838
Copy link
Copy Markdown
Collaborator

PR Details

Description

A new installation of the CV-Manager now only requires 3 variables:

  • DOCKER_HOST_IP
  • MAPBOX_TOKEN
  • MAVEN_GITHUB_TOKEN

Adding default environment variables for all non-required elements, and adding errors for required variables. un-specified non-required variables will produce warnings when when relevant.

Summary of changes:

  • Added default values for all possible values in docker-compose files
  • Overhauled environment variable processing in cvmanager python api to apply defaults and centrally manage environment variable access
  • Added relevant default values to Intersection API application.yaml

How Has This Been Tested?

This was tested by bringing up the whole cvmanager system using the COMPOSE_PROFILES: basic,webapp,intersection,mongo_full,kafka_full,kafka_connect_standalone,conflictmonitor

Types of changes

  • Defect fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that cause existing functionality to change)

Checklist:

  • My changes require new environment variables:
    • I have updated the docker-compose, K8s YAML, and all dependent deployment configuration files.
  • My changes require updates to the documentation:
    • I have updated the documentation accordingly.
  • My changes require updates and/or additions to the unit tests:
    • I have modified/added tests to cover my changes.
  • All existing tests pass.

John-Wiens and others added 30 commits September 4, 2025 11:11
Comment thread jpo-utils
Copy link
Copy Markdown

@dmccoystephenson dmccoystephenson left a comment

Choose a reason for hiding this comment

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

Ran into the following after checking out the branch, copying sample.env to .env, setting the 3 required env vars, navigating to localhost in a browser and signing in:

image

I did not try using a fresh clone.

Comment thread README.md Outdated
Comment thread README.md Outdated
@jacob6838
Copy link
Copy Markdown
Collaborator Author

Ran into the following after checking out the branch, copying sample.env to .env, setting the 3 required env vars, navigating to localhost in a browser and signing in:

Is this issue still occurring? I would suggest 2 debugging steps off the bat:

  1. Make sure you are accessing the webapp at localhost:3000
  2. Make sure you remove the keycloak volume and re-build it

@dmccoystephenson
Copy link
Copy Markdown

Ran into the following after checking out the branch, copying sample.env to .env, setting the 3 required env vars, navigating to localhost in a browser and signing in:

Is this issue still occurring? I would suggest 2 debugging steps off the bat:

  1. Make sure you are accessing the webapp at localhost:3000
  2. Make sure you remove the keycloak volume and re-build it

Just tried again on a fresh clone after removing the keycloak volume and it works just fine.

Copy link
Copy Markdown

@dmccoystephenson dmccoystephenson left a comment

Choose a reason for hiding this comment

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

This looks great & the unit tests pass! I really like the encapsulation of the environment variables, it makes the code read much nicer.

Comment thread services/addons/images/obu_ota_server/obu_ota_server.py Outdated
Comment thread services/addons/images/rsu_status_check/rsu_pinger.py Outdated
Copy link
Copy Markdown
Collaborator

@payneBrandon payneBrandon left a comment

Choose a reason for hiding this comment

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

Couple additional comments, looking good!

Comment thread services/api/src/smtp_error_handler.py
Copy link
Copy Markdown
Collaborator

@payneBrandon payneBrandon left a comment

Choose a reason for hiding this comment

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

lgtm! much simpler to get running!!

@jacob6838 jacob6838 merged commit 7bb4891 into develop Dec 30, 2025
9 checks passed
@jacob6838 jacob6838 deleted the env-defaults branch December 30, 2025 21:08
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.

7 participants