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

Check time-dependent tests on CI worker #737

Closed
wants to merge 164 commits into from
Closed

Conversation

jmarshall
Copy link
Contributor

@jmarshall jmarshall commented Apr 22, 2024

Running these tests locally in a timezone well ahead of UTC gives:

test/test_sequencing_groups.py::TestSequencingGroup::test_query_with_creation_date 
date.today()=datetime.date(2024, 4, 23)
Tue 23 Apr 2024 11:27:01 NZST
FAILED
test/test_sequencing_groups.py::TestSequencingGroup::test_query_with_creation_date_UTC sample_to_insert=SampleUpsertInternal(id=None, external_id='EX_ID', meta={}, project=None, type=None, participant_id=None, active=None, sequencing_groups=[SequencingGroupUpsertInternal(id=None, type='genome', technology='short-read', platform='ILLUMINA', meta={'meta-key': 'meta-value'}, sample_id=None, external_ids={}, assays=[AssayUpsertInternal(id=None, type='sequencing', external_ids={}, sample_id=None, meta={'sequencing_type': 'genome', 'sequencing_platform': 'short-read', 'sequencing_technology': 'illumina'})])], non_sequencing_assays=None)

bad: today_bad=datetime.date(2024, 4, 23) type(today_bad)=<class 'datetime.date'>
good: today=datetime.date(2024, 4, 22) type(today)=<class 'datetime.date'>
sgs=[]
PASSED

Context: https://centrepopgen.slack.com/archives/C03FZL2EF24/p1713493526442429

… … …

And the output from CI is:

date.today()=datetime.date(2024, 4, 22)
date command: Mon Apr 22 23:43:14 UTC 2024

sample_to_insert=SampleUpsertInternal(id=None, external_id='EX_ID', meta={}, project=None, type=None, participant_id=None, active=None, sequencing_groups=[SequencingGroupUpsertInternal(id=None, type='genome', technology='short-read', platform='ILLUMINA', meta={'meta-key': 'meta-value'}, sample_id=None, external_ids={}, assays=[AssayUpsertInternal(id=None, type='sequencing', external_ids={}, sample_id=None, meta={'sequencing_type': 'genome', 'sequencing_platform': 'short-read', 'sequencing_technology': 'illumina'})])], non_sequencing_assays=None)
bad: today_bad=datetime.date(2024, 4, 22) type(today_bad)=<class 'datetime.date'>
good: today=datetime.date(2024, 4, 22) type(today)=<class 'datetime.date'>
sgs=[]

This largely confirms the theory that tests never failed like this in CI because the workers run in UTC, so there is never this yesterday confusion.

vivbak and others added 26 commits April 16, 2024 09:55
…m rich to raw, to be on the route. Handle raw ids only from layers onward. Update tests accordingly
@jmarshall jmarshall marked this pull request as draft April 22, 2024 23:29
@jmarshall jmarshall closed this Apr 23, 2024
@jmarshall jmarshall deleted the check-tests-on-CI-worker branch April 23, 2024 00:24
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.

3 participants