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

Use jenkins-button for Repeatable buttons #7717

Merged
merged 20 commits into from May 31, 2023

Conversation

janfaracik
Copy link
Contributor

@janfaracik janfaracik commented Mar 12, 2023

Before
image

After
image

Testing done

  • Repeatable buttons work as before, tried project configuration pages and tools page

Proposed changelog entries

  • Use jenkins-button for Repeatable buttons

Proposed upgrade guidelines

N/A

Submitter checklist

  • The Jira issue, if it exists, is well-described.
  • 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.
  • There is automated testing or an explanation as to why this change has no tests.
  • New public classes, fields, and methods are annotated with @Restricted or have @since TODO Javadocs, as appropriate.
  • New deprecations are annotated with @Deprecated(since = "TODO") or @Deprecated(forRemoval = true, since = "TODO"), if applicable.
  • 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).
  • For dependency updates, there are links to external changelogs and, if possible, full differentials.
  • For new APIs and extension points, there is a link to at least one consumer.

Desired reviewers

@jenkinsci/sig-ux

Maintainer checklist

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

  • There are at least two (2) approvals for the pull request and no outstanding requests for change.
  • Conversations in the pull request are over, or it is explicit that a reviewer is not blocking the change.
  • Changelog entries in the pull request title and/or Proposed changelog entries are accurate, human-readable, and in the imperative mood.
  • Proper changelog labels are set so that the changelog can be generated automatically.
  • 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).
  • 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).

@NotMyFault NotMyFault added web-ui The PR includes WebUI changes which may need special expertise rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted labels Mar 12, 2023
@NotMyFault NotMyFault requested review from a team March 12, 2023 23:05
@NotMyFault NotMyFault added the needs-security-review Awaiting review by a security team member label Mar 12, 2023
@timja
Copy link
Member

timja commented Mar 14, 2023

can you run this through ATH please?

@timja timja requested a review from a team March 18, 2023 11:27
Copy link
Contributor

@yaroslavafenkin yaroslavafenkin left a comment

Choose a reason for hiding this comment

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

LGTM

@yaroslavafenkin yaroslavafenkin added security-approved @jenkinsci/core-security-review reviewed this PR for security issues and removed needs-security-review Awaiting review by a security team member labels Mar 27, 2023
@timja
Copy link
Member

timja commented Mar 27, 2023

Tests failing fyi @janfaracik

@janfaracik
Copy link
Contributor Author

Hey @timja, could you lend a hand with this if you have the time? The tests aren't making much sense to me

@timja
Copy link
Member

timja commented Apr 11, 2023

Hey @timja, could you lend a hand with this if you have the time? The tests aren't making much sense to me

Run the test in a debugger, add j.pause() somewhere in it.
Open the test url, e.g. for me it was:
http://localhost:51255/jenkins/self/testNestedRadioTopButton

The url of the Jenkins instance will be logged near the beginning of testing. Append self/testNestedRadioTopButton to the end of the URL.

It will look like this:
image

The test is making sure that the payload submitted with repeatable elements is as expected, e.g.

image

When you submit it you see the JSON after the first element is not correct:

{"items": [{"moo": [{"inner": "inone"}, {"inner": "intwo"}]}, {"outer": "one", "moo": {"inner": "intwo"}}, {"outer": "two"}], "Submit": "", "Jenkins-Crumb": "test"}

Hope that helps, let me know if you need more of a hand.

@github-actions github-actions bot added the unresolved-merge-conflict There is a merge conflict with the target branch. label May 6, 2023
@github-actions
Copy link

github-actions bot commented May 6, 2023

Please take a moment and address the merge conflicts of your pull request. Thanks!

@github-actions github-actions bot removed the unresolved-merge-conflict There is a merge conflict with the target branch. label May 14, 2023
@timja
Copy link
Member

timja commented May 15, 2023

14:11:21 [ERROR] lib.form.RepeatableTest.testNestedEnabledTopButtonOuter Time elapsed: 6.624 s <<< ERROR!
14:11:21 java.lang.NullPointerException: Cannot read the array length because "this.list" is null
14:11:21 at lib.form.RepeatableTest$FooList.toString(RepeatableTest.java:424)
14:11:21 at java.base/java.lang.String.valueOf(String.java:4216)
14:11:21 at java.base/java.lang.StringBuilder.append(StringBuilder.java:173)
14:11:21 at java.base/java.util.AbstractCollection.toString(AbstractCollection.java:457)
14:11:21 at lib.form.RepeatableTest.testNestedEnabledTopButtonOuter(RepeatableTest.java:546)
14:11:21 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
14:11:21 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
14:11:21 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
14:11:21 at java.base/java.lang.reflect.Method.invoke(Method.java:568)

@janfaracik
Copy link
Contributor Author

Any idea why the build is failing @timja?

@timja
Copy link
Member

timja commented May 21, 2023

Nope not yet, the build log has this at the end:

19:13:58  java.lang.NullPointerException
19:13:59  [GitHub Checks] GitHub check (name: Jenkins, status: completed) has been published.
19:13:59  Finished: FAILURE

@timja
Copy link
Member

timja commented May 23, 2023

Any idea why the build is failing @timja?

Passing now

@timja
Copy link
Member

timja commented May 25, 2023

This PR is currently pending merge and release of jenkinsci/scriptler-plugin#59 to unblock ATH.

@NotMyFault
Copy link
Member

/label ready-for-merge


This PR is now ready for merge. We will merge it after ~24 hours if there is no negative feedback.
Please see the merge process documentation for more information about the merge process.
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 May 27, 2023
@NotMyFault NotMyFault merged commit 6e1c6ab into jenkinsci:master May 31, 2023
16 checks passed
@timja timja deleted the new-repeatable-jelly branch May 31, 2023 14:02
@basil
Copy link
Member

basil commented Jun 8, 2023

Breaks ExtendedEmailPublisherDescriptorTest#groovyClassPath with

java.lang.AssertionError: expected:<1> but was:<0>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:647)
	at org.junit.Assert.assertEquals(Assert.java:633)
	at hudson.plugins.emailext.ExtendedEmailPublisherDescriptorTest.groovyClassPath(ExtendedEmailPublisherDescriptorTest.java:325)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.jvnet.hudson.test.JenkinsRule$1.evaluate(JenkinsRule.java:608)
	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.lang.Thread.run(Thread.java:829)

MarkEWaite added a commit to MarkEWaite/bom that referenced this pull request Jun 8, 2023
UI changes in jenkinsci/jenkins#7717 changed
the contents of the DOM that the groovyClassPath() test was using for
its assertion.  Temporarily ignore that test result until a pull request
to email-ext resolves the issue.

The email-ext pull request is not ready but I will do my best to have
it ready within 48 hours so that this exclusion can truly be temporary.
MarkEWaite added a commit to jenkinsci/bom that referenced this pull request Jun 8, 2023
UI changes in jenkinsci/jenkins#7717 changed
the contents of the DOM that the groovyClassPath() test was using for
its assertion.  Temporarily ignore that test result until a pull request
to email-ext resolves the issue.

The email-ext pull request is not ready but I will do my best to have
it ready within 48 hours so that this exclusion can truly be temporary.
basil added a commit to basil/email-ext-plugin that referenced this pull request Jun 8, 2023
basil added a commit to jenkinsci/email-ext-plugin that referenced this pull request Jun 8, 2023
@basil
Copy link
Member

basil commented Jun 15, 2023

As a courtesy I have released Email Extension 2.98.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted security-approved @jenkinsci/core-security-review reviewed this PR for security issues web-ui The PR includes WebUI changes which may need special expertise
Projects
None yet
6 participants