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

[JENKINS-72978] Remove executors widget from Dashboard and nodes page #9126

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

timja
Copy link
Member

@timja timja commented Apr 4, 2024

See JENKINS-72978.

Implements https://matrix.to/#/!HKutvjxPnajVyCNLhF:matrix.org/$kfLAa91tXfp6Gv10PgoY8i7GM3GgqfDG_pz39-nWsDQ?via=gitter.im&via=matrix.org&via=mozilla.org

Adds a replacement page with the same information. I thought about redesigning it but I didn't think it made sense to do in this pull request.

image

This could fairly easily be detached to a plugin if people really want this still.

Testing done

manually checked the widget doesn't exist anymore except on the computer page

Proposed changelog entries

  • JENKINS-72978, Removed executor status from dashboard, executor status can now be viewed from Manage Jenkins -> Nodes -> Status

Proposed upgrade guidelines

N/A

Submitter checklist

Edit tasklist title
Beta Give feedback Tasklist Submitter checklist, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. The Jira issue, if it exists, is well-described.
    Options
  2. The changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developers, depending on the change) and are in the imperative mood (see examples). Fill in the Proposed upgrade guidelines section only if there are breaking changes or changes that may require extra steps from users during upgrade.
    Options
  3. There is automated testing or an explanation as to why this change has no tests.
    Options
  4. New public classes, fields, and methods are annotated with @Restricted or have @since TODO Javadocs, as appropriate.
    Options
  5. New deprecations are annotated with @Deprecated(since = "TODO") or @Deprecated(forRemoval = true, since = "TODO"), if applicable.
    Options
  6. New or substantially changed JavaScript is not defined inline and does not call eval to ease future introduction of Content Security Policy (CSP) directives (see documentation).
    Options
  7. For dependency updates, there are links to external changelogs and, if possible, full differentials.
    Options
  8. For new APIs and extension points, there is a link to at least one consumer.
    Options

Desired reviewers

@mention

Before the changes are marked as ready-for-merge:

Maintainer checklist

Edit tasklist title
Beta Give feedback Tasklist Maintainer checklist, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. There are at least two (2) approvals for the pull request and no outstanding requests for change.
    Options
  2. Conversations in the pull request are over, or it is explicit that a reviewer is not blocking the change.
    Options
  3. Changelog entries in the pull request title and/or Proposed changelog entries are accurate, human-readable, and in the imperative mood.
    Options
  4. Proper changelog labels are set so that the changelog can be generated automatically.
    Options
  5. If the change needs additional upgrade steps from users, the upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the pull request title (see example).
    Options
  6. If it would make sense to backport the change to LTS, a Jira issue must exist, be a Bug or Improvement, and be labeled as lts-candidate to be considered (see query).
    Options

@timja timja added the rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted label Apr 4, 2024
@timja timja requested review from daniel-beck and a team April 4, 2024 22:40
@timja timja added the web-ui The PR includes WebUI changes which may need special expertise label Apr 4, 2024
@NotMyFault
Copy link
Member

This is indeed pretty neat. Would it be useful, for a limited period of time, to display a link in the position of the current executor widget, that takes you to the new overview?

@timja timja changed the title Remove executors widget [JENKINS-72978] Remove executors widget Apr 6, 2024
@timja
Copy link
Member Author

timja commented Apr 6, 2024

This is indeed pretty neat. Would it be useful, for a limited period of time, to display a link in the position of the current executor widget, that takes you to the new overview?

I think changelog is probably ok, I've added a link to the nodes page for low privileged users as there was no way for them to get there now

@timja timja marked this pull request as ready for review April 6, 2024 16:31
@mawinter69
Copy link
Contributor

mawinter69 commented Apr 7, 2024

A major drawback is that the executors widget is now also removed from individual agents.
image
It is essential to know when looking at an agent to know if any executors are busy to decide if I can safely delete/disconnect the agent

@mawinter69
Copy link
Contributor

Maybe we can just remove the Factories for views ViewFactoryImpl and ComputerSet ComputerSetFactoryImpl, Can we then reuse the t:executors on the new status page? The main task of showing the running builds is done by executorCell.jelly files which can be found in core and durable-task-step plugin, so in order to redesign it might require changes in that plugin as well. (See also #8459)

@timja
Copy link
Member Author

timja commented Apr 8, 2024

Maybe we can just remove the Factories for views ViewFactoryImpl and ComputerSet ComputerSetFactoryImpl

Makes sense

Can we then reuse the t:executors on the new status page?

What's the reason to reuse it on the status page? Its current setup assumes its in the sidepanel and likely needs some changes to make it fit in properly, I've done a minimal bit so that it looks okay for now though.

@mawinter69
Copy link
Contributor

If we keep the widget for computers and also have the status page we would duplicate the code. And the differences are minimal.
Using

    <l:main-panel>
      <l:app-bar title="${%Status}"/>
      <div id="side-panel">
      <t:executors/>
      </div>
    </l:main-panel>

also works now, just a bit different styling.
image

Another aspect is the auto refresh, which is missing (also doesn't work with my approach but only because the url to fetch the data is wrong)

@timja
Copy link
Member Author

timja commented Apr 8, 2024

Another aspect is the auto refresh, which is missing (also doesn't work with my approach but only because the url to fetch the data is wrong)

Yeah I wasn't sure if we wanted that or not, can add it though if worth it. There's a smaller risk of people leaving it open forever and lots of polling updates.

also works now, just a bit different styling.

Yeah styling is a bit messed up though I had to make some minor changes to the markup to make it work like removing float:right and a couple of other things

@timja timja changed the title [JENKINS-72978] Remove executors widget [JENKINS-72978] Remove executors widget from Dashboard and nodes page Apr 8, 2024
@timja timja requested a review from mawinter69 April 8, 2024 20:59
Copy link
Contributor

@mawinter69 mawinter69 left a comment

Choose a reason for hiding this comment

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

One comment, not really a blocker but something to think about

core/src/main/resources/hudson/model/View/sidepanel.jelly Outdated Show resolved Hide resolved
@timja
Copy link
Member Author

timja commented Apr 15, 2024

/label ready-for-merge


This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback.

Thanks!

@comment-ops-bot comment-ops-bot bot added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Apr 15, 2024
@daniel-beck daniel-beck removed the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Apr 16, 2024
@daniel-beck
Copy link
Member

I'd like an opportunity to review :) Thanks!

@daniel-beck
Copy link
Member

daniel-beck commented Apr 17, 2024

What's the intended level of done-ness of this PR? This looks like a reasonable first step and implements the high-level request, but doesn't go much further than that. For example

/**
* If true, only show relevant executors
*/
protected boolean filterExecutors;
is now obsolete and probably should be made @Deprecated, transient and Boolean.

Some less clear interaction issues:

  1. It's difficult to get from a blocked build in the queue to the UI that allows fixing the blockage, now that the widgets aren't stacked right on top of each other. The hourglass icon is the only added UI element, and it just links to https://www.jenkins.io/redirect/troubleshooting/executor-starvation
  2. It's unclear what the expected flow is for an admin to (wait to) restart Jenkins once it's safe to do so.

This could fairly easily be detached to a plugin if people really want this still.

IMO most of the information being presented should remain accessible to users who administer Jenkins. I don't think anyone cares about which # executor a build is running on, but the rest seems interesting. The widget on the computer view answers the question, which job is currently using this node; while the new Status page does the same across all nodes (like the widget did before) and e.g. tells admins how far a potential "quiet down" has been successful.

Thoughts about delivering this as a UI experiment that users can opt out of, just in case? (Then of course without removal of filterExecutors for now.)

(FTR I'm trying to find the time to look into moving the widget into a popup, like admin monitors, with some similarity to the redesign prototype.)

@mawinter69
Copy link
Contributor

mawinter69 commented Apr 17, 2024

Independent of this change I think the widget could be improved by not showing idle executors. I have a few agents that perform small jobs that usually take not more than 1 minute but sometimes they can also run much longer. So these agents have 15 executors but most of the time only 1 or 2 are busy if at all. The idle executors don't need to be shown here, instead we could add the # of busy/total executors after the agent name
Something like this:
image

I've seen Jenkins instances that have 3 or 4 agents with 500 executors. At times most are idle and then you need to scroll down a lot if you like to see some other agents

@mawinter69
Copy link
Contributor

What would be also helpful is if one could collapse the executors of a single agent like you can collapse the complete widget

@daniel-beck
Copy link
Member

not showing idle executors

Basically what I mentioned as

I don't think anyone cares about which # executor a build is running on

The specific executor assignment wasn't even useful information when it was in the sidepanel, only used/total would be relevant IMO. But that's an easy followup (or even independent parallel) change to make.

@mawinter69
Copy link
Contributor

created #9177 with the idle executors removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted web-ui The PR includes WebUI changes which may need special expertise
Projects
None yet
4 participants