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

Return compose request details as part of metadata response #4451

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

Conversation

bcl
Copy link
Contributor

@bcl bcl commented Oct 29, 2024

This pull request includes:

  • adequate testing for the new functionality or fixed issue
  • adequate documentation informing people about the change such as
    • submit a PR for the READMEs listed here
    • submit a PR for the osbuild.org website repository if this PR changed any behavior not covered by the automatically updated READMEs

@bcl bcl force-pushed the main-metadata-request branch from ca6d2fb to df51355 Compare November 15, 2024 18:12
@bcl bcl requested a review from schuellerf November 26, 2024 23:28
@bcl bcl force-pushed the main-metadata-request branch from df51355 to fd7d358 Compare November 26, 2024 23:40
schuellerf
schuellerf previously approved these changes Nov 27, 2024
Copy link
Contributor

@schuellerf schuellerf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I got it correct, this is only for on-prem as it will be empty in the service, right?
To get it consistent we would need to extend image-builder to also return the request by just getting it from the image-builder DB (json or postgres) in a subsequent PR.
otherwise it LGTM

@schuellerf
Copy link
Contributor

schuellerf commented Nov 27, 2024

Two questions aside:

  • where does the issue (triggering this PR) come from, which problem does it solve?
  • is this ComposeMetadata → request (similar to the ComposeMetadata → packages) big? would it make sense to be able to mask it in the getComposeMetadata request by something like getComposeMetadata → hide_{packages,request}

(it's a bit confusing that there is a request in the response, but I hope my comment is somehow readable)

@bcl
Copy link
Contributor Author

bcl commented Dec 2, 2024

This is part of https://issues.redhat.com/browse/COMPOSER-2131 (which is also related to cockpit-composer using cloudapi instead of weldr).

The request is in the response because I want to reuse the openapi structure instead of reinventing and copying, etc. I don't think size is a consideration, it will be as big as the original request so I don't see any reason to complicate things by trying to hide it.

ETA: And yes, it is on-prem only for now, conditional on the artifact directory being used. Using the db is beyond the scope of this PR and can be added later if needed.

bcl added 5 commits December 17, 2024 08:30
This will allow clients to display more information about a compose,
including the image type created, arch and distro, and blueprint to
customizations used to create it.

Related: RHEL-60120
This will help make it easier to write the original compose request json
to the same directory tree.

Related: RHEL-60120
The original compose request contains useful details that are not
preserved when it is converted to a manifest. Things like the
distribution, arch, image type, blueprint or customizations are useful
when examining builds later.

This saves the original request json using the job id and a new
directory (ComposeRequest) under the artifacts directory. The original
request, if present, is then added to the compose/<id>/metadata response
alongside the package list.

Related: RHEL-60120
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants