Skip to content
Closed
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ jobs:
brew install fish
- name: Install dependencies
run: python -m pip install --upgrade nox pdm
- name: Run unit tests
run: nox -vs unit -p ${{ matrix.python-version }}
# - name: Run unit tests
# run: nox -vs unit -p ${{ matrix.python-version }}
- name: Run integration tests (without secrets)
run: nox -vs integration -p ${{ matrix.python-version }} -- -m "not require_secrets"
- name: Run integration tests (with secrets)
Expand Down
1 change: 1 addition & 0 deletions changelog.d/+ci_workflow_id.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add node description log in ci.
23 changes: 13 additions & 10 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,11 @@ def run_integration_test(session, pytest_posargs):
'test/integration',
'-n',
'2' if CI else 'auto',
'-s',
'--log-level',
'INFO',
'ERROR',
'--log-cli-level',
'error',
'-W',
'ignore::DeprecationWarning:rst2ansi.visitor:',
*PYTEST_GLOBAL_ARGS,
Expand Down Expand Up @@ -278,15 +281,15 @@ def test(session):
@nox.session(python=PYTHON_DEFAULT_VERSION)
def cleanup_buckets(session):
"""Remove buckets from previous test runs."""
pdm_install(session, 'test')
session.run(
'pytest',
'-s',
'-x',
*PYTEST_GLOBAL_ARGS,
*session.posargs,
'test/integration/cleanup_buckets.py',
)
# pdm_install(session, 'test')
# session.run(
# 'pytest',
# '-s',
# '-x',
# *PYTEST_GLOBAL_ARGS,
# *session.posargs,
# 'test/integration/cleanup_buckets.py',
# )


@nox.session
Expand Down
19 changes: 13 additions & 6 deletions test/integration/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,19 @@ def get_seed() -> str:
os.getenv('WORKFLOW_ID', secrets.token_hex(8)),
NODE_DESCRIPTION,
str(time.time_ns()),
os.getenv('PYTEST_XDIST_WORKER', 'gw0'),
os.getenv('PYTEST_XDIST_WORKER', 'master'),
)
)
return sha256(seed.encode()).hexdigest()[:16]
logger.error('RNG seed (raw): %s', seed)

seed_hash = sha256(seed.encode()).hexdigest()[:16]

logger.error('WORKFLOW_ID: %s', os.getenv('WORKFLOW_ID'))
logger.error('NODE_DESCRIPTION: %s', NODE_DESCRIPTION)
logger.error('PYTEST_XDIST_WORKER: %s', os.getenv('PYTEST_XDIST_WORKER'))
logger.error('RNG seed (hashed): %s', seed_hash)

return seed_hash


RNG_SEED = get_seed()
Expand Down Expand Up @@ -126,10 +135,8 @@ def bucket_name_part(length: int) -> str:
global RNG_COUNTER
RNG_COUNTER += 1
name_part = random_token(length, BUCKET_NAME_CHARS_UNIQ)
logger.info('RNG_SEED: %s', RNG_SEED)
logger.info('RNG_COUNTER: %i, length: %i', RNG_COUNTER, length)
logger.info('name_part: %s', name_part)
logger.info('WORKFLOW_ID: %s', os.getenv('WORKFLOW_ID'))
logger.error('RNG_COUNTER: %i, length: %i', RNG_COUNTER, length)
logger.error('name_part: %s', name_part)
return name_part


Expand Down
Loading