Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run backend unit tests with postgresql #2551

Merged
merged 1 commit into from
Nov 27, 2024

Run backend unit tests with postgresql

5902339
Select commit
Loading
Failed to load commit list.
Merged

Run backend unit tests with postgresql #2551

Run backend unit tests with postgresql
5902339
Select commit
Loading
Failed to load commit list.
firefoxci-taskcluster / Code Review Bot checks: unit tests succeeded Nov 26, 2024 in 3m 48s

FirefoxCI (pull_request)

Check python code with pytest

Details

View task in Taskcluster | View logs in Taskcluster | View task group in Taskcluster

Task Status

Started: 2024-11-26T15:20:43.280Z
Resolved: 2024-11-26T15:21:17.838Z
Task Execution Time: 34 seconds, 558 milliseconds
Task Status: completed
Reason Resolved: completed
RunId: 0

Artifacts

- public/logs/live_backing.log
- public/logs/live.log


[taskcluster 2024-11-26T15:20:43.321Z] Worker Type (code-analysis-1/linux-gw-gcp) settings:
[taskcluster 2024-11-26T15:20:43.321Z]   {
[taskcluster 2024-11-26T15:20:43.321Z]     "config": {
[taskcluster 2024-11-26T15:20:43.321Z]       "deploymentId": ""
[taskcluster 2024-11-26T15:20:43.321Z]     },
[taskcluster 2024-11-26T15:20:43.321Z]     "generic-worker": {
[taskcluster 2024-11-26T15:20:43.321Z]       "engine": "multiuser",
[taskcluster 2024-11-26T15:20:43.321Z]       "go-arch": "amd64",
[taskcluster 2024-11-26T15:20:43.321Z]       "go-os": "linux",
[taskcluster 2024-11-26T15:20:43.321Z]       "go-version": "go1.22.2",
[taskcluster 2024-11-26T15:20:43.321Z]       "release": "https://github.com/taskcluster/taskcluster/releases/tag/v64.3.0",
[taskcluster 2024-11-26T15:20:43.321Z]       "revision": "b66b6614b9b79077f1bfc78f97afb8c25c0c4b30",
[taskcluster 2024-11-26T15:20:43.321Z]       "source": "https://github.com/taskcluster/taskcluster/commits/b66b6614b9b79077f1bfc78f97afb8c25c0c4b30",
[taskcluster 2024-11-26T15:20:43.321Z]       "version": "64.3.0"
[taskcluster 2024-11-26T15:20:43.321Z]     },
[taskcluster 2024-11-26T15:20:43.321Z]     "image": "projects/taskcluster-imaging/global/images/gw-fxci-gcp-l1-gui-googlecompute-2024-08-22t22-48-09z",
[taskcluster 2024-11-26T15:20:43.321Z]     "instance-id": "6069784911247071354",
[taskcluster 2024-11-26T15:20:43.321Z]     "instance-type": "projects/887720501152/machineTypes/c2-standard-4",
[taskcluster 2024-11-26T15:20:43.321Z]     "local-ipv4": "10.128.0.25",
[taskcluster 2024-11-26T15:20:43.321Z]     "project-id": "fxci-production-level1-workers",

...(207 lines hidden)...

Setting up librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2+b2) ...
Setting up libgdbm-compat4:amd64 (1.23-3) ...
Setting up libsasl2-2:amd64 (2.1.28+dfsg-10) ...
Setting up git-man (1:2.39.5-0+deb12u1) ...
Setting up libssh2-1:amd64 (1.10.0-3+b1) ...
Setting up libperl5.36:amd64 (5.36.0-7+deb12u1) ...
Setting up libldap-2.5-0:amd64 (2.5.13+dfsg-5) ...
Setting up perl (5.36.0-7+deb12u1) ...
Setting up libcurl3-gnutls:amd64 (7.88.1-10+deb12u8) ...
Setting up liberror-perl (0.17029-2) ...
Setting up git (1:2.39.5-0+deb12u1) ...
Processing triggers for libc-bin (2.36-9+deb12u9) ...
+ git clone --quiet https://github.com/La0/code-review /src
+ cd /src
+ git checkout 59023393da811094c53e96160730cffb80e755fb -b checks
Switched to a new branch 'checks'
+ cd /src/tools
+ pip install --disable-pip-version-check --no-cache-dir --quiet .
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
+ cd /src/bot
+ pip install --disable-pip-version-check --no-cache-dir --quiet .
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
+ pip install --disable-pip-version-check --no-cache-dir --quiet -r requirements-dev.txt
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
+ pytest -v
============================= test session starts ==============================
platform linux -- Python 3.12.7, pytest-8.3.3, pluggy-1.5.0 -- /usr/local/bin/python3.12
cachedir: .pytest_cache
rootdir: /src
configfile: pyproject.toml
plugins: structlog-1.1, responses-0.5.1
collecting ... 
collected 115 items                                                            
========================== pytest-structlog settings ===========================
Plugin pytest-structlog is operating in keep mode.
Structlog processor 'merge_contextvars' is kept due to default-keep-list.
Structlog processor 'add_log_level' is kept due to default-keep-list.
Structlog processor 'StackInfoRenderer' is evicted because no configuration kept it.
Structlog processor 'set_exc_info' is evicted because no configuration kept it.
Structlog processor 'TimeStamper' is evicted because no configuration kept it.
Structlog processor 'ConsoleRenderer' is evicted because no configuration kept it.
================================================================================

tests/test_artifacts.py::test_loading_artifacts PASSED                   [  0%]
tests/test_autoland.py::test_revision PASSED                             [  1%]
tests/test_backend.py::test_publication PASSED                           [  2%]
tests/test_backend.py::test_missing_bugzilla_id PASSED                   [  3%]
tests/test_backend.py::test_repo_url PASSED                              [  4%]
tests/test_backend.py::test_changeset_string PASSED                      [  5%]
tests/test_backend.py::test_publication_failures PASSED                  [  6%]
tests/test_backend.py::test_publish_issues PASSED                        [  6%]
tests/test_backend.py::test_publication_skips_rustfmt_dot_path PASSED    [  7%]
tests/test_clang.py::test_expanded_macros PASSED                         [  8%]
tests/test_clang.py::test_as_text PASSED                                 [  9%]
tests/test_clang.py::test_as_dict PASSED                                 [ 10%]
tests/test_clang.py::test_as_markdown PASSED                             [ 11%]
tests/test_clang.py::test_settings PASSED                                [ 12%]
tests/test_clang.py::test_empty_patch[] PASSED                           [ 13%]
tests/test_clang.py::test_empty_patch[    ] PASSED                       [ 13%]
tests/test_clang.py::test_empty_patch[\n] PASSED                         [ 14%]
tests/test_clang.py::test_empty_patch[  \n  ] PASSED                     [ 15%]
tests/test_clang.py::test_missing_clang_format_diff PASSED               [ 16%]
tests/test_clang.py::test_real_patch PASSED                              [ 17%]
tests/test_coverage.py::test_coverage PASSED                             [ 18%]
tests/test_default.py::test_matches[public/code-review/issues.json-True] PASSED [ 19%]
tests/test_default.py::test_matches[private/code-review/issues.json-False] PASSED [ 20%]
tests/test_default.py::test_matches[public/code-review/mozlint.json-False] PASSED [ 20%]
tests/test_default.py::test_parser PASSED                                [ 21%]
tests/test_docupload_task.py::test_build_notice_no_docs_url_artifact PASSED [ 22%]
tests/test_docupload_task.py::test_build_notice_no_trees_artifact PASSED [ 23%]
tests/test_docupload_task.py::test_build_notice_no_documentation_file PASSED [ 24%]
tests/test_docupload_task.py::test_build_notice_more_than_twenty_files PASSED [ 25%]
tests/test_docupload_task.py::test_build_notice_only_one_file PASSED     [ 26%]
tests/test_docupload_task.py::test_build_notice_various_files PASSED     [ 26%]
tests/test_docupload_task.py::test_build_notice_various_files_with_extra_doc_files PASSED [ 27%]
tests/test_hash.py::test_get_hash PASSED                                 [ 28%]
tests/test_hash.py::test_indentation_effect PASSED                       [ 29%]
tests/test_hash.py::test_full_file PASSED                                [ 30%]
tests/test_hash.py::test_incorrect_file_path_no_raise[.] PASSED          [ 31%]
tests/test_hash.py::test_incorrect_file_path_no_raise[..] PASSED         [ 32%]
tests/test_hash.py::test_incorrect_file_path_no_raise[a/../../b] PASSED  [ 33%]
tests/test_issues.py::test_allowed_paths PASSED                          [ 33%]
tests/test_issues.py::test_backend_publication PASSED                    [ 34%]
tests/test_lint.py::test_flake8_checks PASSED                            [ 35%]
tests/test_lint.py::test_as_text PASSED                                  [ 36%]
tests/test_lint.py::test_licence_payload PASSED                          [ 37%]
tests/test_mercurial.py::test_hg_run PASSED                              [ 38%]
tests/test_mercurial.py::test_robustcheckout PASSED                      [ 39%]
tests/test_patch.py::test_publication PASSED                             [ 40%]
tests/test_remote.py::test_no_deps PASSED                                [ 40%]
tests/test_remote.py::test_baseline PASSED                               [ 41%]
tests/test_remote.py::test_no_failed PASSED                              [ 42%]
tests/test_remote.py::test_no_issues PASSED                              [ 43%]
tests/test_remote.py::test_build_status_fail_on_error PASSED             [ 44%]
tests/test_remote.py::test_build_status_pass_on_warning PASSED           [ 45%]
tests/test_remote.py::test_unsupported_analyzer PASSED                   [ 46%]
tests/test_remote.py::test_mozlint_task PASSED                           [ 46%]
tests/test_remote.py::test_clang_tidy_task PASSED                        [ 47%]
tests/test_remote.py::test_clang_format_task PASSED                      [ 48%]
tests/test_remote.py::test_no_tasks PASSED                               [ 49%]
tests/test_remote.py::test_zero_coverage_option PASSED                   [ 50%]
tests/test_remote.py::test_external_tidy_task PASSED                     [ 51%]
tests/test_reporter_debug.py::test_publication PASSED                    [ 52%]
tests/test_reporter_lando.py::test_lando PASSED                          [ 53%]
tests/test_reporter_mail.py::test_conf PASSED                            [ 53%]
tests/test_reporter_mail.py::test_mail PASSED                            [ 54%]
tests/test_reporter_mail.py::test_mail_builderrors PASSED                [ 55%]
tests/test_reporter_phabricator.py::test_phabricator_clang_tidy PASSED   [ 56%]
tests/test_reporter_phabricator.py::test_phabricator_clang_format PASSED [ 57%]
tests/test_reporter_phabricator.py::test_phabricator_mozlint PASSED      [ 58%]
tests/test_reporter_phabricator.py::test_phabricator_coverage PASSED     [ 59%]
tests/test_reporter_phabricator.py::test_phabricator_clang_tidy_and_coverage PASSED [ 60%]
tests/test_reporter_phabricator.py::test_phabricator_analyzers[analyzers_skipped0-valid_issues0-valid_patches0] PASSED [ 60%]
tests/test_reporter_phabricator.py::test_phabricator_analyzers[analyzers_skipped1-valid_issues1-valid_patches1] PASSED [ 61%]
tests/test_reporter_phabricator.py::test_phabricator_analyzers[analyzers_skipped2-valid_issues2-valid_patches2] PASSED [ 62%]
tests/test_reporter_phabricator.py::test_phabricator_clang_tidy_build_error PASSED [ 63%]
tests/test_reporter_phabricator.py::test_full_file PASSED                [ 64%]
tests/test_reporter_phabricator.py::test_task_failures PASSED            [ 65%]
tests/test_reporter_phabricator.py::test_extra_errors PASSED             [ 66%]
tests/test_reporter_phabricator.py::test_phabricator_notices PASSED      [ 66%]
tests/test_reporter_phabricator.py::test_phabricator_tgdiff PASSED       [ 67%]
tests/test_reporter_phabricator.py::test_phabricator_external_tidy PASSED [ 68%]
tests/test_reporter_phabricator.py::test_phabricator_newer_diff PASSED   [ 69%]
tests/test_reporter_phabricator.py::test_phabricator_former_diff_comparison PASSED [ 70%]
tests/test_reporter_phabricator.py::test_phabricator_before_after_comment PASSED [ 71%]
tests/test_revisions.py::test_phabricator PASSED                         [ 72%]
tests/test_revisions.py::test_autoland PASSED                            [ 73%]
tests/test_revisions.py::test_clang_files PASSED                         [ 73%]
tests/test_revisions.py::test_analyze_patch PASSED                       [ 74%]
tests/test_revisions.py::test_bugzilla_id PASSED                         [ 75%]
tests/test_revisions.py::test_revision_before_after PASSED               [ 76%]
tests/test_stats.py::test_base_stats PASSED                              [ 77%]
tests/test_tgdiff_task.py::test_load_artifacts_no_summary PASSED         [ 78%]
tests/test_tgdiff_task.py::test_load_artifacts_ok_summary PASSED         [ 79%]
tests/test_tgdiff_task.py::test_load_artifacts_warning_summary PASSED    [ 80%]
tests/test_tools.py::test_taskcluster_service PASSED                     [ 80%]
tests/test_tools.py::test_remove_color_codes PASSED                      [ 81%]
tests/test_workflow.py::test_taskcluster_index PASSED                    [ 82%]
tests/test_workflow.py::test_build_task[source-test-clang-tidy-ClangTidyTask-False] PASSED [ 83%]
tests/test_workflow.py::test_build_task[source-test-clang-tidy-ClangTidyTask-True] PASSED [ 84%]
tests/test_workflow.py::test_build_task[source-test-clang-external-ExternalTidyTask-False] PASSED [ 85%]
tests/test_workflow.py::test_build_task[source-test-clang-external-ExternalTidyTask-True] PASSED [ 86%]
tests/test_workflow.py::test_build_task[source-test-mozlint-eslint-MozLintTask-False] PASSED [ 86%]
tests/test_workflow.py::test_build_task[source-test-mozlint-eslint-MozLintTask-True] PASSED [ 87%]
tests/test_workflow.py::test_build_task[source-test-mozlint-whatever-MozLintTask-False] PASSED [ 88%]
tests/test_workflow.py::test_build_task[source-test-mozlint-whatever-MozLintTask-True] PASSED [ 89%]
tests/test_workflow.py::test_build_task[source-test-clang-format-ClangFormatTask-False] PASSED [ 90%]
tests/test_workflow.py::test_build_task[source-test-clang-format-ClangFormatTask-True] PASSED [ 91%]
tests/test_workflow.py::test_build_task[source-test-taskgraph-diff-TaskGraphDiffTask-False] PASSED [ 92%]
tests/test_workflow.py::test_build_task[source-test-taskgraph-diff-TaskGraphDiffTask-True] PASSED [ 93%]
tests/test_workflow.py::test_build_task[source-test-unsupported-None-False] PASSED [ 93%]
tests/test_workflow.py::test_build_task[source-test-unsupported-None-True] PASSED [ 94%]
tests/test_workflow.py::test_on_production PASSED                        [ 95%]
tests/test_workflow.py::test_before_after PASSED                         [ 96%]
tools/test_validator.py::test_top_struct PASSED                          [ 97%]
tools/test_validator.py::test_dict_struct PASSED                         [ 98%]
tools/test_validator.py::test_paths PASSED                               [ 99%]
tools/test_validator.py::test_issues PASSED                              [100%]

=============================== warnings summary ===============================
../../usr/local/lib/python3.12/site-packages/code_review_bot/config.py:14
  /usr/local/lib/python3.12/site-packages/code_review_bot/config.py:14: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

../../usr/local/lib/python3.12/site-packages/influxdb/line_protocol.py:16
  /usr/local/lib/python3.12/site-packages/influxdb/line_protocol.py:16: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
    EPOCH = UTC.localize(datetime.utcfromtimestamp(0))

tests/test_artifacts.py:10
  /src/bot/tests/test_artifacts.py:10: PytestCollectionWarning: cannot collect test class 'TestTask' because it has a __init__ constructor (from: bot/tests/test_artifacts.py)
    class TestTask(AnalysisTask):

bot/tests/test_default.py: 10 warnings
bot/tests/test_remote.py: 109 warnings
bot/tests/test_reporter_phabricator.py: 36 warnings
bot/tests/test_revisions.py: 2 warnings
bot/tests/test_stats.py: 1 warning
bot/tests/test_workflow.py: 2 warnings
  /usr/local/lib/python3.12/site-packages/code_review_bot/stats.py:56: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    "time": datetime.utcnow().isoformat(),

bot/tests/test_patch.py::test_publication
  /usr/local/lib/python3.12/site-packages/taskcluster/helper.py:168: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    "expires": stringDate(datetime.datetime.utcnow() + ttl),

bot/tests/test_workflow.py::test_taskcluster_index
  /usr/local/lib/python3.12/site-packages/code_review_bot/workflow.py:305: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    now = datetime.utcnow()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
====================== 115 passed, 165 warnings in 1.28s =======================
2024-11-26 15:21:17 [info     ] Flushing stats metrics         nb=2
[taskcluster 2024-11-26T15:21:17.521Z]    Exit Code: 0
[taskcluster 2024-11-26T15:21:17.521Z]    User Time: 3.258065s
[taskcluster 2024-11-26T15:21:17.521Z]  Kernel Time: 813.094ms
[taskcluster 2024-11-26T15:21:17.521Z]    Wall Time: 33.432509174s
[taskcluster 2024-11-26T15:21:17.521Z]       Result: SUCCEEDED
[taskcluster 2024-11-26T15:21:17.521Z] === Task Finished ===
[taskcluster 2024-11-26T15:21:17.521Z] Task Duration: 33.432972615s
[taskcluster 2024-11-26T15:21:17.588Z] Uploading link artifact public/logs/live.log to artifact public/logs/live_backing.log with expiry 2025-11-26T16:17:30.227Z