Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use needles from correct ref of NEEDLES_DIR #5175

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Commits on Oct 22, 2024

  1. Use needles from correct ref of NEEDLES_DIR

    If the NEEDLES_DIR (or CASEDIR as a backup) variable is a git repo URL
    with a fragment specifying the ref of the repository, we attempt to use
    it as the source of needles when viewing needle diffs in test results.
    
    If the NEEDLES_GIT_SHA variable is set, we use that instead as it should
    be the most accurate way to determine exactly which commit was used
    sdclarke authored and kalikiana committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    2bdf709 View commit details
    Browse the repository at this point in the history
  2. Add cleanup for alternate needle versions

    There is now a minion task which will clean up alternate needle files
    created by the WebUI. The minimum retention time of the needle files can
    be set in the config, and defaults to 30 minutes
    sdclarke authored and kalikiana committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    87b9fdc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    60bdc81 View commit details
    Browse the repository at this point in the history
  4. Improve code for showing correct version of needles

    * Improve error handling
    * Simplify code
    * Split code into smaller functions
    * Move needle-related code into its own module so utilities don't become
      too big
    * Avoid using a shell to run Git commands; this breaks when needle paths
      contain characters that needed escaping
    * Avoid invoking Git commands if temporary needle files are still present
    * Use the usual directory the web UI stores cache files in (instead of
      hard-coding `/tmp/…`)
    * Output temporary files directly instead of using intermediate buffer
    * Keep using the real needle path as before for populating last seen/match
      because using the relative path breaks compatibility with existing
      databases and this change is supposedly not required anyway
    * See https://progress.opensuse.org/issues/154783
    Martchus authored and kalikiana committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    52367a6 View commit details
    Browse the repository at this point in the history
  5. Improve cleanup of temporary needle refs

    * Use the settings key `temp_needle_refs_retention` which makes it clear
      that this setting is about temporary needle refs
    * Document settings key in default `openqa.ini`
    * Adapt the cleanup to be in accordance with the changed path for temporary
      needle refs
    * Rename cleanup task to `limit_temp_needle_refs` to be more in-line with
      existing cleanup tasks
    * Add systemd units to enqueue the cleanup task automatically
    * Change the default retention to two hours (from 30 minutes)
    * Use the modification time instead of the access time because the access
      time might be updated very to easily unintendedly
    * Use signal guard to retry cleanup in case the gru service is restarted
    * See https://progress.opensuse.org/issues/154783
    Martchus authored and kalikiana committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    124af5c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    64cd052 View commit details
    Browse the repository at this point in the history