Skip to content

Rework concourse_unit_test_task#41

Merged
stanislav-zaprudskiy merged 12 commits into2025.1-cherry-picksfrom
rework_concourse_unit_test_task
Nov 27, 2025
Merged

Rework concourse_unit_test_task#41
stanislav-zaprudskiy merged 12 commits into2025.1-cherry-picksfrom
rework_concourse_unit_test_task

Conversation

@stanislav-zaprudskiy
Copy link
Copy Markdown
Collaborator

@stanislav-zaprudskiy stanislav-zaprudskiy commented Nov 27, 2025

Targets #38

The primary motivation was 072411c. And the rest was just revisiting and tidying up of the legacy.

Concourse executes it similar to the command below, which was also used for testing of this PR:

docker run \
  --rm -v "$PWD:/source" \
  keppel.eu-de-1.cloud.sap/ccloud/loci-base@sha256:29a1941c2d3567c032cc728db3351bbd1abc63baf91396967d44edce6089ff4d \
    /bin/bash source/concourse_unit_test_task

which returns the following at the end

======
Totals
======
Ran: 5724 tests in 202.1000 sec.
 - Passed: 5007
 - Skipped: 715
 - Expected Fail: 2
 - Unexpected Success: 0
 - Failed: 0
Sum of execute time for each test: 1572.0050 sec.

==============
Worker Balance
==============
 - Worker 0 (715 tests) => 0:03:13.756570
 - Worker 1 (715 tests) => 0:03:16.585094
 - Worker 2 (714 tests) => 0:03:18.076878
 - Worker 3 (716 tests) => 0:03:15.814063
 - Worker 4 (716 tests) => 0:03:18.727677
 - Worker 5 (718 tests) => 0:03:22.010053
 - Worker 6 (715 tests) => 0:03:16.453368
 - Worker 7 (715 tests) => 0:03:17.182137
  py312: OK (324.87=setup[102.91]+cmd[221.96] seconds)
  congratulations :) (325.07 seconds)

It doesn't cause failures without the argument.
Concourse already has the repo version to be tested cloned under
`source` path.
Executing without memcached doesn't change the number of tests and the
outcome.
It looks like runtime parameter, not changing tests behavior.
It doesn't have to be one-line, given the way Concourse runs it.

But working with it as with a regular script is much easier in
development and testing.
Installing them on Ubunbut 24.04 fails -
https://stackoverflow.com/a/75696359. Whereas an alternative option
could be to use `--break-system-packages` - which is less nicer than
venv IMHO.
Upstream tests run with v4+, and our could too.
The OS requirements packages change over time (some of which are no
longer relevant for e.g. Ubuntu 24.04), and are maintained in
`bindep.txt`. So just install them with `bindep`, similar to how Zuul
does that upstream
- https://opendev.org/zuul/zuul-jobs/src/branch/master/roles/bindep/tasks/packages.yaml.

The disadvantage could be that it could install more than required -
e.g. mysql, postgresql or graphviz, which we don't need for our test
run.
Without `safe.directory` it fails to use `git` under `/source`, and
fails to recognize pbr version correspondingly
(https://docs.openstack.org/pbr/latest/user/features.html#version).
With or without them the number of executed tests and the outcome are
the same. Not sure why so - needs more investigation. But just maintain
them as in the documentation -
https://docs.openstack.org/keystone/latest/contributor/testing-keystone.html#ldap-tests
This is to make sure that it won't succeed in case the interpreter could
not be found.
@stanislav-zaprudskiy stanislav-zaprudskiy changed the title rework concourse unit test task Rework concourse_unit_test_task Nov 27, 2025
@stanislav-zaprudskiy stanislav-zaprudskiy marked this pull request as ready for review November 27, 2025 10:16
@stanislav-zaprudskiy stanislav-zaprudskiy merged commit 7f2f18c into 2025.1-cherry-picks Nov 27, 2025
0 of 3 checks passed
@stanislav-zaprudskiy stanislav-zaprudskiy deleted the rework_concourse_unit_test_task branch November 27, 2025 11:55
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.

1 participant