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

Forward compatibility with Commons FileUpload 2.x #70

Merged
merged 1 commit into from
May 14, 2024

Conversation

basil
Copy link
Member

@basil basil commented May 14, 2024

Using hudson.model.FileParameterValue.FileItemImpl is not only more consistent with other tests in the Jenkins ecosystem, but also relying on a Jenkins API rather than a particular third-party implementation will allow us to swap out the implementation in the future in jenkinsci/jenkins#9259 without breaking this test.

Testing done

Works with and without jenkinsci/jenkins#9259.

@basil basil requested a review from a team as a code owner May 14, 2024 00:39
Copy link
Member

@jtnord jtnord left a comment

Choose a reason for hiding this comment

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

the forward compatability would be fine - but the code and the PR summary do not completely match.

Not merging to leave the author a chance to comment as to if they care or not

@@ -64,7 +65,7 @@ public void secretFileBaseTestWithDeprecatedCtor() throws IOException, URISyntax
}

private void secretFileTest(boolean useDeprecatedConstructor) throws IOException, URISyntaxException {
DiskFileItem fileItem = createEmptyFileItem();
FileItem fileItem = createEmptyFileItem();
Copy link
Member

@jtnord jtnord May 14, 2024

Choose a reason for hiding this comment

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

also relying on a Jenkins API rather than a particular third-party implementation will allow us to swap out the implementation in the future in jenkinsci/jenkins#9259 without breaking this test.

this is org.apache.commons.fileupload.FileItem and not a Jenkins API so this is still tied to an implementation (ie commons file upload) (albeit less of an implementation than before as this covers both v1 and v2).

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes exactly; your understanding is correct. I'll clarify this in detail when I write this up.

@jtnord jtnord requested a review from a team May 14, 2024 08:50
@basil basil merged commit 468b97b into jenkinsci:master May 14, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants