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

Fix PCT problem of #8250 #8426

Merged
merged 2 commits into from
Aug 25, 2023
Merged

Fix PCT problem of #8250 #8426

merged 2 commits into from
Aug 25, 2023

Conversation

daniel-beck
Copy link
Member

@daniel-beck daniel-beck commented Aug 24, 2023

Amends #8250.

Passed PCT in jenkinsci/bom#2412.

Error looks a lot like what motivated jenkinsci/plugin-pom#693.

Testing done

Passed PCT in jenkinsci/bom#2412.

Proposed changelog entries

  • N/A

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

daniel-beck added a commit to daniel-beck/bom that referenced this pull request Aug 24, 2023
@daniel-beck
Copy link
Member Author

daniel-beck commented Aug 24, 2023

Looking at the test failures in jenkinsci/bom#2407, almost all failing plugins have servlet-api 3 on their classpath, indicating this is a problem with those plugins, rather than core (also demonstrated by the nature of the change in this PR).

These failing plugins have servlet-api 3 on their classpath

(per fgrep -o servlet-api/3 target/pct-work/*/target/surefire-reports/TEST-InjectedTest.xml)

  • apache-httpcomponents-client-4-api
  • apache-httpcomponents-client-5-api
  • authentication-tokens
  • checks-api
  • git-server
  • handy-uri-templates-2-api
  • jakarta-activation-api
  • jakarta-mail-api
  • javax-activation-api
  • javax-mail-api
  • jaxb
  • jjwt-api
  • jsch
  • mapdb-api
  • pam-auth
  • pipeline-github-lib
  • pipeline-graph-analysis
  • pipeline-milestone-step
  • pipeline-stage-step
  • plain-credentials
  • pubsub-light
  • rebuild
  • snakeyaml-api
  • ssh-agent
  • trilead-api
  • variant
  • workflow-step-api
  • ws-cleanup

These failing plugins don't, and they have other test failures:

For most plugins whose tests passed, I have confirmed that they lack servlet-api 3 on their classpath.

Confirmed:

  • ansicolor
  • ant
  • antisamy-markup-formatter
  • authorize-project
  • bootstrap5-api
  • bouncycastle-api
  • branch-api
  • caffeine-api
  • cloud-stats
  • cloudbees-folder
  • command-launcher
  • commons-lang3-api
  • commons-text-api
  • conditional-buildstep
  • config-file-provider
  • configuration-as-code
  • copyartifact
  • credentials
  • credentials-binding
  • custom-folder-icon
  • dark-theme
  • dashboard-view
  • data-tables-api
  • declarative-pipeline-migration-assistant
  • display-url-api
  • docker-commons
  • docker-java-api
  • durable-task
  • echarts-api
  • email-ext
  • external-monitor-job
  • favorite
  • file-parameters
  • font-awesome-api
  • forensics-api
  • git
  • git-client
  • github
  • github-api
  • github-branch-source
  • gitlab-api
  • gitlab-branch-source
  • gitlab-oauth
  • gitlab-plugin
  • htmlpublisher
  • http_request
  • instance-identity
  • ionicons-api
  • jackson2-api
  • jacoco
  • javadoc
  • jdk-tool
  • jersey2-api
  • jnr-posix-api
  • jquery3-api
  • junit
  • junit-attachments
  • ldap
  • lockable-resources
  • mailer
  • matrix-auth
  • matrix-project
  • maven-plugin
  • metrics
  • mina-sshd-api-core
  • mina-sshd-api-common
  • okhttp-api
  • parameterized-trigger
  • pipeline-build-step
  • pipeline-input-step
  • pipeline-model-definition
  • pipeline-stage-view
  • pipeline-utility-steps
  • plugin-util-api
  • resource-disposer
  • role-strategy
  • run-condition
  • saml
  • scm-api
  • slack
  • ssh-credentials
  • ssh-slaves
  • sshd
  • structs
  • subversion
  • support-core
  • theme-manager
  • throttle-concurrents
  • timestamper
  • token-macro
  • workflow-api
  • workflow-basic-steps
  • workflow-cps
  • workflow-job
  • workflow-multibranch
  • workflow-scm-step
  • workflow-support

Unconfirmed (got artifactIds wrong):

  • aws-java-sdk
  • blueocean

So while this workaround fixes PCT runs, longer term whatever's wrong with these plugins that puts servlet-api 3 on their classpath should be fixed.

@timja timja added the skip-changelog Should not be shown in the changelog label Aug 24, 2023
@timja timja requested a review from a team August 24, 2023 13:12
@MarkEWaite
Copy link
Contributor

Looking at the test failures in jenkinsci/bom#2407, almost all failing plugins have servlet-api 3 on their classpath, indicating this is a problem with those plugins, rather than core (also demonstrated by the nature of the change in this PR).

I need more education to understand why servlet-api 3 would be on the classpath of the apache-httpcomponents-client-4-api-plugin when running the injected test. The dependency tree (mvn dependency:tree) for apache-httpcomponents-client-4-api-plugin reports jakarta.servlet:jakarta.servlet-api:jar:4.0.4:provided and does not mention servlet-api 3 anywhere in its output.

Click to show `mvn dependency:tree` output
mvn dependency:tree
[INFO] Scanning for projects...
[INFO]
[INFO] -----< org.jenkins-ci.plugins:apache-httpcomponents-client-4-api >------
[INFO] Building Jenkins Apache HttpComponents Client 4.x API Plugin 4.5.14-999999-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ hpi ]---------------------------------
[INFO]
[INFO] --- dependency:3.6.0:tree (default-cli) @ apache-httpcomponents-client-4-api ---
[INFO] org.jenkins-ci.plugins:apache-httpcomponents-client-4-api:hpi:4.5.14-999999-SNAPSHOT
[INFO] +- org.apache.httpcomponents:fluent-hc:jar:4.5.14:compile
[INFO] +- org.apache.httpcomponents:httpasyncclient:jar:4.1.5:compile
[INFO] +- org.apache.httpcomponents:httpasyncclient-cache:jar:4.1.5:compile
[INFO] +- org.apache.httpcomponents:httpclient:jar:4.5.14:compile
[INFO] +- org.apache.httpcomponents:httpclient-cache:jar:4.5.14:compile
[INFO] +- org.apache.httpcomponents:httpcore:jar:4.4.16:compile
[INFO] +- org.apache.httpcomponents:httpcore-nio:jar:4.4.16:compile
[INFO] +- org.apache.httpcomponents:httpmime:jar:4.5.14:compile
[INFO] +- org.jenkins-ci.main:jenkins-core:jar:2.387.3:provided
[INFO] |  +- org.jenkins-ci.main:cli:jar:2.387.3:provided
[INFO] |  +- org.jenkins-ci.main:remoting:jar:3107.v665000b_51092:provided
[INFO] |  +- args4j:args4j:jar:2.33:provided
[INFO] |  +- com.github.spotbugs:spotbugs-annotations:jar:4.7.3:provided
[INFO] |  +- com.google.guava:guava:jar:31.1-jre:provided
[INFO] |  |  +- com.google.guava:failureaccess:jar:1.0.1:provided
[INFO] |  |  +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:provided
[INFO] |  |  \- com.google.code.findbugs:jsr305:jar:3.0.1:provided
[INFO] |  +- com.google.inject:guice:jar:5.1.0:provided
[INFO] |  |  \- javax.inject:javax.inject:jar:1:provided
[INFO] |  +- com.infradna.tool:bridge-method-annotation:jar:1.25:provided
[INFO] |  +- com.jcraft:jzlib:jar:1.1.3-kohsuke-1:provided
[INFO] |  +- com.sun.solaris:embedded_su4j:jar:1.1:provided
[INFO] |  +- com.sun.xml.txw2:txw2:jar:20110809:provided
[INFO] |  |  \- relaxngDatatype:relaxngDatatype:jar:20020414:provided
[INFO] |  +- com.thoughtworks.xstream:xstream:jar:1.4.20:provided
[INFO] |  |  \- io.github.x-stream:mxparser:jar:1.2.2:provided
[INFO] |  +- commons-beanutils:commons-beanutils:jar:1.9.4:provided
[INFO] |  +- commons-codec:commons-codec:jar:1.15:provided
[INFO] |  +- commons-collections:commons-collections:jar:3.2.2:provided
[INFO] |  +- commons-fileupload:commons-fileupload:jar:1.5:provided
[INFO] |  +- commons-io:commons-io:jar:2.11.0:provided
[INFO] |  +- commons-jelly:commons-jelly-tags-fmt:jar:1.0:provided
[INFO] |  +- commons-jelly:commons-jelly-tags-xml:jar:1.1:provided
[INFO] |  +- commons-lang:commons-lang:jar:2.6:provided
[INFO] |  +- io.jenkins.stapler:jenkins-stapler-support:jar:1.1:provided
[INFO] |  +- jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:jar:1.2.7:provided
[INFO] |  +- jaxen:jaxen:jar:2.0.0:provided
[INFO] |  +- jline:jline:jar:2.14.6:provided
[INFO] |  +- net.java.dev.jna:jna:jar:5.12.1:provided
[INFO] |  +- net.java.sezpoz:sezpoz:jar:1.13:provided
[INFO] |  +- net.jcip:jcip-annotations:jar:1.0:provided
[INFO] |  +- net.sf.kxml:kxml2:jar:2.3.0:provided
[INFO] |  +- org.antlr:antlr4-runtime:jar:4.11.1:provided
[INFO] |  +- org.apache.ant:ant:jar:1.10.12:provided
[INFO] |  |  \- org.apache.ant:ant-launcher:jar:1.10.12:provided
[INFO] |  +- org.apache.commons:commons-compress:jar:1.22:provided
[INFO] |  +- org.codehaus.groovy:groovy-all:jar:2.4.21:provided
[INFO] |  +- org.connectbot.jbcrypt:jbcrypt:jar:1.0.0:provided
[INFO] |  +- org.fusesource.jansi:jansi:jar:1.11:provided
[INFO] |  +- org.jenkins-ci:annotation-indexer:jar:1.17:provided
[INFO] |  +- org.jenkins-ci:commons-jexl:jar:1.1-jenkins-20111212:provided
[INFO] |  +- org.jenkins-ci:crypto-util:jar:1.8:provided
[INFO] |  +- org.jenkins-ci:memory-monitor:jar:1.12:provided
[INFO] |  +- org.jenkins-ci:symbol-annotation:jar:1.24:provided
[INFO] |  +- org.jenkins-ci:task-reactor:jar:1.8:provided
[INFO] |  +- org.jenkins-ci:version-number:jar:1.11:provided
[INFO] |  +- org.jenkins-ci.main:websocket-spi:jar:2.387.3:provided
[INFO] |  +- org.jfree:jfreechart:jar:1.0.19:provided
[INFO] |  |  \- org.jfree:jcommon:jar:1.0.23:provided
[INFO] |  +- org.jvnet.hudson:commons-jelly-tags-define:jar:1.0.1-hudson-20071021:provided
[INFO] |  +- org.jvnet.localizer:localizer:jar:1.31:provided
[INFO] |  +- org.jvnet.robust-http-client:robust-http-client:jar:1.2:provided
[INFO] |  +- org.jvnet.winp:winp:jar:1.30:provided
[INFO] |  +- org.kohsuke:access-modifier-annotation:jar:1.30:provided
[INFO] |  +- org.kohsuke:windows-package-checker:jar:1.2:provided
[INFO] |  +- org.kohsuke.jinterop:j-interop:jar:2.0.8-kohsuke-1:provided
[INFO] |  |  \- org.kohsuke.jinterop:j-interopdeps:jar:2.0.8-kohsuke-1:provided
[INFO] |  |     \- org.samba.jcifs:jcifs:jar:1.3.18-kohsuke-1:provided
[INFO] |  +- org.kohsuke.stapler:json-lib:jar:2.4-jenkins-3:provided
[INFO] |  |  \- net.sf.ezmorph:ezmorph:jar:1.0.6:provided
[INFO] |  +- org.kohsuke.stapler:stapler:jar:1756.1758.v13fcdc2c8c34:provided
[INFO] |  |  +- commons-discovery:commons-discovery:jar:0.5:provided
[INFO] |  |  +- jakarta.annotation:jakarta.annotation-api:jar:2.1.1:provided
[INFO] |  |  +- javax.annotation:javax.annotation-api:jar:1.3.2:provided
[INFO] |  |  \- org.jvnet:tiger-types:jar:2.2:provided
[INFO] |  +- org.kohsuke.stapler:stapler-adjunct-codemirror:jar:1.3:provided
[INFO] |  +- org.kohsuke.stapler:stapler-adjunct-timeline:jar:1.5:provided
[INFO] |  +- org.kohsuke.stapler:stapler-groovy:jar:1756.1758.v13fcdc2c8c34:provided
[INFO] |  |  \- org.kohsuke.stapler:stapler-jelly:jar:1756.1758.v13fcdc2c8c34:provided
[INFO] |  |     +- org.dom4j:dom4j:jar:2.1.3:provided
[INFO] |  |     \- org.jenkins-ci:commons-jelly:jar:1.1-jenkins-20220630:provided
[INFO] |  +- org.ow2.asm:asm:jar:9.4:provided
[INFO] |  +- org.ow2.asm:asm-analysis:jar:9.4:provided
[INFO] |  +- org.ow2.asm:asm-commons:jar:9.4:provided
[INFO] |  +- org.ow2.asm:asm-tree:jar:9.4:provided
[INFO] |  +- org.ow2.asm:asm-util:jar:9.4:provided
[INFO] |  +- org.slf4j:jcl-over-slf4j:jar:2.0.6:provided
[INFO] |  |  \- org.slf4j:slf4j-api:jar:2.0.6:provided
[INFO] |  +- org.slf4j:log4j-over-slf4j:jar:2.0.6:provided
[INFO] |  +- org.springframework.security:spring-security-web:jar:5.8.1:provided
[INFO] |  |  +- org.springframework.security:spring-security-core:jar:5.8.1:provided
[INFO] |  |  |  \- org.springframework.security:spring-security-crypto:jar:5.8.1:provided
[INFO] |  |  +- org.springframework:spring-core:jar:5.3.24:provided
[INFO] |  |  +- org.springframework:spring-aop:jar:5.3.24:provided
[INFO] |  |  +- org.springframework:spring-beans:jar:5.3.24:provided
[INFO] |  |  +- org.springframework:spring-context:jar:5.3.24:provided
[INFO] |  |  +- org.springframework:spring-expression:jar:5.3.24:provided
[INFO] |  |  \- org.springframework:spring-web:jar:5.3.24:provided
[INFO] |  \- xpp3:xpp3:jar:1.1.4c:provided
[INFO] +- org.jenkins-ci.main:jenkins-war:executable-war:2.387.3:test
[INFO] |  +- org.jenkins-ci.main:websocket-jetty10:jar:2.387.3:test
[INFO] |  |  \- org.kohsuke.metainf-services:metainf-services:jar:1.9:test
[INFO] |  +- org.jenkins-ci.main:websocket-jetty9:jar:2.387.3:test
[INFO] |  \- org.slf4j:slf4j-jdk14:jar:2.0.6:test
[INFO] +- jakarta.servlet:jakarta.servlet-api:jar:4.0.4:provided
[INFO] +- commons-logging:commons-logging:jar:1.2:provided
[INFO] +- org.jenkins-ci.main:jenkins-test-harness:jar:2044.v03c87927ff5c:test
[INFO] |  +- io.jenkins.lib:support-log-formatter:jar:1.2:test
[INFO] |  +- junit:junit:jar:4.13.2:test
[INFO] |  |  \- org.hamcrest:hamcrest-core:jar:2.2:test
[INFO] |  +- org.eclipse.jetty:jetty-security:jar:10.0.15:test
[INFO] |  |  \- org.eclipse.jetty:jetty-server:jar:10.0.15:test
[INFO] |  |     +- org.eclipse.jetty:jetty-http:jar:10.0.15:test
[INFO] |  |     \- org.eclipse.jetty:jetty-io:jar:10.0.15:test
[INFO] |  +- org.eclipse.jetty:jetty-webapp:jar:10.0.15:test
[INFO] |  |  +- org.eclipse.jetty:jetty-servlet:jar:10.0.15:test
[INFO] |  |  \- org.eclipse.jetty:jetty-xml:jar:10.0.15:test
[INFO] |  |     \- org.eclipse.jetty:jetty-util:jar:10.0.15:test
[INFO] |  +- org.eclipse.jetty.websocket:websocket-jetty-server:jar:10.0.15:test
[INFO] |  |  +- org.eclipse.jetty.websocket:websocket-jetty-api:jar:10.0.15:test
[INFO] |  |  +- org.eclipse.jetty.websocket:websocket-jetty-common:jar:10.0.15:test
[INFO] |  |  |  \- org.eclipse.jetty.websocket:websocket-core-common:jar:10.0.15:test
[INFO] |  |  +- org.eclipse.jetty.websocket:websocket-servlet:jar:10.0.15:test
[INFO] |  |  |  \- org.eclipse.jetty.websocket:websocket-core-server:jar:10.0.15:test
[INFO] |  |  \- org.eclipse.jetty.toolchain:jetty-servlet-api:jar:4.0.6:test
[INFO] |  +- org.hamcrest:hamcrest:jar:2.2:test
[INFO] |  +- org.jenkins-ci.main:jenkins-test-harness-htmlunit:jar:152.vb_7b_348664557:test
[INFO] |  +- org.junit.jupiter:junit-jupiter-api:jar:5.10.0:test
[INFO] |  |  +- org.opentest4j:opentest4j:jar:1.3.0:test
[INFO] |  |  \- org.junit.platform:junit-platform-commons:jar:1.10.0:test
[INFO] |  +- org.netbeans.modules:org-netbeans-insane:jar:RELEASE180:test
[INFO] |  +- org.openjdk.jmh:jmh-core:jar:1.36:test
[INFO] |  |  +- net.sf.jopt-simple:jopt-simple:jar:5.0.4:test
[INFO] |  |  \- org.apache.commons:commons-math3:jar:3.2:test
[INFO] |  \- org.openjdk.jmh:jmh-generator-annprocess:jar:1.36:test
[INFO] +- org.jenkins-ci:test-annotations:jar:1.4:test
[INFO] +- org.junit.jupiter:junit-jupiter:jar:5.10.0:test
[INFO] |  +- org.junit.jupiter:junit-jupiter-params:jar:5.10.0:test
[INFO] |  \- org.junit.jupiter:junit-jupiter-engine:jar:5.10.0:test
[INFO] \- org.junit.vintage:junit-vintage-engine:jar:5.10.0:test
[INFO]    +- org.junit.platform:junit-platform-engine:jar:1.10.0:test
[INFO]    \- org.apiguardian:apiguardian-api:jar:1.1.2:test
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.760 s
[INFO] Finished at: 2023-08-24T08:25:47-06:00
[INFO] ------------------------------------------------------------------------

Compilation finished at Thu Aug 24 08:25:48

I don't understand what I will need to change in apache-httpcomponents-client-4-api-plugin in order to avoid it including servlet-api 3 in the classpath when running the injected test. Can someone point me in the right direction?

If changes are needed in that many plugins before this can pass in the plugin bill of materials, should we consider reverting the 404 page improvement until the plugin test fixes are released?

Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

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

Thanks! Approving this because it improves the current situation and seems low risk

Copy link
Member

@basil basil left a comment

Choose a reason for hiding this comment

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

Good workaround until more plugins are released with a parent POM that includes jenkinsci/plugin-pom#693.


This PR is now ready for merge. We will merge it after approximately 24 hours if there is no negative feedback. Please see the merge process documentation for more information about the merge process. Thanks!

@basil basil self-assigned this Aug 24, 2023
@timja
Copy link
Member

timja commented Aug 24, 2023

I need more education to understand why servlet-api 3 would be on the classpath of the apache-httpcomponents-client-4-api-plugin when running the injected test

as alluded to by Basil, the http client has not had a release in many months and is using an old version of the parent pom:
https://github.com/jenkinsci/apache-httpcomponents-client-4-api-plugin/blob/7ab9d17134a5926b061f8f25a1f7787b2fea990f/pom.xml#L8

@daniel-beck
Copy link
Member Author

should we consider reverting the 404 page improvement until the plugin test fixes are released

Would be completely unjustified.

@MarkEWaite
Copy link
Contributor

I need more education to understand why servlet-api 3 would be on the classpath of the apache-httpcomponents-client-4-api-plugin when running the injected test

as alluded to by Basil, the http client has not had a release in many months and is using an old version of the parent pom: https://github.com/jenkinsci/apache-httpcomponents-client-4-api-plugin/blob/7ab9d17134a5926b061f8f25a1f7787b2fea990f/pom.xml#L8

Thanks very much. That answers my question about resolving the issue in the plugin tests.

@MarkEWaite
Copy link
Contributor

should we consider reverting the 404 page improvement until the plugin test fixes are released

Would be completely unjustified.

Thanks. That's good to know.

@MarkEWaite MarkEWaite added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Aug 24, 2023
@timja timja merged commit 262e65c into jenkinsci:master Aug 25, 2023
18 checks passed
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 skip-changelog Should not be shown in the changelog
Projects
None yet
5 participants