gravitational / teleport

The easiest, and most secure way to access and protect all of your infrastructure.
https://goteleport.com
GNU Affero General Public License v3.0
17.33k stars 1.74k forks source link

`TestListUnifiedResources_WithLogins ` flakiness #45086

Open zmb3 opened 1 month ago

zmb3 commented 1 month ago

Failure

Link(s) to logs

Relevant snippet

=== FAIL: lib/auth TestListUnifiedResources_WithLogins (0.66s)
    auth_with_roles_test.go:4820: 
            Error Trace:    /__w/teleport/teleport/lib/auth/auth_with_roles_test.go:4820
            Error:          Should be empty, but was   []string(Inverse(cmpopts.SortSlices, []string{
                            +   "fish",
                            +   "llama",
                              }))
            Test:           TestListUnifiedResources_WithLogins
zmb3 commented 1 month ago

Likely related to #44611

gabrielcorado commented 3 weeks ago

Another failure was found at the flaky test detector: https://github.com/gravitational/teleport.e/actions/runs/10505970173/job/29104633515

auth_with_roles_test.go:5004: 
            Error Trace:    /__w/teleport.e/teleport.e/lib/auth/auth_with_roles_test.go:5004
            Error:          "[DatabaseServer:<Kind:"db_server" Version:"v3" Metadata:<Name:"b0fa03e6-f88a-487e-bc3e-8f8bbf9b6848" Namespace:"default" Revision:"fee239d0-8519-4d04-9bcd-128a988c4efc" > Spec:<Version:"17.0.0-dev" Hostname:"_" HostID:"_" Rotation:<Started:<seconds:-62135596800 > LastRotated:<seconds:-62135596800 > Schedule:<UpdateClients:<seconds:-62135596800 > UpdateServers:<seconds:-62135596800 > Standby:<seconds:-62135596800 > > > Database:<Kind:"db" Version:"v3" Metadata:<Name:"name-4" Namespace:"default" > Spec:<Protocol:"_" URI:"_" AWS:<Redshift:<> RDS:<> ElastiCache:<> SecretStore:<> MemoryDB:<> RDSProxy:<> RedshiftServerless:<> OpenSearch:<> DocumentDB:<> > GCP:<> Azure:<Redis:<> > TLS:<> AD:<> MySQL:<> MongoAtlas:<> Oracle:<> > Status:<AWS:<Redshift:<> RDS:<> ElastiCache:<> SecretStore:<> MemoryDB:<> RDSProxy:<> RedshiftServerless:<> OpenSearch:<> DocumentDB:<> > MySQL:<> Azure:<Redis:<> > > > > >  AppServer:<Kind:"app_server" Version:"v3" Metadata:<Name:"b0fa03e6-f88a-487e-bc3e-8f8bbf9b6848" Namespace:"default" > Spec:<Version:"17.0.0-dev" Hostname:"_" HostID:"_" Rotation:<Started:<seconds:-62135596800 > LastRotated:<seconds:-62135596800 > Schedule:<UpdateClients:<seconds:-62135596800 > UpdateServers:<seconds:-62135596800 > Standby:<seconds:-62135596800 > > > App:<Kind:"app" Version:"v3" Metadata:<Name:"name-4" Namespace:"default" > Spec:<URI:"https://console.aws.amazon.com/ec2/v2/home" Cloud:"AWS" > > > > Logins:"fish" Logins:"llama"  DatabaseServer:<Kind:"db_server" Version:"v3" Metadata:<Name:"d212a83e-fe56-4824-9867-6aab5a0dbcf1" Namespace:"default" Revision:"3d8b77dd-883c-45d7-94b0-89aee78d5710" > Spec:<Version:"17.0.0-dev" Hostname:"_" HostID:"_" Rotation:<Started:<seconds:-62135596800 > LastRotated:<seconds:-62135596800 > Schedule:<UpdateClients:<seconds:-62135596800 > UpdateServers:<seconds:-62135596800 > Standby:<seconds:-62135596800 > > > Database:<Kind:"db" Version:"v3" Metadata:<Name:"name-3" Namespace:"default" > Spec:<Protocol:"_" URI:"_" AWS:<Redshift:<> RDS:<> ElastiCache:<> SecretStore:<> MemoryDB:<> RDSProxy:<> RedshiftServerless:<> OpenSearch:<> DocumentDB:<> > GCP:<> Azure:<Redis:<> > TLS:<> AD:<> MySQL:<> MongoAtlas:<> Oracle:<> > Status:<AWS:<Redshift:<> RDS:<> ElastiCache:<> SecretStore:<> MemoryDB:<> RDSProxy:<> RedshiftServerless:<> OpenSearch:<> DocumentDB:<> > MySQL:<> Azure:<Redis:<> > > > > >  AppServer:<Kind:"app_server" Version:"v3" Metadata:<Name:"d212a83e-fe56-4824-9867-6aab5a0dbcf1" Namespace:"default" > Spec:<Version:"17.0.0-dev" Hostname:"_" HostID:"_" Rotation:<Started:<seconds:-62135596800 > LastRotated:<seconds:-62135596800 > Schedule:<UpdateClients:<seconds:-62135596800 > UpdateServers:<seconds:-62135596800 > Standby:<seconds:-62135596800 > > > App:<Kind:"app" Version:"v3" Metadata:<Name:"name-3" Namespace:"default" > Spec:<URI:"https://console.aws.amazon.com/ec2/v2/home" Cloud:"AWS" > > > > Logins:"llama" Logins:"fish"  DatabaseServer:<Kind:"db_server" Version:"v3" Metadata:<Name:"a8024d46-fcdc-46eb-a0fd-88739d1d75de" Namespace:"default" Revision:"af79080c-c4f9-4a14-8c56-cf8878b9b165" > Spec:<Version:"17.0.0-dev" Hostname:"_" HostID:"_" Rotation:<Started:<seconds:-62135596800 > LastRotated:<seconds:-62135596800 > Schedule:<UpdateClients:<seconds:-62135596800 > UpdateServers:<seconds:-62135596800 > Standby:<seconds:-62135596800 > > > Database:<Kind:"db" Version:"v3" Metadata:<Name:"name-2" Namespace:"default" > Spec:<Protocol:"_" URI:"_" AWS:<Redshift:<> RDS:<> ElastiCache:<> SecretStore:<> MemoryDB:<> RDSProxy:<> RedshiftServerless:<> OpenSearch:<> DocumentDB:<> > GCP:<> Azure:<Redis:<> > TLS:<> AD:<> MySQL:<> MongoAtlas:<> Oracle:<> > Status:<AWS:<Redshift:<> RDS:<> ElastiCache:<> SecretStore:<> MemoryDB:<> RDSProxy:<> RedshiftServerless:<> OpenSearch:<> DocumentDB:<> > MySQL:<> Azure:<Redis:<> > > > > >  AppServer:<Kind:"app_server" Version:"v3" Metadata:<Name:"a8024d46-fcdc-46eb-a0fd-88739d1d75de" Namespace:"default" > Spec:<Version:"17.0.0-dev" Hostname:"_" HostID:"_" Rotation:<Started:<seconds:-62135596800 > LastRotated:<seconds:-62135596800 > Schedule:<UpdateClients:<seconds:-62135596800 > UpdateServers:<seconds:-62135596800 > Standby:<seconds:-62135596800 > > > App:<Kind:"app" Version:"v3" Metadata:<Name:"name-2" Namespace:"default" > Spec:<URI:"https://console.aws.amazon.com/ec2/v2/home" Cloud:"AWS" > > > >  DatabaseServer:<Kind:"db_server" Version:"v3" Metadata:<Name:"5b89d38b-a472-4dbf-9a75-de3d2093699b" Namespace:"default" Revision:"3de5f831-3966-43cd-9a03-4e47f7cfe550" > Spec:<Version:"17.0.0-dev" Hostname:"_" HostID:"_" Rotation:<Started:<seconds:-62135596800 > LastRotated:<seconds:-62135596800 > Schedule:<UpdateClients:<seconds:-62135596800 > UpdateServers:<seconds:-62135596800 > Standby:<seconds:-62135596800 > > > Database:<Kind:"db" Version:"v3" Metadata:<Name:"name-1" Namespace:"default" > Spec:<Protocol:"_" URI:"_" AWS:<Redshift:<> RDS:<> ElastiCache:<> SecretStore:<> MemoryDB:<> RDSProxy:<> RedshiftServerless:<> OpenSearch:<> DocumentDB:<> > GCP:<> Azure:<Redis:<> > TLS:<> AD:<> MySQL:<> MongoAtlas:<> Oracle:<> > Status:<AWS:<Redshift:<> RDS:<> ElastiCache:<> SecretStore:<> MemoryDB:<> RDSProxy:<> RedshiftServerless:<> OpenSearch:<> DocumentDB:<> > MySQL:<> Azure:<Redis:<> > > > > >  AppServer:<Kind:"app_server" Version:"v3" Metadata:<Name:"5b89d38b-a472-4dbf-9a75-de3d2093699b" Namespace:"default" > Spec:<Version:"17.0.0-dev" Hostname:"_" HostID:"_" Rotation:<Started:<seconds:-62135596800 > LastRotated:<seconds:-62135596800 > Schedule:<UpdateClients:<seconds:-62135596800 > UpdateServers:<seconds:-62135596800 > Standby:<seconds:-62135596800 > > > App:<Kind:"app" Version:"v3" Metadata:<Name:"name-1" Namespace:"default" > Spec:<URI:"https://console.aws.amazon.com/ec2/v2/home" Cloud:"AWS" > > > >  DatabaseServer:<Kind:"db_server" Version:"v3" Metadata:<Name:"79282a5e-8ec6-483f-802d-78bad194b492" Namespace:"default" Revision:"f1e63d4c-d6c5-4e47-939e-343b91084c3e" > Spec:<Version:"17.0.0-dev" Hostname:"_" HostID:"_" Rotation:<Started:<seconds:-62135596800 > LastRotated:<seconds:-62135596800 > Schedule:<UpdateClients:<seconds:-62135596800 > UpdateServers:<seconds:-62135596800 > Standby:<seconds:-62135596800 > > > Database:<Kind:"db" Version:"v3" Metadata:<Name:"name-0" Namespace:"default" > Spec:<Protocol:"_" URI:"_" AWS:<Redshift:<> RDS:<> ElastiCache:<> SecretStore:<> MemoryDB:<> RDSProxy:<> RedshiftServerless:<> OpenSearch:<> DocumentDB:<> > GCP:<> Azure:<Redis:<> > TLS:<> AD:<> MySQL:<> MongoAtlas:<> Oracle:<> > Status:<AWS:<Redshift:<> RDS:<> ElastiCache:<> SecretStore:<> MemoryDB:<> RDSProxy:<> RedshiftServerless:<> OpenSearch:<> DocumentDB:<> > MySQL:<> Azure:<Redis:<> > > > > >  AppServer:<Kind:"app_server" Version:"v3" Metadata:<Name:"79282a5e-8ec6-483f-802d-78bad194b492" Namespace:"default" > Spec:<Version:"17.0.0-dev" Hostname:"_" HostID:"_" Rotation:<Started:<seconds:-62135596800 > LastRotated:<seconds:-62135596800 > Schedule:<UpdateClients:<seconds:-62135596800 > UpdateServers:<seconds:-62135596800 > Standby:<seconds:-62135596800 > > > App:<Kind:"app" Version:"v3" Metadata:<Name:"name-0" Namespace:"default" > Spec:<URI:"https://console.aws.amazon.com/ec2/v2/home" Cloud:"AWS" > > > >  Node:<Kind:"node" Version:"v2" Metadata:<Name:"d212a83e-fe56-4824-9867-6aab5a0dbcf1" Namespace:"default" Labels:<key:"name" value:"d212a83e-fe56-4824-9867-6aab5a0dbcf1" > Revision:"60264551-c132-4da6-8c18-6f7737162e8a" > Spec:<Rotation:<Started:<seconds:-62135596800 > LastRotated:<seconds:-62135596800 > Schedule:<UpdateClients:<seconds:-62135596800 > UpdateServers:<seconds:-62135596800 > Standby:<seconds:-62135596800 > > > > > Logins:"llama" Logins:"fish"  Node:<Kind:"node" Version:"v2" Metadata:<Name:"b0fa03e6-f88a-487e-bc3e-8f8bbf9b6848" Namespace:"default" Labels:<key:"name" value:"b0fa03e6-f88a-487e-bc3e-8f8bbf9b6848" > Revision:"76b96f37-b06a-4627-8a75-73d0967f0c95" > Spec:<Rotation:<Started:<seconds:-62135596800 > LastRotated:<seconds:-62135596800 > Schedule:<UpdateClients:<seconds:-62135596800 > UpdateServers:<seconds:-62135596800 > Standby:<seconds:-62135596800 > > > > > Logins:"llama" Logins:"fish"  Node:<Kind:"node" Version:"v2" Metadata:<Name:"a8024d46-fcdc-46eb-a0fd-88739d1d75de" Namespace:"default" Labels:<key:"name" value:"a8024d46-fcdc-46eb-a0fd-88739d1d75de" > Revision:"c191d56c-872f-4708-a947-6d32936a563b" > Spec:<Rotation:<Started:<seconds:-62135596800 > LastRotated:<seconds:-62135596800 > Schedule:<UpdateClients:<seconds:-62135596800 > UpdateServers:<seconds:-62135596800 > Standby:<seconds:-62135596800 > > > > > Logins:"llama" Logins:"fish"  Node:<Kind:"node" Version:"v2" Metadata:<Name:"79282a5e-8ec6-483f-802d-78bad194b492" Namespace:"default" Labels:<key:"name" value:"79282a5e-8ec6-483f-802d-78bad194b492" > Revision:"8f3c1453-7753-4320-8458-8ec7c46e4945" > Spec:<Rotation:<Started:<seconds:-62135596800 > LastRotated:<seconds:-62135596800 > Schedule:<UpdateClients:<seconds:-62135596800 > UpdateServers:<seconds:-62135596800 > Standby:<seconds:-62135596800 > > > > > Logins:"llama" Logins:"fish"  Node:<Kind:"node" Version:"v2" Metadata:<Name:"5b89d38b-a472-4dbf-9a75-de3d2093699b" Namespace:"default" Labels:<key:"name" value:"5b89d38b-a472-4dbf-9a75-de3d2093699b" > Revision:"e7eaceb5-0554-4959-a6ab-48510057c8cf" > Spec:<Rotation:<Started:<seconds:-62135596800 > LastRotated:<seconds:-62135596800 > Schedule:<UpdateClients:<seconds:-62135596800 > UpdateServers:<seconds:-62135596800 > Standby:<seconds:-62135596800 > > > > > Logins:"fish" Logins:"llama" ]" should have 20 item(s), but has 15
            Test:           TestListUnifiedResources_WithLogins
nklaassen commented 3 weeks ago

another one in a regular unit test run https://github.com/gravitational/teleport/actions/runs/10511120414/job/29121352805

GavinFrazar commented 2 weeks ago

https://github.com/gravitational/teleport/actions/runs/10640999361/job/29501574329

nklaassen commented 1 week ago

another hit https://github.com/gravitational/teleport/actions/runs/10778223560/job/29889074248?pr=46329

zmb3 commented 6 days ago

https://github.com/gravitational/teleport/actions/runs/10797549522/job/29949039051

@gabrielcorado any ideas what's going on with this test?