Project

General

Profile

coordination #96596

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

Added by szarate over 1 year ago. Updated 8 days ago.

Status:
Blocked
Priority:
Normal
Assignee:
Category:
Infrastructure
Target version:
Start date:
2021-08-09
Due date:
% Done:

86%

Estimated time:
(Total: 0.00 h)
Difficulty:

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

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

action #96716: [qe-core][CI] Add CI check for module header not being updatedResolvedpunkioudi

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

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

action #117835: [qe-core] add some exceptions for `record_soft_fail` to check effective reference ticketsResolvedrfan1

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

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

action #118588: [qe-core][CI] Hide passing checks from the CIResolvedpdostal


Related issues

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

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

History

#1 Updated by szarate over 1 year ago

  • Description updated (diff)

#3 Updated by szarate over 1 year ago

  • Description updated (diff)

#4 Updated by szarate over 1 year ago

  • Description updated (diff)

#5 Updated by szarate over 1 year ago

  • Description updated (diff)

#6 Updated by szarate over 1 year ago

  • Description updated (diff)

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

#7 Updated by szarate over 1 year ago

  • Project changed from qam-qasle-collaboration to openQA Tests
  • Category set to Infrastructure
  • Target version set to QE-Core: Ready

#8 Updated by tjyrinki_suse 10 months ago

  • Status changed from New to Workable

#9 Updated by szarate 8 months ago

  • Status changed from Workable to New

#10 Updated by szarate 8 months ago

  • Target version deleted (QE-Core: Ready)

#11 Updated by szarate 7 months ago

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

#12 Updated by szarate 3 months ago

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

#13 Updated by szarate 2 months ago

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

#14 Updated by szarate 2 months ago

  • Tracker changed from coordination to action

#15 Updated by szarate 2 months ago

  • Tracker changed from action to coordination

#16 Updated by szarate 2 months 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

#17 Updated by szarate 2 months ago

  • Parent task deleted (#95161)

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

#19 Updated by szarate 2 months 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.

#20 Updated by szarate 2 months ago

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

#21 Updated by szarate 2 months ago

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

#22 Updated by szarate 19 days ago

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

Also available in: Atom PDF