From 7eb68fdf65d0c553b99014a31a927b7daec5e355 Mon Sep 17 00:00:00 2001 From: Josef Skladanka Date: Jan 22 2019 10:48:35 +0000 Subject: Add easy-karma to wizard --- diff --git a/src/ActionItems.js b/src/ActionItems.js index 1e1eb2e..ceb54a3 100644 --- a/src/ActionItems.js +++ b/src/ActionItems.js @@ -60,7 +60,7 @@ class FedoraManualTestingItemsListSub1 extends Component { break; } - var toggler="toggle_"+title; + var toggler="fmt_ai_toggle_"+title; toggler = toggler.replace(/[\W_]+/g,"_"); return( @@ -102,7 +102,7 @@ class EasyfixItemsListSub1 extends Component { if (subsections.length > 1){ subsections = Object.keys(this.props.data).map(k => { - var subtoggler = "subtoggler_"+title+"_"+k; + var subtoggler = "easyfix_il_subtoggler_"+title+"_"+k; subtoggler = subtoggler.replace(/[\W_]+/g,"_"); return( @@ -145,7 +145,7 @@ class EasyfixItemsListSub1 extends Component { ); } - var toggler="toggle_"+this.props.title; + var toggler="easyfix_il_toggle_"+this.props.title; toggler = toggler.replace(/[\W_]+/g,"_"); return( @@ -171,10 +171,82 @@ class EasyfixItemsList extends Component { } } +class FedoraEasyKarmaItemsList extends Component { + render() { + return( +
+
What is Karma
+ Before a new version of a package is pushed to the Fedora's Updates repository, it needs to be tested and proved functional.{' '} + Tell me more about the process! + + The updates are kept in Bodhi, which acts as a gatekeeper between new package releases and the stable repositories.{' '} + Users (or automated systems) can then provide feedback in form of positive/negative Karma, marking the update as working (or not) within the scope of their expectations.{' '} + An update can (and usually does) consist of several packages (rpms), that are going through the acceptance process together. + +
Sure, let me do it!
+
    +
  1. + Fedora Accounts System (FAS) account is required.{' '} + Don't have one yet? + +
      +
    • Visit FAS Sign-up page and create it.
    • +
    • Note the username and password, you will need it later on.
    • +
    +
    +
  2. +
  3. Make sure your system is up-to-date: sudo dnf update --refresh
  4. +
  5. Install fedora-easy-karma tool: sudo dnf install fedora-easy-karma
  6. +
  7. Choose an update to test{' '} + Not sure how? + + Have a look at the available packages in updates-testing repo, by running dnf --enablerepo=updates-testing list upgrades{' '} + And choose a package you know. + +
  8. +
  9. + Install the package sudo dnf --enablerepo=updates-testing update PACKAGE_NAME, and test whether it works, as you would expect.
    + Note: the package you have chosen might have some dependencies. Be sure to - or at least try to - test those too!{' '} + Need some tips? + + Sometimes, the update associated with the package you just installed fixes some specific bugs, or has testcases associated with it.
    + Run fedora-easy-karma PACKAGE_NAME, and look for Bugs, Test Cases, and/or Notes sections in the detailed output. +
    +
  10. +
  11. + Run fedora-easy-karma --fas-username=FAS_USERNAME and report what you found out.{' '} + New to fedora-easy-karma? + + It identifies the packages installed from the updates-testing repository, and matches them to the updates in Bodhi.
    + Then, you are presented with the relevant updates one-by-one, to submit Karma and a comment. + Not sure what Karma means? + +
      +
    1. + Enter 1 to mark positive karma (the update works just fine, as far as you can tell), or -1{' '} + to mark the package as broken.
      + Not sure you can judge the package's state? Either just press Enter to skip it, or insert i (instead of 1 or -1) to also ignore the package in the future. +
    2. +
    3. + Add a comment - this could be something as simple as Works for me, but make sure to provide reasonable amount of detail, when submitting negative karma (ideally, you should also create a bugreport, and refence it in the comment). +
    4. +
    +
    +
    +
  12. +
  13. Restore the stable-packages on your system by running sudo dnf distro-sync
  14. +
+ +
+ ) + } +} + export { FedoraManualTestingItemsList, - EasyfixItemsList + EasyfixItemsList, + FedoraEasyKarmaItemsList } diff --git a/src/Wizard.js b/src/Wizard.js index 54fb80c..8985f76 100644 --- a/src/Wizard.js +++ b/src/Wizard.js @@ -3,7 +3,7 @@ import WizardForm from './WizardForm'; import Layout from './Layout'; import {oraculumApiUrl, oraculumApiUrl_v1} from './config'; import { groupBy } from 'lodash'; -import { FedoraManualTestingItemsList, EasyfixItemsList } from './ActionItems'; +import { FedoraManualTestingItemsList, EasyfixItemsList, FedoraEasyKarmaItemsList } from './ActionItems'; import { Container, Row } from 'reactstrap'; class Wizard extends Component { @@ -34,7 +34,6 @@ class Wizard extends Component { let by_section = groupBy(by_testtype[l], action => action.extra_data.section); s[l] = by_section; } - console.log(s); outdata.push(); } else if (k === 'easyfix') { @@ -44,9 +43,11 @@ class Wizard extends Component { let by_project = groupBy(by_repo_org[l], action => action.extra_data.repo_name); s[l] = by_project; } - console.log(s); outdata.push(); } + else if (k === 'fedora_easy_karma') { + outdata.push(); + } else { outdata.push(No activities found for the defined filter) } diff --git a/src/WizardForm.js b/src/WizardForm.js index b07e8c0..4dd1b0b 100644 --- a/src/WizardForm.js +++ b/src/WizardForm.js @@ -1,5 +1,4 @@ import React, { Component } from 'react'; -import { FedoraManualTestingItemsList, EasyfixItemsList } from './ActionItems'; import { Form, FormGroup, Label, Input, Row, Button } from 'reactstrap'; import { groupBy } from 'lodash';