Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .ci/auth_requirements
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
python-ldap==2.4.22.0
python-pam==1.8.2
1 change: 1 addition & 0 deletions .ci/basic_python_requirements
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
sqlalchemy==1.0.9
alembic==0.8.2
thrift==0.9.1
portalocker=1.0.0
1 change: 1 addition & 0 deletions .ci/python_requirements
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ alembic==0.8.2
psycopg2==2.5.4
pg8000==1.10.2
thrift==0.9.1
portalocker==1.0.0
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,5 @@ See user guide for further configuration and check options.
[Test documentation](tests/functional/package_test.md)

[Database schema migration](docs/db_schema_guide.md)

[Privileged server and authentication in client](docs/authentication.md)
9 changes: 9 additions & 0 deletions build_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,15 @@ def generate_thrift_files(thrift_files_dir, env, silent=True):
LOG.error('Failed to generate viewer server files')
return ret

auth_thrift = os.path.join(thrift_files_dir, 'authentication.thrift')
auth_thrift = 'authentication.thrift'
auth_cmd = ['thrift', '-r', '-I', '.',
'--gen', 'py', auth_thrift]
ret = run_cmd(auth_cmd, thrift_files_dir, env, silent=silent)
if ret:
LOG.error('Failed to generate authentication interface files')
return ret
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.

There seems to be some repetition. Does a local function make this code shorter overall?

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.

So far we generated the source files with Thrift files differently for the report server (python only) and the report viewer (python and javascript). The authentication is python only which could be refactored into a separate function with the report server source file generation. I'm not sure it will be so much shorter, right now the generate_thrift_files function is not that long. If you think it is better you can refactor it into a separate function.



# -------------------------------------------------------------------
def generate_documentation(doc_root, env, silent=True):
Expand Down
3 changes: 2 additions & 1 deletion codechecker_lib/arg_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from codechecker_lib import host_check
from codechecker_lib import log_parser
from codechecker_lib import logger
from codechecker_lib import session_manager
from codechecker_lib import util
from codechecker_lib.analyzers import analyzer_types
from codechecker_lib.database_handler import SQLServer
Expand Down Expand Up @@ -118,6 +119,7 @@ def handle_server(args):

context = generic_package_context.get_context()
context.codechecker_workspace = workspace
session_manager.SessionManager.CodeChecker_Workspace = workspace
context.db_username = args.dbusername

check_env = analyzer_env.get_check_env(context.path_env_extra,
Expand Down Expand Up @@ -437,7 +439,6 @@ def handle_plist(args):
finally:
pool.join()


def handle_version_info(args):
"""
Get and print the version information from the
Expand Down
Loading