Skip to content

Commit 5a3783d

Browse files
committed
WIP
1 parent c858fef commit 5a3783d

File tree

4 files changed

+47
-32
lines changed

4 files changed

+47
-32
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -50,30 +50,30 @@ jobs:
5050
run: python -m pip install --upgrade nox pdm
5151
- name: Build the distribution
5252
run: nox -vs build
53-
cleanup_buckets:
54-
timeout-minutes: 30
55-
needs: lint
56-
env:
57-
B2_TEST_APPLICATION_KEY: ${{ secrets.B2_TEST_APPLICATION_KEY }}
58-
B2_TEST_APPLICATION_KEY_ID: ${{ secrets.B2_TEST_APPLICATION_KEY_ID }}
59-
runs-on: ubuntu-latest
60-
steps:
61-
- uses: actions/checkout@v4
62-
if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }} # TODO: skip this whole job instead
63-
with:
64-
fetch-depth: 0
65-
- name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }}
66-
if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }} # TODO: skip this whole job instead
67-
uses: actions/setup-python@v5
68-
with:
69-
python-version: ${{ env.PYTHON_DEFAULT_VERSION }}
70-
cache: "pip"
71-
- name: Install dependencies
72-
if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }} # TODO: skip this whole job instead
73-
run: python -m pip install --upgrade nox pdm
74-
- name: Find and remove old buckets
75-
if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }} # TODO: skip this whole job instead
76-
run: nox -vs cleanup_buckets
53+
# cleanup_buckets:
54+
# timeout-minutes: 30
55+
# needs: lint
56+
# env:
57+
# B2_TEST_APPLICATION_KEY: ${{ secrets.B2_TEST_APPLICATION_KEY }}
58+
# B2_TEST_APPLICATION_KEY_ID: ${{ secrets.B2_TEST_APPLICATION_KEY_ID }}
59+
# runs-on: ubuntu-latest
60+
# steps:
61+
# - uses: actions/checkout@v4
62+
# if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }} # TODO: skip this whole job instead
63+
# with:
64+
# fetch-depth: 0
65+
# - name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }}
66+
# if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }} # TODO: skip this whole job instead
67+
# uses: actions/setup-python@v5
68+
# with:
69+
# python-version: ${{ env.PYTHON_DEFAULT_VERSION }}
70+
# cache: "pip"
71+
# - name: Install dependencies
72+
# if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }} # TODO: skip this whole job instead
73+
# run: python -m pip install --upgrade nox pdm
74+
# - name: Find and remove old buckets
75+
# if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }} # TODO: skip this whole job instead
76+
# run: nox -vs cleanup_buckets
7777
test:
7878
timeout-minutes: 90
7979
needs: cleanup_buckets
@@ -123,8 +123,8 @@ jobs:
123123
brew install fish
124124
- name: Install dependencies
125125
run: python -m pip install --upgrade nox pdm
126-
- name: Run unit tests
127-
run: nox -vs unit -p ${{ matrix.python-version }}
126+
# - name: Run unit tests
127+
# run: nox -vs unit -p ${{ matrix.python-version }}
128128
- name: Run integration tests (without secrets)
129129
run: nox -vs integration -p ${{ matrix.python-version }} -- -m "not require_secrets"
130130
- name: Run integration tests (with secrets)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add node description log in ci.

noxfile.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,11 @@ def run_integration_test(session, pytest_posargs):
231231
'test/integration',
232232
'-n',
233233
'2' if CI else 'auto',
234+
'-s',
234235
'--log-level',
235-
'INFO',
236+
'ERROR',
237+
'--log-cli-level',
238+
'error',
236239
'-W',
237240
'ignore::DeprecationWarning:rst2ansi.visitor:',
238241
*PYTEST_GLOBAL_ARGS,

test/integration/helpers.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,16 @@ def get_seed() -> str:
8787
os.getenv('PYTEST_XDIST_WORKER', 'gw0'),
8888
)
8989
)
90-
return sha256(seed.encode()).hexdigest()[:16]
90+
logger.error('RNG seed (raw): %s', seed)
91+
92+
seed_hash = sha256(seed.encode()).hexdigest()[:16]
93+
94+
logger.error('WORKFLOW_ID: %s', os.getenv('WORKFLOW_ID'))
95+
logger.error('NODE_DESCRIPTION: %s', NODE_DESCRIPTION)
96+
logger.error('PYTEST_XDIST_WORKER: %s', os.getenv('PYTEST_XDIST_WORKER'))
97+
logger.error('RNG seed (hashed): %s', seed_hash)
98+
99+
return seed_hash
91100

92101

93102
RNG_SEED = get_seed()
@@ -126,10 +135,12 @@ def bucket_name_part(length: int) -> str:
126135
global RNG_COUNTER
127136
RNG_COUNTER += 1
128137
name_part = random_token(length, BUCKET_NAME_CHARS_UNIQ)
129-
logger.info('RNG_SEED: %s', RNG_SEED)
130-
logger.info('RNG_COUNTER: %i, length: %i', RNG_COUNTER, length)
131-
logger.info('name_part: %s', name_part)
132-
logger.info('WORKFLOW_ID: %s', os.getenv('WORKFLOW_ID'))
138+
139+
if 'PYTEST_XDIST_WORKER' not in os.environ:
140+
raise RuntimeError('PYTEST_XDIST_WORKER is not set')
141+
142+
logger.error('RNG_COUNTER: %i, length: %i', RNG_COUNTER, length)
143+
logger.error('name_part: %s', name_part)
133144
return name_part
134145

135146

0 commit comments

Comments
 (0)