Skip to content

feat(x2a): added /projects/:projectId/modules/:moduleId/log endpoint#2249

Merged
elai-shalev merged 1 commit intoredhat-developer:mainfrom
eloycoto:wt-logs-streaming
Feb 5, 2026
Merged

feat(x2a): added /projects/:projectId/modules/:moduleId/log endpoint#2249
elai-shalev merged 1 commit intoredhat-developer:mainfrom
eloycoto:wt-logs-streaming

Conversation

@eloycoto
Copy link
Copy Markdown
Contributor

@eloycoto eloycoto commented Feb 4, 2026

  • Openapi definition and generated files.
  • Router defitinition:
    • Rbac
    • Check with project/module
    • Check if the job has been finished.
    • k8s integration if not finished with streaming support.
  • Test for the router.

Hey, I just made a Pull Request!

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

@rhdh-gh-app
Copy link
Copy Markdown

rhdh-gh-app Bot commented Feb 4, 2026

Missing Changesets

The following package(s) are changed by this PR but do not have a changeset:

  • @red-hat-developer-hub/backstage-plugin-x2a-backend
  • @red-hat-developer-hub/backstage-plugin-x2a-common

See CONTRIBUTING.md for more information about how to add changesets.

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-x2a-backend workspaces/x2a/plugins/x2a-backend none v1.0.0
@red-hat-developer-hub/backstage-plugin-x2a-common workspaces/x2a/plugins/x2a-common none v1.0.0

- Openapi definition and generated files.
- Router defitinition:
    - Rbac
    - Check with project/module
    - Check if the job has been finished.
    - k8s integration if not finished with streaming support.
- Test for the router.

Signed-off-by: Eloy Coto <eloy.coto@acalustra.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

@elai-shalev elai-shalev left a comment

Choose a reason for hiding this comment

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

looks good, except one comment

router.get('/projects/:projectId/modules/:moduleId/log', async (req, res) => {
const endpoint = 'GET /projects/:projectId/modules/:moduleId/log';
const { projectId, moduleId } = req.params;
const streaming = req.query.streaming === true;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should this be "true" instead? aren't query params string?
the condition may always be false because of it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it's a boolean, no?

        - in: query
          name: streaming
          schema:
            type: boolean
          required: false
          description: Whether to stream logs (text/plain) or return all at once

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yeah probably

@elai-shalev elai-shalev merged commit d13a155 into redhat-developer:main Feb 5, 2026
9 checks passed
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.

2 participants