Project

General

Profile

Actions

action #177267

closed

coordination #102915: [saga][epic] Automated classification of failures

QA (public) - coordination #94105: [epic] Use feedback from openqa-investigate to automatically inform on github pull requests, open tickets, weed out automatically failed tests

Forbid unprintable characters, white space, colons, equal signs and quotes in TEST names size:S

Added by tinita 15 days ago. Updated 1 day ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
Feature requests
Target version:
Start date:
2025-02-14
Due date:
% Done:

0%

Estimated time:

Description

Motivation

Currently you can put just about any character into the TEST variable, including stuff like vertical tabs, colons, equal signs, quotes and colons.
That can create problems in various places (see #176886 for example, where = would make a scope setting impossible)

Note that in our YAML schema we are already a bit more restrictive, e.g.

  job_templates:
    type: object
    additionalProperties: false
    patternProperties:
      ^[A-Za-z\s0-9_*.+-]+$:

But I think the \s there was a mistake and should be a simple space instead. We don't want tabs or vertical tabs or newlines...

Acceptance Criteria

  • AC1:: The TEST name is limited to certain characters
  • AC2: The YAML schema allows the same characters as required elsewhere

Suggestions

  • Research exactly where this is relevant e.g. the schema used in the context of isos post
  • openqa-clone-job can also override the test name, it may not be checked there
  • Use of the openqa-clone-custom-refspec script?
  • Any command where you can specify settings including TEST=...
  • Restrict the initial and last character to words e.g. a test name would never started with a & or +
  • If you allow unicode characters, make sure they actually work, because at the moment they end up as garbage when specified on the commandlime, e.g. TEST=测试
  • Use \p{Word} instead of \w to allow unicode words
  • The YAML schema should be more restrictive. Original test names should not allow things like @#/ because for example # and / are part of github urls that are used for pull request tests. Normal test names don't need to allow them, and shouldn't, because then when seeing #/ it's usually clear that it's from a PR / branch.
  • Check the jobs.test column in the database for what has been used in the past

Related issues 1 (0 open1 closed)

Related to openQA Project (public) - action #176886: A "+" and other characters used in test names in $var are considered invalid in WORKER_CLASS:$var size:SResolvedmkittler

Actions
Actions #1

Updated by tinita 15 days ago

  • Related to action #176886: A "+" and other characters used in test names in $var are considered invalid in WORKER_CLASS:$var size:S added
Actions #2

Updated by tinita 15 days ago

  • Description updated (diff)
Actions #3

Updated by okurz 15 days ago

  • Tags set to reactive work
  • Target version set to Ready
  • Parent task set to #94105
Actions #4

Updated by okurz 12 days ago

  • Target version changed from Ready to Tools - Next
Actions #5

Updated by livdywan 9 days ago

  • Subject changed from Forbid unprintable characters, white space, colons, equal signs and quotes in TEST names to Forbid unprintable characters, white space, colons, equal signs and quotes in TEST names size:S
  • Description updated (diff)
  • Status changed from New to Workable
Actions #6

Updated by tinita 9 days ago

  • Description updated (diff)
Actions #7

Updated by tinita 9 days ago

  • Description updated (diff)
Actions #8

Updated by tinita 9 days ago

  • Description updated (diff)
Actions #9

Updated by tinita 9 days ago

  • Description updated (diff)
Actions #10

Updated by livdywan 9 days ago

  • Target version changed from Tools - Next to Ready

I guess we need this ticket then. See #176886#note-11

Actions #11

Updated by livdywan 9 days ago

  • Priority changed from Normal to High

(Prio should reflect the blocked ticket)

Actions #12

Updated by mkittler 9 days ago

  • Status changed from Workable to In Progress
  • Assignee set to mkittler
Actions #13

Updated by mkittler 8 days ago

  • Status changed from In Progress to Feedback
Actions #14

Updated by okurz 4 days ago

  • Status changed from Feedback to In Progress

Discussed between okurz, mkittler, tinita and we agreed to use a passlist but allow unicode word characters

Actions #15

Updated by okurz 4 days ago

  • Status changed from In Progress to Feedback
Actions #16

Updated by mkittler 1 day ago

  • Status changed from Feedback to Resolved

The PR has been merged and AC1 is fulfilled. We can reopen if this is too restrictive but I'm considering this resolved for now because I have actually checked both production databases for what is used.

Actions

Also available in: Atom PDF