Skip to content

Refactor CONFIG_LOCATION to use CONFIG_DATADIR #3547 - #3549

Closed
guptapratykshh wants to merge 3 commits into
augurlabs:mainfrom
guptapratykshh:refactor-config-location-3547
Closed

guptapratykshh wants to merge 3 commits into
augurlabs:mainfrom
guptapratykshh:refactor-config-location-3547

Conversation

@guptapratykshh

Copy link
Copy Markdown
Contributor

Description
I have changed how the configuration file path is resolved to match the new config directory standards. Instead of using separate CONFIG_LOCATION variable, the system now builds the path using CONFIG_DATADIR. This simplifies docker-compose.yml file by getting rid of unnecessary variables while maintaining backward compatibility.

This PR fixes #3547.

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

Comment thread augur/api/view/init.py Outdated

# load configuration files and initialize globals
configFile = Path(env.setdefault("CONFIG_LOCATION", "config.yml"))
config_location = env["CONFIG_LOCATION"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i dont like the square bracket syntax on env. It seems like this is liable to crash if CONFIG_LOCATION isnt set. Also CONFIG_LOCATION was removed in this PR, so its more likely to be unset

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have updated code to use os.getenv('CONFIG_LOCATION') which returns None safely if variable is unset.

Comment thread augur/api/view/init.py
Comment on lines +11 to +16
if config_location:
configFile = Path(config_location)
elif env["CONFIG_DATADIR"]:
configFile = Path(env["CONFIG_DATADIR"]) / "config.yml"
else:
configFile = Path("config.yml")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Did you choose to have three branches of if/else for backwards compatibility?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes,exactly. The first branch supports legacy CONFIG_LOCATION variable if it is still present, second handles new CONFIG_DATADIR standard, and third provides safe default fallback.

Comment thread augur/api/view/run.sh
@@ -1,4 +1,4 @@
export CONFIG_LOCATION="config.yml"
export CONFIG_DATADIR="."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

im unsure about defaulting this to the current directory. would want to understand where this file is run first.

@sgoggins is this part of a manual install?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, this preserves the exact previous behavior. Since old script exported config.yml (implicitly in the current directory), setting CONFIG_DATADIR='.' ensures new resolution logic still finds ./config.yml in that same location."

Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
@guptapratykshh
guptapratykshh force-pushed the refactor-config-location-3547 branch from ba9d02d to c63d420 Compare January 12, 2026 04:42
@MoralCode

Copy link
Copy Markdown
Contributor

Hello! Just wanted to check in to see if you were still interested in helping the maintainers merge this PR. We noticed it has been a little while since this last had activity, and are considering closing it or taking it over if it remains in its current state.

Please react to or reply to this to confirm your interest in the next 7 days or let us know if you are no longer interested in this so we can best prioritize everyone's contributions.

Thanks!

@MoralCode MoralCode added the stale Stuff that's abandoned or not making forward progress and may need taking over/reassignment/closing label Feb 9, 2026
@sgoggins sgoggins closed this May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Stuff that's abandoned or not making forward progress and may need taking over/reassignment/closing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor the conflg location variable to use the new config directory value instead

3 participants