Bug #16884

API server tests failing with "Didn't match" error

Added by Peter Amstutz about 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
API
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Story points:
-
Release relationship:
Auto

Description

Background: when in test mode, as a correctness test the results of the incremental permission graph update is checked against a full recompute of the permission graph. They should always result in identical table contents.

This is sensitive to starting conditions. If the incremental update is done on a database where the materialized_permissions table was out of sync with the true permissions (the "full recompute" is assumed to be ground truth), then the result after the incremental update will also be wrong and we get the "Didn't match" error.

  • developer-run-tests-services-api is failing, it seems random as there is no particular test that causes it to start failing.

https://ci.arvados.org/job/developer-run-tests-services-api/2210/
https://ci.arvados.org/job/developer-run-tests-services-api/2212/
https://ci.arvados.org/job/developer-run-tests-services-api/2213/
https://ci.arvados.org/job/developer-run-tests-services-api/2218/

  • There is one success out of 5 attempts:

https://ci.arvados.org/job/developer-run-tests-services-api/2219/

  • When I run the tests locally, it passes.

Rails 5.2 has a few testing changes. Tests are shuffled so the order of test modules is different each time. Tests also share a database connection.


Related issues

Related to Arvados - Bug #16811: Ensure that "public favorites" still workResolved09/15/2020

Associated revisions

Revision 7874e2fb (diff)
Added by Peter Amstutz about 1 year ago

16884: Add public_project permission link to test fixtures

This is the permission link that gives the all users and anonymous
users read access to public favorites. It is added by database seeds,
but it also needs to be present in the fixtures.

refs #16884
refs #16811

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <>

Revision 5ba3cdd2 (diff)
Added by Peter Amstutz about 1 year ago

16884: Add public_project permission link to test fixtures

This is the permission link that gives the all users and anonymous
users read access to public favorites. It is added by database seeds,
but it also needs to be present in the fixtures.

refs #16884
refs #16811

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <>

History

#1 Updated by Peter Amstutz about 1 year ago

  • Description updated (diff)

#2 Updated by Peter Amstutz about 1 year ago

  • Related to Bug #16811: Ensure that "public favorites" still work added

#3 Updated by Peter Amstutz about 1 year ago

I think I might have found it, the fixtures were missing the permission link from anonymous users to public favorites, so if it restored from fixtures and didn't run database seeds, and computed the permissions from that, it would have the wrong permissions if it ran database seeds later. Added the permission to the fixtures, running here:

https://ci.arvados.org/job/developer-run-tests-services-api/2221/console

However, I'm running locally and now I'm getting a new (probably unrelated) error:

  1) Failure:
UpdatePriorityTest#test_priority_0_but_should_be_>0 [/usr/src/arvados/services/api/test/unit/update_priority_test.rb:18]:
Expected: 0
  Actual: 1124298929949624

#4 Updated by Peter Amstutz about 1 year ago

  • Assigned To set to Peter Amstutz
  • Status changed from New to In Progress

#5 Updated by Peter Amstutz about 1 year ago

  • Status changed from In Progress to Resolved

#6 Updated by Peter Amstutz about 1 year ago

  • Release set to 25

Also available in: Atom PDF