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

Stop persisting deprecated artifactoryServers on serialization #492

Closed
wants to merge 1 commit into from
Closed

Conversation

basil
Copy link

@basil basil commented May 28, 2021

See JENKINS-65687. Amends #455, which broke JCasC export. Fixes this regression by marking the deprecated artifactoryServers field with transient, which causes XStream not to serialize the (already migrated!) field as described in the Jenkins developer documentation.

(Note that the common convention in Jenkins plugins is to perform such migration logic in an XStream readResolve() method, as described in the above developer documentation, but the JFrog Artifactory plugin does this in a dedicated ArtifactoryBuilderConverter class.)

@timja
Copy link

timja commented May 28, 2021

Have you got time to add a test here @basil? To stop this happening again?

@basil
Copy link
Author

basil commented May 28, 2021

I don't have the time, but I agree that this would be a useful action item for the maintainers of this plugin.

@Or-Geva
Copy link

Or-Geva commented May 28, 2021

Thank you @basil for this contribution!. We appreciate your time and effort.
However, doesn't Jenkins-Artifactory-Plugin 3.11.2 remedy JENKINS-65687 issue?.

@basil
Copy link
Author

basil commented May 28, 2021

However, doesn't Jenkins-Artifactory-Plugin 3.11.2 remedy JENKINS-65687 issue?.

If it does, then JENKINS-65687 was not updated to indicate a resolution.

@Or-Geva
Copy link

Or-Geva commented May 30, 2021

@basil, according to your input, do we still need this fix?

@basil
Copy link
Author

basil commented May 30, 2021

I suggest you read the the Jenkins developer documentation I linked to in the PR description. Yes, this fix is needed to delete the old <artifactoryServers> section from org.jfrog.hudson.ArtifactoryBuilder.xml after the migration takes place.

@Or-Geva
Copy link

Or-Geva commented May 30, 2021

Thanks for the response @basil.
If we do merge this now, the old configuration will get deleted, and as a result, a downgrade back to an older version wouldn't be possible. This will affect everyone, include users who don't use JCasC

@basil
Copy link
Author

basil commented May 30, 2021

The Jenkins project generally does not support downgrades. In general it is expected that upgrades may perform irreversible data migration and that users who wish to be able to downgrade should back up their Jenkins home directory prior to upgrading.

@eyalbe4
Copy link

eyalbe4 commented May 30, 2021

@basil,
Maybe we can postpone this change a bit, to allow people who do want to downgrade,.to do so. Once we're sure the new functionality is 100% bullet proof, we'll go ahead and implement this cham.
Release 3.11.0 included a complete rewrite of the Artifactory client.

@basil
Copy link
Author

basil commented Jan 16, 2022

@basil, Maybe we can postpone this change a bit, to allow people who do want to downgrade,.to do so. Once we're sure the new functionality is 100% bullet proof, we'll go ahead and implement this cham.

But 7 months later?

This pull request was closed.
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