Skip to content

[AtomDB] Remove ENV VARS#1071

Open
ccgsnet wants to merge 3 commits intomasterfrom
remove-env-vars
Open

[AtomDB] Remove ENV VARS#1071
ccgsnet wants to merge 3 commits intomasterfrom
remove-env-vars

Conversation

@ccgsnet
Copy link
Copy Markdown
Collaborator

@ccgsnet ccgsnet commented Apr 13, 2026

This PR removes the ENV VARs from the code base (mostly regarding AtomDB).
The idea is getting those values from a give JsonConfig now.
Where we once used default/test values, I created a helper functions to build a JsonConfig object with those values.

TODO: bus_client is still not using the "param" section from the JsonConfig, that will be implemented in a following PR.

@ccgsnet ccgsnet self-assigned this Apr 13, 2026
@ccgsnet ccgsnet requested a review from andre-senna April 15, 2026 14:07

## **Prerequisites**

Before running the Context Broker, ensure that the following environment variables are properly exported (or set in `.env` file):
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.

Just checking... Nothing to add to the README after these changes?


## **Prerequisites**

Before running the Query Agent, ensure that the following environment variables are properly exported:
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.

Just checking... Nothing to add to the README after these changes?

~AtomDBSingleton() {}
static void init(
atomdb_api_types::ATOMDB_TYPE atomdb_type = atomdb_api_types::ATOMDB_TYPE::REDIS_MONGODB);
static void init(atomdb_api_types::ATOMDB_TYPE atomdb_type,
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.

Why do we need to pass atomdb_type separately? Isn't it in the JSON?

} No newline at end of file
}

commons::JsonConfig Helper::default_atomdb_json_config() {
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.

Why do we need such a default JSON? And why does it have only MongoDB configuration?
If possible, I'd prefer not having a default JSON at all, forcing the caller to always explicitly using one.

Comment thread src/main/bus_client.cc

#include "FitnessFunctionRegistry.h"
#include "Helper.h"
#include "JsonConfigParser.h"
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.

Skipping the revision of this because I understand it will change after the discussion we had in our team sync call earlier today.

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.

2 participants