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

declarative-pipeline-migration-assistant-plugin no longer compiles #3872

Closed
basil opened this issue Dec 19, 2023 · 13 comments
Closed

declarative-pipeline-migration-assistant-plugin no longer compiles #3872

basil opened this issue Dec 19, 2023 · 13 comments
Assignees

Comments

@basil
Copy link
Collaborator

basil commented Dec 19, 2023

Service(s)

Artifactory

Summary

declarative-pipeline-migration-assistant-plugin, which is in BOM, no longer seems to compile. mvn clean verify -DskipTests shows:

[ERROR] Failed to execute goal on project declarative-pipeline-migration-assistant: Could not resolve dependencies for project org.jenkins-ci.plugins.to-declarative:declarative-pipeline-migration-assistant:hpi:1.6.2-SNAPSHOT: Failed to collect dependencies at org.jenkins-ci.plugins:jira:jar:3.9 -> com.atlassian.jira:jira-rest-java-client-core:jar:5.2.4 -> com.atlassian.event:atlassian-event:jar:4.1.1: Failed to read artifact descriptor for com.atlassian.event:atlassian-event:jar:4.1.1: The following artifacts could not be resolved: com.atlassian.pom:base-pom:pom:5.0.18 (absent): com.atlassian.pom:base-pom:pom:5.0.18 was not found in https://repo.jenkins-ci.org/public/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of repo.jenkins-ci.org has elapsed or updates are forced -> [Help 1]

I confirmed the plugin was building correctly after:

I didn't confirm that the plugin was building correctly after:

Reproduction steps

Run mvn clean verify -DskipTests and confirm that the plugin no longer compiles.

@basil basil added the triage Incoming issues that need review label Dec 19, 2023
@dduportal dduportal added this to the infra-team-sync-2023-12-19 milestone Dec 19, 2023
@dduportal dduportal self-assigned this Dec 19, 2023
@dduportal dduportal removed the triage Incoming issues that need review label Dec 19, 2023
@dduportal
Copy link
Contributor

dduportal commented Dec 19, 2023

Reproduction from a clean base (as ci.jenkins.io does not fail due to artifacts being cached in ACP for now)

  • Step 1: cloned the plugin repository and set it up to run with Maven 3.9.6 and Temurin JDK 17.0.9
  • Step 2: cleaned up my $HOME/.m2 directory to ensure no cache and no Maven predefined settings
  • Step 3: reproduced the error with mvn clean verify -DskipTests

Then, as Artifactory administrator:

  • Step 1: locate the missing artifact between the former used atlassian or jcenter repositories => it was in jcenter
  • Step 2: updated the jcenter-orphans filter to allow artifacts matching the pattern com/atlassian/pom/**/*
  • Step 3: ran mvn clean verify -DskipTests -U (the -U flag forces Maven to update artifacts in the local cache) which succeeded and the artifacts are now visible on https://repo.jenkins-ci.org/public
  • Step 4: "end to end" test by removing (again) my $HOME/.m2 directory and running from scratch (again) the mvn clean verify -DskipTests command

@dduportal
Copy link
Contributor

@basil can you confirm it is ok for you with the changes by closing the issue?

@basil
Copy link
Collaborator Author

basil commented Dec 19, 2023

Rather suggest upgrading the Jira dependency in declarative-pipeline-migration-assistant to a version that doesn't require any Atlassian dependencies from jcenter.

@dduportal
Copy link
Contributor

Rather suggest upgrading the Jira dependency in declarative-pipeline-migration-assistant to a version that doesn't require any Atlassian dependencies from jcenter.

I'm not sure if your comment ask the infra team to do it, or you or someone else.
I'm not willing to do it as I don't have enough time to dig in a dependency upgrade case, sorry :|

@MarkEWaite
Copy link

MarkEWaite commented Dec 19, 2023

Rather suggest upgrading the Jira dependency in declarative-pipeline-migration-assistant to a version that doesn't require any Atlassian dependencies from jcenter.

I'm not sure if your comment ask the infra team to do it, or you or someone else. I'm not willing to do it as I don't have enough time to dig in a dependency upgrade case, sorry :|

I'm interested in doing that upgrade. It will help that plugin in several ways. Submitted as:

@dduportal
Copy link
Contributor

Closing as jenkinsci/declarative-pipeline-migration-assistant-plugin#237 is merged.

If we misunderstood or missed something, please reopen with a pointer.

@basil
Copy link
Collaborator Author

basil commented Jan 2, 2024

Now that jenkinsci/declarative-pipeline-migration-assistant-plugin#237 has been merged, has the temporary workaround added in #3872 (comment) been removed?

@basil basil reopened this Jan 2, 2024
@MarkEWaite
Copy link

Now that jenkinsci/declarative-pipeline-migration-assistant-plugin#237 has been merged, has the temporary workaround added in #3872 (comment) been removed?

I don't think that the workaround can be removed without breaking the compilation of previous versions of the plugin. Have I missed something in that process?

@basil
Copy link
Collaborator Author

basil commented Jan 2, 2024

Indeed, though I do not think supporting compilation of previous versions of plugins with unusual configurations should be a goal, as this would impose a heavy operational cost (in terms of workarounds like the above with an unbounded expiration date) for too small a benefit. For example, not all previous versions of the Jira plugin compile right now after the recent Artifactory changes, and I think this is fine. If it were a goal, then we should have tested not only compilation of the main branch of the top 200 plugins but also compilation of every previous version of the top 200 plugins. I think the calculus for old versions of core is different — we should strive to support compilations of old versions of core (e.g. with the older jbcrypt) since the fact that many plugins depend on core results in the impact being far greater.

@MarkEWaite
Copy link

Thanks. I see your point.

@dduportal
Copy link
Contributor

Now that jenkinsci/declarative-pipeline-migration-assistant-plugin#237 has been merged, has the temporary workaround added in #3872 (comment) been removed?

@dduportal
Copy link
Contributor

Now that jenkinsci/declarative-pipeline-migration-assistant-plugin#237 has been merged, has the temporary workaround added in #3872 (comment) been removed?

* The pattern `com/atlassian/pom/**/*` has been removed from `jcenter-oprhans` mirror repository.

* A build on ci.jenkins.io has been triggered to check the impact: https://ci.jenkins.io/job/Plugins/job/declarative-pipeline-migration-assistant-plugin/job/master/164/console

* Currently running a build from scratch locally

Both builds are successful. I believe we should be able to close the issue: is that ok for you @basil (or did I miss something)?

@basil
Copy link
Collaborator Author

basil commented Jan 8, 2024

No, thank you very much!

@basil basil closed this as completed Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants