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-72854] UX improvement: make pod templates readonly from UI for NonConfigurableKubernetesCloud #1566

Conversation

Pldi23
Copy link
Contributor

@Pldi23 Pldi23 commented May 30, 2024

https://issues.jenkins.io/browse/JENKINS-72854

This issue is just a UX issue, backend do not save changes in pod templates for NonConfigurableKubernetesCloud (covered by NonConfigurableKubernetesCloudTest#configRoundTrip). But users are very confused as they may assume that changes should be saved.

Testing done

I tested manually by running NonConfigurableKubernetesCloudTest#configRoundTrip, I stopped the test in debug mode and verified that for NonConfigurableKubernetesCloud Pod templates can not be edited anymore from UI, user see the message This Pod template is associated with a non-configurable cloud setup. , "Save" button is not visible and "Delete Pod Template" on side panel is not visible.
For KubernetesCloud no changes on UX (it is still configrable).

Screenshot 2024-06-03 at 12 34 38

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@Pldi23 Pldi23 requested a review from a team as a code owner May 30, 2024 06:44
@Vlatombe
Copy link
Member

Vlatombe commented May 30, 2024

There is a built-in mechanism in core to switch all controls to readonly

<j:set var="readOnlyMode" value="${instance.readonlyFromUi}"/>

@Pldi23
Copy link
Contributor Author

Pldi23 commented May 30, 2024

There is a built-in mechanism in core to switch all controls to readonly

<j:set var="readOnlyMode" value="${instance.readonlyFromUi}"/>

@Vlatombe, Yeah, I tried to use it but enum dropdown is still active with it.
Screenshot 2024-05-30 at 10 17 50

@jglick
Copy link
Member

jglick commented May 30, 2024

So fix enum.jelly in core?

@Pldi23
Copy link
Contributor Author

Pldi23 commented May 30, 2024

So fix enum.jelly in core?

Ok, I agree it's more rational. Let's fix this in core.

Copy link
Member

@aneveux aneveux left a comment

Choose a reason for hiding this comment

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

LGTM

@jglick
Copy link
Member

jglick commented May 31, 2024

Should this be closed in favor of jenkinsci/jenkins#9336?

@Pldi23
Copy link
Contributor Author

Pldi23 commented May 31, 2024

Should this be closed in favor of jenkinsci/jenkins#9336?

No, we need both: current one and jenkinsci/jenkins#9336

@Pldi23
Copy link
Contributor Author

Pldi23 commented Jun 3, 2024

@Vlatombe , @jglick If you are ok with this change could you please merge the PR (I don't have a required permissions).

@jglick jglick requested a review from a team June 3, 2024 14:49
Copy link
Member

@Vlatombe Vlatombe left a comment

Choose a reason for hiding this comment

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

A few simplifications could be applied, but otherwise it looks good.

Pldi23 and others added 3 commits June 4, 2024 08:19
@Pldi23
Copy link
Contributor Author

Pldi23 commented Jun 4, 2024

CI failure seems not related to the fix, might be a flake, @Vlatombe can you please retrigger the ci again as I don't have permissions?

@Vlatombe Vlatombe enabled auto-merge (squash) June 5, 2024 06:10
@Vlatombe Vlatombe merged commit d4efa21 into jenkinsci:master Jun 5, 2024
6 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.

4 participants