Skip to content

Refactor config loading mechanism - #75

Open
lforchini wants to merge 1 commit into
test/read-fake-procfrom
test/refactor-config-loading
Open

lforchini wants to merge 1 commit into
test/read-fake-procfrom
test/refactor-config-loading

Conversation

@lforchini

Copy link
Copy Markdown
Collaborator

Fixed a bug where the util::Path prefix was appended twice in some
cases, and also consolidated config loading into a single function.
It attempts to read the config file and falls back the a default
implementation if not found.

Signed-off-by: Leonardo Forchini leonardo.forchini@nutanix.com


Stack created with GitHub Stacks CLI • Give Feedback 💬

@lforchini
lforchini added this pull request to stack #83 October 1, 2026 14:37
@lforchini
lforchini force-pushed the test/refactor-config-loading branch from 74da0ec to 703d3ea Compare October 1, 2026 14:48
@lforchini
lforchini removed this pull request from stack #83 October 1, 2026 14:50
@lforchini
lforchini added this pull request to stack #84 October 1, 2026 14:50
@lforchini
lforchini force-pushed the test/refactor-config-loading branch from 703d3ea to 91e6361 Compare October 5, 2026 08:10
@lforchini
lforchini removed this pull request from stack #84 October 5, 2026 08:12
@lforchini
lforchini added this pull request to stack #87 October 5, 2026 08:16
@lforchini
lforchini marked this pull request as ready for review October 5, 2026 08:25
@lforchini
lforchini force-pushed the test/refactor-config-loading branch from 91e6361 to 8edfe60 Compare October 5, 2026 08:50
@lforchini
lforchini force-pushed the test/refactor-config-loading branch from 8edfe60 to 9c5ecd0 Compare October 8, 2026 07:30
@lforchini
lforchini removed this pull request from stack #87 October 8, 2026 15:22
@lforchini
lforchini force-pushed the test/refactor-config-loading branch from 9c5ecd0 to ecb32ff Compare October 8, 2026 15:23
@lforchini
lforchini added this pull request to stack #88 October 8, 2026 15:23
@lforchini
lforchini removed this pull request from stack #88 October 13, 2026 12:32
@lforchini
lforchini force-pushed the test/refactor-config-loading branch from ecb32ff to afac66f Compare October 13, 2026 12:43
@lforchini
lforchini added this pull request to stack #95 October 13, 2026 12:44
@lforchini
lforchini force-pushed the test/refactor-config-loading branch from afac66f to f1b373f Compare October 13, 2026 13:17
@lforchini
lforchini force-pushed the test/refactor-config-loading branch 2 times, most recently from c353351 to 31314b7 Compare October 13, 2026 14:02

@tmakatos tmakatos left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you explain what problem the refactor solves?

@lforchini

Copy link
Copy Markdown
Collaborator Author

Sure, there's two separate bugs: one is that it would apply the prefix mechanism twice, and secondly I consolidated the three config loading mechanisms into a single one that falls back onto a default config if it's not found. addressing this todo: // TODO TOCTOU, blindly load and return default if ENOENT.

@lforchini
lforchini removed this pull request from stack #95 October 21, 2026 08:27
Instead of having three separate implementations of 'try to load, use
default if ENOENT', introduce a canonical config loading function.

Signed-off-by: Leonardo Forchini <leonardo.forchini@nutanix.com>
@lforchini
lforchini added this pull request to stack #152 October 23, 2026 08:22
@lforchini
lforchini force-pushed the test/refactor-config-loading branch from 31314b7 to 82c32e8 Compare October 23, 2026 08:24
@lforchini
lforchini force-pushed the test/refactor-config-loading branch from 82c32e8 to e3d51c4 Compare October 23, 2026 08:39
@lforchini
lforchini removed this pull request from stack #152 October 23, 2026 08:44
@lforchini
lforchini added this pull request to stack #157 October 23, 2026 08:45
@lforchini
lforchini removed this pull request from stack #157 October 23, 2026 08:49
@lforchini
lforchini added this pull request to stack #159 October 23, 2026 08:50
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