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

Add cloudapi routes for listing and deleting composes #4154

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Commits on Oct 9, 2024

  1. jobqueue: Add AllRootJobIDs function to jobqueue

    This lists the root job UUIDs (the jobs with no dependants).
    Currently only implemented by fsjobqueue. The function for
    dbjobqueue currently returns nil.
    
    Related: RHEL-60120
    bcl committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    21f0a60 View commit details
    Browse the repository at this point in the history
  2. cloudapi: Add /composes route to list root job UUIDs

    This will be used to list the top level job UUIDs.
    
    Related: RHEL-60120
    bcl committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    ef04588 View commit details
    Browse the repository at this point in the history
  3. cloudapi: Return the list of root job UUIDs for /composes request

    Related: RHEL-60120
    bcl committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    f97f979 View commit details
    Browse the repository at this point in the history
  4. jobqueue: Add AllJobIDs function to list every job

    This function lists all of the jobs, not just the root jobs.
    Currently only implemented by fsjobqueue. The function for
    dbjobqueue currently returns nil.
    
    Related: RHEL-60120
    bcl committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    24b2448 View commit details
    Browse the repository at this point in the history
  5. jsondb: Add Remove function

    This allows database entries to be removed.
    
    Related: RHEL-60120
    bcl committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    9fc173b View commit details
    Browse the repository at this point in the history
  6. jobqueue: Add RemoveJob function

    This allows jobs to be removed from the database.
    Currently only implemented by fsjobqueue. The function for
    dbjobqueue currently returns nil.
    
    This will remove all the job files used by the root job UUID as long as
    no other job depends on them. ie. It starts at the top, and moves down
    the dependency tree until it finds a job that is also used by another
    job.
    
    Related: RHEL-60120
    bcl committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    80fe93b View commit details
    Browse the repository at this point in the history
  7. cloudapi: Add /composes/delete route to delete a job

    This will be used to delete jobs and their artifacts.
    
    Related: RHEL-60120
    bcl committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    b9c9839 View commit details
    Browse the repository at this point in the history
  8. cloudapi: Add DeleteCompose to delete a job by UUID

    This adds the handler for /composes/delete which will delete a job and
    all of its dependencies.
    
    Related: RHEL-60120
    bcl committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    991d754 View commit details
    Browse the repository at this point in the history
  9. cloudapi: Move most of getComposeStatusImpl into a function

    This makes it easier for the delete handler to test for running jobs and
    reject the delete request. The job must be either a success or failure
    before it can be deleted.
    
    Related: RHEL-60120
    bcl committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    5a2a838 View commit details
    Browse the repository at this point in the history
  10. worker: Add CleanupArtifacts function

    This removes all artifact directories, and their contents, if there
    isn't an associated Job ID (as returned by worker.Server.jobs.AllJobIDs)
    
    Related: RHEL-60120
    bcl committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    98d6265 View commit details
    Browse the repository at this point in the history
  11. cloudapi: Add artifact cleanup to delete handler

    Related: RHEL-60120
    bcl committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    f8a3bfe View commit details
    Browse the repository at this point in the history
  12. dbjobqueue: Add AllJobIDs implementation

    Related: RHEL-60120
    bcl committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    04f2773 View commit details
    Browse the repository at this point in the history
  13. dbjobqueue: Add AllRootJobIDs implementation

    Related: RHEL-60120
    bcl committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    8dd4409 View commit details
    Browse the repository at this point in the history
  14. dbjobqueue: Remove root job and unused dependencies

    This adds SQL to delete jobs and dependencies, and implements the
    database version of the RemoveJobs function.
    
    Related: RHEL-60120
    bcl committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    656fc7a View commit details
    Browse the repository at this point in the history
  15. jobqueuetest: Add new tests to TestJobQueue

    This adds tests for retrieving all job, all root jobs, and removing jobs
    and unused dependencies. These tests are run against the fsjobqueue for
    unit testing, and against dbjobqueue for integration testing.
    
    Resolves: RHEL-60120
    bcl committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    d9d43e7 View commit details
    Browse the repository at this point in the history