-
Notifications
You must be signed in to change notification settings - Fork 114
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
Assertion Error, time delta/format in 'wait_for_sync()', of capsule content 'last_sync_time' #14066
Conversation
trigger: test-robottelo |
PRT Result
|
783323d
to
7dc583c
Compare
trigger: test-robottelo |
7dc583c
to
9949945
Compare
PRT Result
|
940efbe
to
1b83c35
Compare
trigger: test-robottelo |
PRT Result
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left two comments, those things seem weird to me.
Conceptually this LGTM.
PRT needs to pass.
1b83c35
to
76ec135
Compare
trigger: test-robottelo |
PRT Result
|
76ec135
to
9e3ed99
Compare
trigger: test-robottelo |
PRT Result
|
9e3ed99
to
1b863a9
Compare
trigger: test-robottelo |
f8db636
to
f5b8cc0
Compare
PRT Result
|
c50991a
to
17a1cd8
Compare
trigger: test-robottelo |
1 similar comment
trigger: test-robottelo |
trigger: test-robottelo |
change to sca-only orgs, entitlement orgs are failing assert capsule sync task(s) when invoked, and sync status pre-commit fix, refactor wait_for_sync() into concise steps
17a1cd8
to
e717963
Compare
PRT Result
|
trigger: test-robottelo |
PRT Result
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK , looks great but seems like we are verifying some things twice or more which is done by synchronous operation.
If you think its not, feel free to merge the PR.
) | ||
# No failed or active tasks remaining | ||
assert len(updated_status['last_failed_sync_tasks']) == 0 | ||
assert len(updated_status['active_sync_tasks']) == 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we dont need to verify this as maybe
self.nailgun_capsule.content_get_sync(timeout=timeout, synchronous=True)
being synchronus
activity verifies that ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And anything similar assertions we do above are not needed ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears content_get_sync
does not run synchronously with the active sync task(s).
It seems to return any sync tasks in progress for the capsule, not matter if run synchronously w/ timeout or not.
Here, it is possible for a task to have been active, then finished just before querying content_get_sync
. If that task failed and did so before querying, we would want to check that there are no failed tasks, otherwise we could have a recently failed sync that was not checked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@damoore044 I think if synchronus is not behaving as it suppose to be we should raise a bug ! immediately !!
… in 'wait_for_sync()' (#14412) Assertion Error, time delta/format in 'wait_for_sync()', of capsule content 'last_sync_time' (#14066) Assertion Error for datetime format of 'last sync time' change to sca-only orgs, entitlement orgs are failing assert capsule sync task(s) when invoked, and sync status pre-commit fix, refactor wait_for_sync() into concise steps (cherry picked from commit c10982f) Co-authored-by: David Moore <[email protected]>
…ontent 'last_sync_time' (SatelliteQE#14066) Assertion Error for datetime format of 'last sync time' change to sca-only orgs, entitlement orgs are failing assert capsule sync task(s) when invoked, and sync status pre-commit fix, refactor wait_for_sync() into concise steps
Problem Statement
4 Failures in recent runs of API::CapsuleContent, for
AssertionError
:Locally I can see the
last_sync_time
format from logs as:Solution
last_sync_time
(check if None /Falsey first), then checking length of any in-progress sync tasks, avoiding possibly ambiguous assertion- wherelast_sync_time
has not updated with a recent task, and is still an old sync time/None.The prior
Assertions
with AND, OR, etc fail without showing the compared values. Provided error messages with assertion failure details.start_time
, due to rounding. Often the assertion fails for one second delta, which is start time recorded and sync done at pretty much the same time, but the seconds fromsync_status
were rounded to one second beforestart_time
. This is inconsistent, depending on the milliseconds whenlast_sync_time
is recorded.dateutil.parser
, useparse(date-time string)
method on thestart_time
, and any foundlast_sync_time
. So when checking the last sync time is newer, parse will account for different formats of the same time. Similar solution to PR Fix Date assertion failure in CI errata:e2e #13121Related Issue >> From 'sat-6.15-rhel8-Capsule-Content'
4 Failed api scenarios due to the
AssertionError
in this method. Inconsistently, others will fail locally for the same error.6.14.z and 6.15.0 (most recent Build 13, Mar 7 2024, 12:43 AM)
PRT Case