Skip to content

Conversation

anwesha-palit-redhat
Copy link
Contributor

@anwesha-palit-redhat anwesha-palit-redhat commented Sep 22, 2025

Out of Scope

  • This story does not include the work for pac or other tools to generate these new deep-link URLs. It only covers the console's ability to interpret them.
  • This does not involve creating new APIs or modifying the backend. This is a front-end/UI routing enhancement.
  • The fundamental appearance or functionality of the log viewer itself is not being changed.

Approach (Required)

The proposed approach is to use a URL query parameter to specify the target step.

  1. Define a URL convention to include the step name.

    • Current URL:
      /k8s/ns/<namespace>/tekton.dev~v1beta1~PipelineRun/<pipelinerun-name>/logs?taskName=<task-name>
      
    • Proposed URL:
      /k8s/ns/<namespace>/tekton.dev~v1beta1~PipelineRun/<pipelinerun-name>/logs?taskName=<task-name>&step=<step-name>
      
  2. Update routing logic in the OpenShift Console front-end for the PipelineRun and TaskRun details pages to parse the step query parameter.

  3. On page load, if the step parameter is present in the URL:

    • The component will search for a step matching the provided name.
    • If a match is found, the UI will automatically scroll to that step in the list and expand its details/log view.
    • If no matching step is found, the page should load gracefully as it normally would, without displaying an error.

Dependencies

  • While there are no blocking stories, the full value of this feature is realized when client tools (like Pipelines-as-Code) are updated to generate these deep links.

Acceptance Criteria (Mandatory)

  • PipelineRun with valid step

    • GIVEN I have a URL for a PipelineRun AND I append a valid query parameter ?step=<existing-step-name>,
    • WHEN I navigate to this URL in my browser,
    • THEN the PipelineRun details page loads, automatically scrolls to the specified step, and expands its log viewer.
  • TaskRun with valid step

    • GIVEN I have a URL for a TaskRun AND I append a valid query parameter ?step=<existing-step-name>,
    • WHEN I navigate to this URL in my browser,
    • THEN the TaskRun details page loads, automatically scrolls to the specified step, and expands its log viewer.
  • Invalid step name

    • GIVEN I have a URL for a PipelineRun or TaskRun AND I append a query parameter for a step that does not exist (e.g., &step=non-existent-step),
    • WHEN I navigate to this URL,
    • THEN the page loads normally without error and without expanding any specific step.
  • Manual interaction

    • GIVEN I am viewing a PipelineRun or TaskRun details page,
    • WHEN I manually click to expand or collapse a step,
    • THEN the URL in the browser's address bar should not change.

Screen Recording

Untitled.mov

Copy link
Contributor

openshift-ci bot commented Sep 22, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: anwesha-palit-redhat
Once this PR has been reviewed and has the lgtm label, please assign vdemeester for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@anwesha-palit-redhat anwesha-palit-redhat changed the title feat: added step url navigation in pipeline run log tab feat: [SRVKP-8326] added step url navigation in pipeline run log tab Sep 22, 2025
Copy link
Member

@vikram-raj vikram-raj left a comment

Choose a reason for hiding this comment

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

Looks like it is only working for first task of the PLR. If I pass the other taskName apart from first one then it does not work.

PLR-log-step-highlighter.mov

Comment on lines +233 to +234
new RegExp(`(${searchTerm})`, 'gi'),
'\x1b[48;2;253;240;171m\x1b[38;2;21;21;21m$1\x1b[0m',
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a couple of lines of comments here for easy to understand what the regex does?

@vikram-raj vikram-raj changed the title feat: [SRVKP-8326] added step url navigation in pipeline run log tab [feat] SRVKP-8326: added step url navigation in pipeline run log tab Sep 26, 2025
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Sep 26, 2025

@anwesha-palit-redhat: This pull request references SRVKP-8326 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set.

In response to this:

Out of Scope

  • This story does not include the work for pac or other tools to generate these new deep-link URLs. It only covers the console's ability to interpret them.
  • This does not involve creating new APIs or modifying the backend. This is a front-end/UI routing enhancement.
  • The fundamental appearance or functionality of the log viewer itself is not being changed.

Approach (Required)

The proposed approach is to use a URL query parameter to specify the target step.

  1. Define a URL convention to include the step name.
  • Current URL:
    /k8s/ns/<namespace>/tekton.dev~v1beta1~PipelineRun/<pipelinerun-name>/logs?taskName=<task-name>
    
  • Proposed URL:
    /k8s/ns/<namespace>/tekton.dev~v1beta1~PipelineRun/<pipelinerun-name>/logs?taskName=<task-name>&step=<step-name>
    
  1. Update routing logic in the OpenShift Console front-end for the PipelineRun and TaskRun details pages to parse the step query parameter.

  2. On page load, if the step parameter is present in the URL:

  • The component will search for a step matching the provided name.
  • If a match is found, the UI will automatically scroll to that step in the list and expand its details/log view.
  • If no matching step is found, the page should load gracefully as it normally would, without displaying an error.

Dependencies

  • While there are no blocking stories, the full value of this feature is realized when client tools (like Pipelines-as-Code) are updated to generate these deep links.

Acceptance Criteria (Mandatory)

  • PipelineRun with valid step

  • GIVEN I have a URL for a PipelineRun AND I append a valid query parameter ?step=<existing-step-name>,

  • WHEN I navigate to this URL in my browser,

  • THEN the PipelineRun details page loads, automatically scrolls to the specified step, and expands its log viewer.

  • TaskRun with valid step

  • GIVEN I have a URL for a TaskRun AND I append a valid query parameter ?step=<existing-step-name>,

  • WHEN I navigate to this URL in my browser,

  • THEN the TaskRun details page loads, automatically scrolls to the specified step, and expands its log viewer.

  • Invalid step name

  • GIVEN I have a URL for a PipelineRun or TaskRun AND I append a query parameter for a step that does not exist (e.g., &step=non-existent-step),

  • WHEN I navigate to this URL,

  • THEN the page loads normally without error and without expanding any specific step.

  • Manual interaction

  • GIVEN I am viewing a PipelineRun or TaskRun details page,

  • WHEN I manually click to expand or collapse a step,

  • THEN the URL in the browser's address bar should not change.

Screen Recording

Untitled.mov

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants