Skip to content

Rework config_directory#4645

Merged
bruntib merged 1 commit intoEricsson:masterfrom
barnabasdomozi:config_directory_rework
Aug 15, 2025
Merged

Rework config_directory#4645
bruntib merged 1 commit intoEricsson:masterfrom
barnabasdomozi:config_directory_rework

Conversation

@barnabasdomozi
Copy link
Copy Markdown
Collaborator

@barnabasdomozi barnabasdomozi commented Jul 28, 2025

In this PR, I reworked --config-directory and --workspace settings. The current behavior is that these parameters are essentially the same.

PR changes:
Server configuration files and SSL certs are now stored in --config-directory, while SQLite databases, logs, temporary files in --workspace.

If --config-directory is not set, it will be the same as --workspace.

For the review: args.dbdatadir was also removed since I haven't found any usage of that in the entire codebase.

@barnabasdomozi barnabasdomozi added CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands server 🖥️ python Pull requests that update Python code (used by DependaBot) refactoring 😡 ➡️ 🙂 Refactoring code. labels Jul 28, 2025
@barnabasdomozi barnabasdomozi force-pushed the config_directory_rework branch 2 times, most recently from 89a72aa to b0f6e74 Compare August 12, 2025 13:42
@barnabasdomozi barnabasdomozi marked this pull request as draft August 12, 2025 14:40
@barnabasdomozi barnabasdomozi force-pushed the config_directory_rework branch 3 times, most recently from cd76656 to 9c53e2b Compare August 12, 2025 16:17
@barnabasdomozi barnabasdomozi marked this pull request as ready for review August 12, 2025 16:39
Copy link
Copy Markdown
Contributor

@bruntib bruntib left a comment

Choose a reason for hiding this comment

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

Please, write a short description in the commit message about the motivation of this change. Thank you!

Comment thread web/server/codechecker_server/cli/server.py Outdated
LOG.debug("Initializing HTTP server...")

self.config_directory = config_directory
self.workspace_directory = workspace_directory
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 does this class need the workspace directory?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It is used by the ThriftProductHandler class, for example on line 297 in file product_server.py.

Currently, --config-directory and --workspace parameters are essentially
the same for CodeChecker server.

The new behaviour is to have a separate config directory where
configuration files and SSL certs are stored, while SQLite
databases, server logs and temporary files remain in the
workspace directory.

To remain compatible, if --config-directory is not specified, it will be
the same as --workspace.
@barnabasdomozi barnabasdomozi force-pushed the config_directory_rework branch from 9c53e2b to ce73536 Compare August 13, 2025 09:44
@barnabasdomozi
Copy link
Copy Markdown
Collaborator Author

@bruntib

Please, write a short description in the commit message about the motivation of this change. Thank you!

Done in commit ce73536

@bruntib bruntib merged commit c15abc8 into Ericsson:master Aug 15, 2025
7 of 9 checks passed
@barnabasdomozi barnabasdomozi deleted the config_directory_rework branch August 25, 2025 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands python Pull requests that update Python code (used by DependaBot) refactoring 😡 ➡️ 🙂 Refactoring code. server 🖥️

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants