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

Feature request: Follow resource logs across multiple build steps #1018

Open
10hendersonm opened this issue Oct 28, 2024 · 1 comment
Open
Labels
area/ui Indicates a change to the UI enhancement Indicates an improvement to a feature status/pending Indicates the item is pending

Comments

@10hendersonm
Copy link

10hendersonm commented Oct 28, 2024

Description

A viewing option on the Build page which performs the ⏯️ start following resource logs feature until the step is complete, at which point it jumps to the next step and continues following that step's resource logs, repeating until the build is complete.

Unresolved Questions

Staged Builds?

The flow isn't too complicated for linear single-stage pipelines (step 1 finishes, step 2 opens + follows, step 2 finishes, step 3 opens + follows, ..., step 10 finishes, pipeline done), but it does get a little messy with staged pipelines.

Here are some different ideas for how to handle the order while staging:

  • Top First: Always follow the active build step which is nearest to the top of the page
    • I don't use services much and don't know if this would cause hang on those
  • Bottom First: Always follow the active build step which is nearest to the bottom of the page
    • I do have a cleanup step that exists ordinally at the end of my build, but is triggered very early in the build due to completion of a different stage. Bottom First would cause this to be not so great for my use case. Then again, when the cleanup step completed I guess it'd just find the next-most-bottom active build, so 🤷🏻
  • Follow Stages: Follow a stage step-by-step until it is complete, then move to the next stage and repeat
    • Provides a more linear, less jumpy experience, but you may miss short stages
    • Still have to then ask, do we follow the top-first or bottom-first stage upon completion of one?
  • Oldest First: Always show the active build step which has been running for the longest
    • Similar to Top First
  • Newest First: Always show the active build step started the most recently
    • Does this rip you away from steps which are still in progress to show new steps?

I'd probably recommend from a simplicity standpoint that the end user be able to toggle between Top First and Bottom First, but I haven't thought out all the implications of this so 🤷🏻

Build Completion State?

When the pipeline is done, does the view stay where the pipeline ended? Does it return to the top? If the build failed and there are rulesets for status: failure, do those steps get followed, or does the view remain on the failing step?

Value

(this should have no impact on security)

Easier Passive Notice of Build Failure

Sometimes it can be hard to notice that a build has failed. You throw the build up on a separate monitor and have it following the resource logs for the step you're interested in, but that step succeeds. A subsequent step then fails, and you haven't noticed it. You aren't near the top of the page any more, so you don't get the large red banner content. The step you were viewing shows green, and the red status of the failed step is off-screen below.

To really drive this one home, here's an example of a failed build I've experienced. I included all the extra visual junk going on in my browser to give a truly full picture of my user experience.

image

Yes, I have a tab problem.

Less Input Required when Following a Long Build

My team has 27 steps that occur in our production publish build. That's not something that you can really follow along through. You just kind of park it on the most important expected build step and wait. A failure before that point may fall victim to the point I made above.

Definition of Done

On the build page for a build which has just begun, you're able to click a single button which will cause the active step logs to be followed. When that step ends, another active step is followed, repeating until the build is complete / failed / skipped.

Effort (Optional)

I don't know much about working with the elm framework. I'd guess for a user experienced with that stack that this would be a half day of coding and testing and whatnot? I am not an experienced user, it'd probably take me a week.

Impacted Personas (Optional)

Engineering users of Vela who monitor active builds.

@10hendersonm 10hendersonm added the enhancement Indicates an improvement to a feature label Oct 28, 2024
@wass3rw3rk wass3rw3rk added the area/ui Indicates a change to the UI label Oct 28, 2024
@plyr4
Copy link
Contributor

plyr4 commented Nov 6, 2024

nice thanks for the detailed writeup

ill do some thinking on it, but in the meantime if you or anyone is curious you can find most of the follow focus logic in the logs api response handler
https://github.com/go-vela/ui/blob/main/src/elm/Pages/Org_/Repo_/Build_.elm#L410-L439
and the button that sets the follow ID
https://github.com/go-vela/ui/blob/main/src/elm/Components/Logs.elm#L450

@chrispdriscoll chrispdriscoll added the status/pending Indicates the item is pending label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui Indicates a change to the UI enhancement Indicates an improvement to a feature status/pending Indicates the item is pending
Projects
None yet
Development

No branches or pull requests

4 participants