Project

General

Profile

Actions

coordination #96596

open

[qe-core][CI] CI/CD and Coding style improvements

Added by szarate over 3 years ago. Updated 29 days ago.

Status:
Blocked
Priority:
Normal
Assignee:
Category:
Infrastructure
Target version:
Start date:
2019-12-11
Due date:
% Done:

50%

Estimated time:
(Total: 0.00 h)
Difficulty:
Sprint:
QE-Core: October Sprint 23 (Oct 11 - Nov 08)

Description

Story

As a code reviewer I would like the CI to do menial checks so that I can focus on bigger details and be more effective with my work.

Background

Often when doing the reviews on GH, reviewers tend to mention when:

  • File header not being updated
  • File without summary and mantainer field
    • Create a mantainer list and only allow a person to be mantainer in a module, if they're in such MANTAINERS
  • Syntax checkers for coding style
    • Things like if check_var('ARCH') instead of is_aarch64 being wildly used, When there is Utils::Architectures::is_aarch64. When finding the check_var syntax, propose the aforementioned function
    • Things like if check_var('BACKEND', 'qemu') instead of is_qemu being wildly used, When there are Utils::Backends::is_qemu. When finding the check_var syntax, propose the aforementioned function.
    • Mix between my $self = shift and my ($self) = @_, the proposal would be to stick to my ($self) = @_
  • Failures in the tidy checks that are often hard to find (Meaning, can we get comments on the offending lines?), which can be maybe generic enough to help with other parts of automated review.
  • Know which jobs would be possibly affected by certain code changes
    • Adding openqa-module-mapper in the current state, display last 20 jobs that are related to the changes in the PR.

AC's for feach item

  • AC1: Each subtask is proposed as an RFC in the os-autoinst-distri-opensuse repo.
  • AC2: There's a corresponding entry in the contributing document.

For syntax checking (check_var, get_var, script.*zypper... etc)

  • Create a hash table in yaml, json, xml, CORBA, toml, $MARKUPLANGUAGE to check with a regex for a syntax that when matching, would propose a suggestion.
  • Use etherpad.nue.suse.com/qe-core-proposed-syntax-checks to add the proposals.

Subtasks 29 (15 open14 closed)

action #96675: [qe-core] Add CI check preventing obsolete use of `check_var('VAR')Resolveddvenkatachala2021-08-09

Actions
action #96716: [qe-core][CI] Add CI check for module header not being updatedResolvedpunkioudi2021-08-10

Actions
action #97097: [qe-core][CI] Add syntax checkers to the CI to verify the parameter parsing (move away from my $self = shift)New2021-08-18

Actions
action #115343: [qe-core] os-autoinst-distri-opensuse checks for record_soft_failure without valid reference is ineffectiveResolvedrfan12022-10-11

Actions
action #117835: [qe-core] add some exceptions for `record_soft_fail` to check effective reference ticketsResolvedrfan12022-10-11

Actions
action #117118: [qe-core] CI/CD and Coding style improvements - Forbid usage of fgrep and egrepResolvedVANASTASIADIS2022-09-23

Actions
action #118582: [qe-core][CI][timeboxed:24h] Provide automated feedback on PR's when one or more checks failRejectedVANASTASIADIS2022-10-13

Actions
action #118588: [qe-core][CI] Anotate output when there are code violations on github's PR.Resolvedpdostal2022-10-13

Actions
action #121432: [qe-core][opensuse-jobgroups] CI does not support 'deleting a yaml file'.ResolvedVANASTASIADIS2022-12-05

Actions
action #122923: [qe-core][CI] Hide passing check messages from the CI logsResolvedrfan12022-10-13

Actions
action #124688: [qe-core] Reduce execution of compile testsBlockedrfan12023-02-16

Actions
action #126518: [qe-core] Metadata check does not show up on GH like tidy (for instance) doesNew2023-03-23

Actions
action #137489: [qe-core] Perl Tidy updates should announce when package is available on FactoryWorkable2023-10-05

Actions
openQA Project - action #138416: Unify GitHub Actions for QA Projects size:MResolvedybonatakis2023-10-24

Actions
action #138521: [qe-core] Add line number to perlpod so its easier to parse the outputNew2023-10-25

Actions
action #138539: [qe-core] Explore codeowners feature and automated merging of PR once team approvesNew2023-10-25

Actions
action #138542: [qe-core] Automate checks to avoid security concernsNew2023-10-25

Actions
openQA Project - action #138674: Reusable github workflow in openQA is causing a problem for os-autoinst-bot dependency PRResolvedtinita2023-10-24

Actions
action #151675: [qe-core] CI/CD gitlab forks should not deploy to OSD Resolvedamanzini2023-11-29

Actions
action #153805: [qe-core] Implement checks so that tests that don't use assert_screen, use use serial console insteadIn Progresscvidot2024-01-17

Actions
openQA Project - action #155062: Unify GitHub Actions for QA Projects - perltidy in os-autoinst size:MResolvedtinita2023-10-24

Actions
openQA Project - action #155065: Unify GitHub Actions for QA Projects - use as many common static checks within all os-autoinst repos as possibleNew

Actions
openQA Project - action #155188: Unify GitHub Actions for QA Projects - perltidy&perlcritic in openQAResolvedtinita2023-10-24

Actions
openQA Project - action #155191: Unify GitHub Actions for QA Projects - perlcritic in os-autoinstNew2023-10-24

Actions
action #160308: [qe-core] test-unused-modules-changed and test-unused-modules-full need improvementsNew2019-12-11

Actions
action #160430: Make dispatch of openQA run dependent on successful compilationIn Progress2024-05-16

Actions
action #160439: [qe-core] isotovideo: Have isotovideo default scenarios for all 4 architectures, excluding 32bitNew2024-05-16

Actions
openQA Project - action #162095: os-autoinst-distri-opensuse uses os-autoinst-common for perltidyNew2024-06-11

Actions
coordination #168763: [qe-core] Implement static check for undefined test variables via `*_var` functionsNew2024-10-23

Actions

Related issues 4 (3 open1 closed)

Related to openQA Tests - action #51230: [qe-core][functional] Unify all usages of systemctlBlocked2019-05-07

Actions
Related to openQA Tests - action #116599: [qe-core] SCC regcodes leaking mitigation - wheels fail in CI Compile checks when enabledResolveddheidler2022-09-15

Actions
Related to openQA Tests - action #95161: [qe-core][epic] Implement automated checks to help code reviewers know when the test case summary should be updatedNewszarate2021-08-09

Actions
Related to openQA Tests - action #160334: [qe-core] Add CI/CD check to avoid uses of nots3cr3t or other hardcoded password in pull requestsBlockedtinawang1232024-09-06

Actions
Actions #1

Updated by szarate over 3 years ago

  • Description updated (diff)
Actions #3

Updated by szarate over 3 years ago

  • Description updated (diff)
Actions #4

Updated by szarate over 3 years ago

  • Description updated (diff)
Actions #5

Updated by szarate over 3 years ago

  • Description updated (diff)
Actions #6

Updated by szarate over 3 years ago

  • Description updated (diff)

For getting modified files in the current changeset: git status --porcelain "${files[@]}" | awk '{ print $2 }'

Actions #7

Updated by szarate over 3 years ago

  • Project changed from 175 to openQA Tests
  • Category set to Infrastructure
  • Target version set to QE-Core: Ready
Actions #8

Updated by tjyrinki_suse almost 3 years ago

  • Status changed from New to Workable
Actions #9

Updated by szarate over 2 years ago

  • Status changed from Workable to New
Actions #10

Updated by szarate over 2 years ago

  • Target version deleted (QE-Core: Ready)
Actions #11

Updated by szarate over 2 years ago

  • Related to action #51230: [qe-core][functional] Unify all usages of systemctl added
Actions #12

Updated by szarate about 2 years ago

  • Related to action #115343: [qe-core] os-autoinst-distri-opensuse checks for record_soft_failure without valid reference is ineffective added
Actions #13

Updated by szarate about 2 years ago

  • Related to action #116599: [qe-core] SCC regcodes leaking mitigation - wheels fail in CI Compile checks when enabled added
Actions #14

Updated by szarate about 2 years ago

  • Tracker changed from coordination to action
Actions #15

Updated by szarate about 2 years ago

  • Tracker changed from action to coordination
Actions #16

Updated by szarate about 2 years ago

  • Subject changed from [qe-core][CI] Implement checks in the CI for common errors/coding style to [qe-core][CI] CI/CD and Coding style improvements
  • Status changed from New to Blocked
  • Assignee set to szarate
  • Target version set to QE-Core: Ready
Actions #17

Updated by szarate about 2 years ago

  • Parent task deleted (#95161)

Removing parent for now, this is a separate epic on it's own

Actions #18

Updated by szarate about 2 years ago

  • Related to action #95161: [qe-core][epic] Implement automated checks to help code reviewers know when the test case summary should be updated added
Actions #19

Updated by szarate about 2 years ago

This ticket should help with preparing of the automated deployments or rather the triggering of new Service Packs into Development or Maintenance phases, for this we need a new epic.

This epic should stay only for static checks and code improvements.

  • automatic push of use strict; warnings and testapi goes in here too.
Actions #20

Updated by szarate about 2 years ago

  • Sprint set to QE-Core: October Sprint (Sep 28 - Oct 26)
  • Tags set to qe-core-october-sprint
Actions #21

Updated by szarate about 2 years ago

  • Related to deleted (action #115343: [qe-core] os-autoinst-distri-opensuse checks for record_soft_failure without valid reference is ineffective)
Actions #22

Updated by szarate about 2 years ago

  • Sprint changed from QE-Core: October Sprint (Sep 28 - Oct 26) to QE-Core: November Sprint (Nov 09 - Nov 22)
Actions #23

Updated by szarate almost 2 years ago

  • Tracker changed from coordination to action
Actions #24

Updated by szarate almost 2 years ago

  • Tracker changed from action to coordination
Actions #25

Updated by szarate almost 2 years ago

  • Sprint changed from QE-Core: November Sprint (Nov 09 - Dec 07) to QE-Core: December Sprint (Dec 07 - Jan 04)
Actions #26

Updated by szarate almost 2 years ago

From: https://suse.slack.com/archives/C02CANHLANP/p1673359533046859?thread_ts=1673351658.066219&cid=C02CANHLANP

I always ended up calling the stuff directly on my own and never bothered to go further, but having make targets that allow parameters makes so much more sense...
and having a target similar to make tidy, we can actually do the same with make tests so the behavior only affects modified files.

Actions #27

Updated by pvorel almost 2 years ago

From our discussion in RC linked in previous: It'd be great to have way to easily run all tests which are in CI (./tools/check_metadata, ./tools/tidy, ...) on single file or list of specified files. What I usually need is to quickly test 1-3 files. Make targets used for testing, which are specified in top level Makefile are run on all files, which does not scale.

There could be ./tools/test-everything, which would expect list of files and run all tests on them (or at least these which can be run easily locally). The problem is that some commands are defined in the top level Makefile (e.g. perlcritic), all of these would have to be also put as scripts in ./tools/. Having commands defined in Makefile can brings complications (at least you need to have make installed, I'd try to have minimum scripting in Makefile, just call scripts in ./tools/).

Not only I want fast way to test everything I modified locally. Other problem, which bothers me is the long output, when everything is tested with pipes. Pipes does not print affected file, thus I need to scroll to find which tool reported particular error and run it locally on files I modified to see the problem.

Running locally I get files:

./tools/check_metadata $(git ls-files)
Missing Copyright <year> SUSE LLC in data/ai_ml/tvm/post_processing.py
Missing '# Summary: <multi line summary of test>' in data/apparmor/adminer.php5
Missing '# Maintainer: <email address>' in data/apparmor/adminer.php5

But in CI I see many useless output, which makes things hard to find:

tools/check_metadata $(git ls-files "tests/**.pm")
# Maintainer: Guillaume GARDET <guillaume@opensuse.org>
# Maintainer: Guillaume GARDET <guillaume@opensuse.org>
# Maintainer: QE Security <none@suse.de>`

The same problem is with other tests perlcritic.

Actions #28

Updated by szarate almost 2 years ago

  • Sprint changed from QE-Core: December Sprint (Dec 07 - Jan 11) to QE-Core: January Sprint (Jan 11 - Feb 08)
Actions #29

Updated by szarate almost 2 years ago

  • Sprint changed from QE-Core: January Sprint (Jan 11 - Feb 08) to QE-Core: February Sprint (Feb 08 - Mar 08)
Actions #31

Updated by szarate almost 2 years ago

  • Tags changed from qe-core-october-sprint to qe-core-october-sprint, qe-core-february-sprint

missed to add the tag

Actions #32

Updated by szarate over 1 year ago

  • Sprint changed from QE-Core: February Sprint (Feb 08 - Mar 08) to QE-Core: March Sprint (Mar 08 - Apr 05)
Actions #33

Updated by szarate over 1 year ago

  • Sprint changed from QE-Core: March Sprint (Mar 08 - Apr 05) to QE-Core: April Sprint 23 (Apr 05 - May 03)
Actions #34

Updated by szarate over 1 year ago

  • Sprint changed from QE-Core: April Sprint 23 (Apr 05 - May 03) to QE-Core: May Sprint 23 (May 10 - May 31)
Actions #35

Updated by szarate over 1 year ago

  • Sprint changed from QE-Core: May Sprint 23 (May 10 - May 31) to QE-Core: April Sprint 23 (Apr 05 - May 03)
Actions #36

Updated by szarate about 1 year ago

  • Subtask #137489 added
Actions #37

Updated by szarate about 1 year ago

  • Sprint changed from QE-Core: April Sprint 23 (Apr 05 - May 03) to QE-Core: October Sprint 23 (Oct 11 - Nov 08)
Actions #38

Updated by szarate about 1 year ago

  • Sprint changed from QE-Core: October Sprint 23 (Oct 11 - Nov 08) to QE-Core: September Sprint 23 (Sep 06 - Oct 04)
Actions #39

Updated by szarate about 1 year ago

  • Sprint changed from QE-Core: September Sprint 23 (Sep 06 - Oct 04) to QE-Core: October Sprint 23 (Oct 11 - Nov 08)
Actions #40

Updated by szarate about 1 year ago

  • Subtask #138521 added
Actions #41

Updated by szarate about 1 year ago

  • Subtask #138416 added
Actions #42

Updated by szarate about 1 year ago

  • Subtask #138539 added
Actions #43

Updated by szarate about 1 year ago

  • Subtask #138542 added
Actions #44

Updated by szarate about 1 year ago

  • Tags changed from qe-core-october-sprint, qe-core-february-sprint, qe-core-june-sprint to qe-core-october-sprint, qe-core-february-sprint, qe-core-june-sprint, platform-team
  • Parent task set to #124625
Actions #45

Updated by tinita about 1 year ago

  • Subtask #138674 added
Actions #46

Updated by szarate 12 months ago

  • Subtask #151675 added
Actions #47

Updated by szarate 10 months ago

Adding a quick note here of things that are needed:

  • A checker that intends to guess/understand whether a test really needs to use a tty or if it can use serial-terminal instead
Actions #48

Updated by szarate 10 months ago

  • Subtask #153805 added
Actions #49

Updated by okurz 10 months ago

  • Subtask #155062 added
Actions #50

Updated by okurz 10 months ago

  • Subtask #155065 added
Actions #51

Updated by okurz 10 months ago

  • Subtask #155188 added
Actions #52

Updated by okurz 10 months ago

  • Subtask #155191 added
Actions #53

Updated by szarate 6 months ago

  • Subtask #160308 added
Actions #54

Updated by szarate 6 months ago

  • Related to action #160334: [qe-core] Add CI/CD check to avoid uses of nots3cr3t or other hardcoded password in pull requests added
Actions #55

Updated by chock 6 months ago

  • Subtask #160430 added
Actions #56

Updated by szarate 6 months ago

  • Subtask #160439 added
Actions #57

Updated by tinita 5 months ago

  • Subtask #162095 added
Actions #58

Updated by szarate 29 days ago

  • Subtask #168763 added
Actions

Also available in: Atom PDF