Conversation
gyorb
left a comment
There was a problem hiding this comment.
We should check if in the workspace there is a deprecated session_config. In the current case if the newer server is started a server_config will be created and used. The configuration options in the previous session_config will be lost and not used. At least we should warn the user to check the new configuration and set the config values if needed.
| 'Storage of ' + name + ' is already going!') | ||
|
|
||
| max_run_count = self.__manager.get_max_run_count() | ||
| # If max_run_count is not set in the config file, it will allows |
7255a65 to
49a9e1c
Compare
docs/server_config.md
Outdated
| The `max_run_count` section of the config file controls the maximum storable | ||
| runs. | ||
|
|
||
| If this field is not presented in the config file or the value of this |
docs/server_config.md
Outdated
| * [Authentication](#authentication) | ||
|
|
||
| ## Run limitation | ||
| The `max_run_count` section of the config file controls the maximum storable |
There was a problem hiding this comment.
"Maximum storable" can be misinterpreted with the meaning of "concurrent storage operations running at once".
libcodechecker/session_manager.py
Outdated
| scfg_dict = {} | ||
| try: | ||
| with open(session_cfg_file, 'r') as scfg: | ||
| with open(server_cfg_file, 'r') as scfg: |
There was a problem hiding this comment.
We are having more and more JSON files to store configurations. I wonder if we do have a utility that loads such file and handle the errors somewhere or in case we don't it might be worth to have one and reduce code duplication.
There was a problem hiding this comment.
This isn't "more and more" file, the file just got renamed and added some extra configuration variables. My staled patch, #1172, contains a utility function that allows you to load a JSON file and get a default dict if the loading failed.
49a9e1c to
8d4abdf
Compare
whisperity
left a comment
There was a problem hiding this comment.
Two minor comments, the rest looks good.
| print(str(reqfailure)) | ||
|
|
||
| raise | ||
| exit(0) |
There was a problem hiding this comment.
Why is this change neccessary? Is it really a good idea to not let the client code who issued the Thrift req do any sort of error management or prompt the user to give a proper request (e.g. if run name is bogus or something)?
tests/libtest/env.py
Outdated
| """ | ||
|
|
||
| session_config_filename = "session_config.json" | ||
| session_config_filename = "server_config.json" |
There was a problem hiding this comment.
Variable name remained the same, leading to possible confusion.
8d4abdf to
8cef9f6
Compare
a54adef to
ced3920
Compare
* Rename session_config.json to server_config.json.
ced3920 to
c0856a4
Compare
tests/libtest/env.py
Outdated
|
|
||
| with open(session_cfg_file, 'r+') as scfg: | ||
| with open(server_cfg_file, 'r+') as scfg: | ||
| __scfg_original = scfg.read() |
There was a problem hiding this comment.
Can't we use load_json_or_empty here? Do we need the seek and __scfg_original?
There was a problem hiding this comment.
Also, do we use scfg for anything at all below?
There was a problem hiding this comment.
Doesn't seem like it. This is a copy from the real session manager file, in which case it was used.
c0856a4 to
7898d6d
Compare
7898d6d to
a5119f0
Compare
Closes #1187