Linaro / squadplugins

GNU Affero General Public License v3.0
1 stars 6 forks source link

tradefed: fixing parsing suite for test metadata #27

Closed amrohassaan closed 4 years ago

amrohassaan commented 4 years ago

Fixes Linaro/squad#875 & Linaro/squad#876

chaws commented 4 years ago

LGTM

mwasilew commented 4 years ago

Guys, did you check this case in the production db - good vs. bad examples?

On Wed, 28 Oct 2020, 14:24 Charles Oliveira, notifications@github.com wrote:

Merged #27 https://github.com/Linaro/squadplugins/pull/27 into master.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Linaro/squadplugins/pull/27#event-3931544879, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEXDFPMGCKSL6BETCAZKTDSNASSZANCNFSM4TBLRTYA .

chaws commented 4 years ago

@mwasilew I had a sync with Amro and he fetched the exact same jobs from production. Here's what Amro did in his setup:

  1. import tests with current tradefed (wrong) 1.1. confirm same results as production (history page not found)
  2. Apply the patch in this PR
  3. refetch same tests
  4. certified that problems are gone 4.1. @amrohassaan also mentioned that this fixed the environment column not showing up in history

We also made sure that https://github.com/Linaro/squad/commit/ca6ff14375a889150fd4bd7d3f0f90ad9cfbf874 correctly fixes tests wrongly created with tradefed bug.

After some thinking, I finally understood why this was exposed now: we didn't use SuiteMetadata before my changes to remove test name. When my changes kicked in, cts/vts tests with buggy SuiteMetadata were exposed.

amrohassaan commented 4 years ago

@chaws makes sense as to why this got exposed. @mwasilew the env col would disappear if there is a previous test metadata for same test existed in SuiteMetadata with the right slug at least once, then this line https://github.com/Linaro/squad/blob/7a95d7640966f40877cac7b776ab51bad68a1770/squad/frontend/tests.py#L189 fetches the suite using this slug from the suite table then uses its slug two lines below to formulate the test fullname which makes avoid failing and history just displays the table without env.