Project Description

One day in the past, a relative young geek met Wezterm terminal emulator in a wood or rusty repos. At that time he was used to drive a Win10 machine for work and a Linux shiny supercar for fun and Wezterm fit on both. So after few year the geek realize now that he should gives back to Mr. Wez something. But the geek is far to be a skilled Rustacean...

Goal for this Hackweek

  • Create some openQA needle based tests for Wezterm
  • Have the chance to go through all the exhaustive Wezterm documentation and eventually contribute to it issues

Hidden goals:

  • give back to Mr. Wez for his terminal
  • learn more about the lua wezterm configuration to improve my terminal configuration
  • learn more about openQA
  • get exposed to rust, lua, perl

Resources


Results

A mini blog of all the failure and success : opensuse.hackweek.2022

Get in touch and have fun with many different technology add-emoji - Jekyll, Liquid, Markdown, bundler, gem and other funny ruby stuff to manage the Github hosted project page. - Perl - openQA (needles and many testapi)

Some tests https://github.com/mpagot/os-autoinst-distri-opensuse/tree/weztermhackweek Some needles https://github.com/mpagot/os-autoinst-needles-opensuse/tree/weztermhackweek

https://youtu.be/mQKnl3ecxOU

Looking for hackers with the skills:

lua rust perl openqa

This project is part of:

Hack Week 21

Activity

  • over 2 years ago: xpufx liked this project.
  • over 2 years ago: okurz liked this project.
  • over 2 years ago: cdywan liked this project.
  • over 2 years ago: mpagot started this project.
  • over 2 years ago: mbrugger liked this project.
  • over 2 years ago: mpagot added keyword "rust" to this project.
  • over 2 years ago: mpagot added keyword "perl" to this project.
  • over 2 years ago: mpagot added keyword "openqa" to this project.
  • over 2 years ago: mpagot added keyword "lua" to this project.
  • over 2 years ago: mpagot originated this project.

  • Comments

    • mpagot
      over 2 years ago by mpagot | Reply

      Project log on https://michelepagot.github.io/opensuse.hackweek.2022/

    Similar Projects

    A sane DSL for udev rules by mwilck

    Description

    The "language" in which udev rules are written as documented in udev(7) is horrible. To name just a few problems:

    • The only control statements are LABEL and GOTO.
    • Conditionals are the most important part of the language, but it supports only conjunction ("AND"), forcing developers to use GOTO even for simple "OR" relations.
    • The AND operation is denoted by a comma (,).
    • Conventions for quoting are weird.
    • There aren't even basic string handling facilities.
    • There is no API for passing flags between different rule sets, just a set of global environment variables.
    • Environment variales are written in ENV{FOO} when assigned to, but $env{FOO} or %E{FOO} when dereferenced.

    While this is ok-ish for the simple set of tasks the language was originally intended for, it makes larger rule sets with complex logic almost impossible to read and understand. Examples for such complex rule sets are the device-mapper and multipath rules.

    While working on the multipath rule sets a few weeks ago, I found myself desparately translating the rules into some pythonesque pseudo-code in order to make sure I fully understand the code flow.

    This project wants to explore the possibilities to replace this weird DSL with something saner. The idea is to embed Lua in udev, and rewrite the udev rule sets as Lua modules.

    It's meant as a fun project that may have practical merits. I am aware that it's questionable whether the systemd maintainers are going to embrace this. I think it will only have a tiny chance if it really improves readability of rules massively, while impacting neither performance nor code size too badly. I have good hopes in terms of performance as Lua has the reputation to be fast, but code size will of course increase, and so will the list of dependencies of systemd.

    Goals

    1. Learn how to write Lua, and how to embed it in C code and write C modules for it. I've read the manual, but I can't say that I'm fluent with it yet.
    2. Design an API for udev in Lua. Figure out how to expose status like device properties (environment variables), tags, and other variables like ACTION and SUBSYSTEM to Lua code, and tentatively re-write a set of representative rule sets in this new DSL. This may need several attempts until the rules can be written in an intuitive way.
    3. Create the basic framework for embedding Lua in udev and providing the environment for the Lua code.
    4. Write libraries with helper funtions to be used by the Lua. For example, we'll need code to access sysfs in order to provide ATTRS and similar features of udev. I'm not certain yet but for most of this it will probably make sense to write the code in C and make it callable by Lua, as udev already has powerful mechanisms for accessing sysfs attributes.
    5. One problem is that the Lua standard library provides getenv but not setenv. We need to be able to set environment variables in order to work with external programs to replicate the functionality of the PROGRAM and IMPORT{program} directives.
    6. Eventually, make the entire feature set of the udev language available.
    7. Eventually, rewrite the entire set of upstream rules (to the extent we're aware of) in Lua.
    8. While I'd love trash the original language, I guess it needs to continue to exist.


    SMB3 Server written entirely in Rust by dmulder

    Description

    Given the number of bugs frequently discovered in the Samba code caused by memory issues, it makes sense to re-write the smbd service purely in Rust code. Meanwhile, it would be wise to abandon backwards compatibility here with insecure protocol versions, and simply implement the SMB3 spec.

    Goals

    Get a simple server up and running and get it merged into upstream Samba (which now has Rust build support).

    Resources


    Implement a CLI tool for Trento - trentoctl by nkopliku

    Description

    Implement a trentoctl CLI for interacting with a trento installation

    Goals

    • learn rust
    • implement an initial trentoctl tool to enhance trento automation
    • have fun

    Resources

    trento rust. TUIs listed on this other hackweek project Hack on rich terminal user interfaces


    Hack on isotest-ng - a rust port of isotovideo (os-autoinst aka testrunner of openQA) by szarate

    Description

    Some time ago, I managed to convince ByteOtter to hack something that resembles isotovideo but in Rust, not because I believe that Perl is dead, but more because there are certain limitations in the perl code (how it was written), and its always hard to add new functionalities when they are about implementing a new backend, or fixing bugs (Along with people complaining that Perl is dead, and that they don't like it)

    In reality, I wanted to see if this could be done, and ByteOtter proved that it could be, while doing an amazing job at hacking a vnc console, and helping me understand better what RuPerl needs to work.

    I plan to keep working on this for the next few years, and while I don't aim for feature completion or replacing isotovideo tih isotest-ng (name in progress), I do plan to be able to use it on a daily basis, using specialized tooling with interfaces, instead of reimplementing everything in the backend

    Todo

    • Add make targets for testability, e.g "spawn qemu and type"
    • Add image search matching algorithm
    • Add a Null test distribution provider
    • Add a Perl Test Distribution Provider
    • Fix unittests https://github.com/os-autoinst/isotest-ng/issues/5
    • Research OpenTofu how to add new hypervisors/baremetal to OpenTofu
    • Add an interface to openQA cli

    Goals

    • Implement at least one of the above, prepare proposals for GSoC
    • Boot a system via it's BMC

    Resources

    See https://github.com/os-autoinst/isotest-ng


    Kanidm: A safe and modern IDM system by firstyear

    Kanidm is an IDM system written in Rust for modern systems authentication. The github repo has a detailed "getting started" on the readme.

    Kanidm Github

    In addition Kanidm has spawn a number of adjacent projects in the Rust ecosystem such as LDAP, Kerberos, Webauthn, and cryptography libraries.

    In this hack week, we'll be working on Quokca, a certificate authority that supports PKCS11/TPM storage of keys, issuance of PIV certificates, and ACME without the feature gatekeeping implemented by other CA's like smallstep.

    For anyone who wants to participate in Kanidm, we have documentation and developer guides which can help.

    I'm happy to help and share more, so please get in touch!


    Hacking on sched_ext by flonnegren

    Description

    Sched_ext upstream has some interesting issues open for grabs:

    Goals

    Send patches to sched_ext upstream

    Also set up perfetto to trace some of the example schedulers.

    Resources

    https://github.com/sched-ext/scx


    Create object oriented API for perl's YAML::XS module, with YAML 1.2 Support by tinita

    Description

    YAML::XS is a binding to libyaml and already quite old, but the most popular YAML module for perl. There are two main issues:

    • It uses global package variables to influence behaviour.
    • It didn't implement the loading of types like numbers and booleans according to the YAML spec (neither 1.1 nor 1.2).

    Goals

    Create a new interface which works object oriented. Currently YAML::XS exports a list of functions.

    • The new API will allow to create a YAML::XS object containing configuration influencing the behaviour of loading and dumping.
      • It keeps the libyaml parser and emitter structs in memory, so repeated calls can save the creation of those structs
    • It will by default implement the YAML 1.2 Core Schema, so it is compatible to other YAML processors in perl and in other languages
    • If I have time, I would like to add the merge << key feature as an option. We could then use it in openQA as a replacement for YAML::PP to be faster.

    I already created a proof of concept with a minimal functionality some weeks before this HackWeek.

    Resources


    Hack on isotest-ng - a rust port of isotovideo (os-autoinst aka testrunner of openQA) by szarate

    Description

    Some time ago, I managed to convince ByteOtter to hack something that resembles isotovideo but in Rust, not because I believe that Perl is dead, but more because there are certain limitations in the perl code (how it was written), and its always hard to add new functionalities when they are about implementing a new backend, or fixing bugs (Along with people complaining that Perl is dead, and that they don't like it)

    In reality, I wanted to see if this could be done, and ByteOtter proved that it could be, while doing an amazing job at hacking a vnc console, and helping me understand better what RuPerl needs to work.

    I plan to keep working on this for the next few years, and while I don't aim for feature completion or replacing isotovideo tih isotest-ng (name in progress), I do plan to be able to use it on a daily basis, using specialized tooling with interfaces, instead of reimplementing everything in the backend

    Todo

    • Add make targets for testability, e.g "spawn qemu and type"
    • Add image search matching algorithm
    • Add a Null test distribution provider
    • Add a Perl Test Distribution Provider
    • Fix unittests https://github.com/os-autoinst/isotest-ng/issues/5
    • Research OpenTofu how to add new hypervisors/baremetal to OpenTofu
    • Add an interface to openQA cli

    Goals

    • Implement at least one of the above, prepare proposals for GSoC
    • Boot a system via it's BMC

    Resources

    See https://github.com/os-autoinst/isotest-ng


    Setup a new openQA on more powerful server by JNa

    Description

    • currently local openQA storage is insufficient

    Goals

    -Migrate to more powerful machine

    Resources

    -Service Rainbow


    New features in openqa-trigger-from-obs for openQA by jlausuch

    Description

    Implement new features in openqa-trigger-from-obs to make xml more flexible.

    Goals

    One of the features to be implemented: - Possibility to define "VERSION" and "ARCH" variables per flavor instead of global.

    Resources

    https://github.com/os-autoinst/openqa-trigger-from-obs


    Make more sense of openQA test results using AI by livdywan

    Description

    AI has the potential to help with something many of us spend a lot of time doing which is making sense of openQA logs when a job fails.

    User Story

    Allison Average has a puzzled look on their face while staring at log files that seem to make little sense. Is this a known issue, something completely new or maybe related to infrastructure changes?

    Goals

    • Leverage a chat interface to help Allison
    • Create a model from scratch based on data from openQA
    • Proof of concept for automated analysis of openQA test results

    Bonus

    • Use AI to suggest solutions to merge conflicts
      • This would need a merge conflict editor that can suggest solving the conflict
    • Use image recognition for needles

    Resources

    Timeline

    Day 1

    • Conversing with open-webui to teach me how to create a model based on openQA test results

    Day 2

    Highlights

    • I briefly tested compared models to see if they would make me more productive. Between llama, gemma and mistral there was no amazing difference in the results for my case.
    • Convincing the chat interface to produce code specific to my use case required very explicit instructions.
    • Asking for advice on how to use open-webui itself better was frustratingly unfruitful both in trivial and more advanced regards.
    • Documentation on source materials used by LLM's and tools for this purpose seems virtually non-existent - specifically if a logo can be generated based on particular licenses

    Outcomes

    • Chat interface-supported development is providing good starting points and open-webui being open source is more flexible than Gemini. Although currently some fancy features such as grounding and generated podcasts are missing.
    • Allison still has to be very experienced with openQA to use a chat interface for test review. Publicly available system prompts would make that easier, though.


    OpenQA Golang api client by hilchev

    Description

    I would like to make a simple cli tool to communicate with the OpenQA API

    Goals

    • OpenQA has a ton of information that is hard to get via the UI. A tool like this would make my life easier :)
    • Would potentially make it easier in the future to make UI changes without Perl.
    • Improve my Golang skills

    Resources

    • https://go.dev/doc/
    • https://openqa.opensuse.org/api