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

Refactor Resource interface #5422

Merged
merged 7 commits into from May 2, 2024

Conversation

labkey-matthewb
Copy link
Contributor

@labkey-matthewb labkey-matthewb commented Apr 10, 2024

Rationale

Remove ambiguous methods in interface Resource.
Prefer Path and Path.Part to ambiguous usage of String.

Related Pull Requests

Changes

Path.getPathPart()
FileUtil.appendName()

@labkey-matthewb labkey-matthewb marked this pull request as ready for review May 1, 2024 17:28
@labkey-jeckels
Copy link
Contributor

Did this break the FileContent tests?

Copy link
Contributor

@labkey-jeckels labkey-jeckels left a comment

Choose a reason for hiding this comment

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

This looks good, with the possible exception of the FileContent test failure.

return new Path(subDirs);
// TODO: Schema names can contains slashes (e.g. assay names)
// TODO: Not sure how the callers deal with this, when they map these into file-system directories.
// TODO: We could throw IllegalArgument and let the caller handle it.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd vote for replacing / with_. If we throw a runtime exception, it's unlikely that callers will know they may need to deal with it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't want to break things in release branch.

Copy link
Contributor

@labkey-jeckels labkey-jeckels left a comment

Choose a reason for hiding this comment

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

Should we add a warning on callers of new File(File, String)?

@labkey-matthewb
Copy link
Contributor Author

Should we add a warning on callers of new File(File, String)?

Yes, on develop

@labkey-matthewb
Copy link
Contributor Author

Did this break the FileContent tests?

Hmm, passed several times... Let's see what teamcity says...

@labkey-matthewb
Copy link
Contributor Author

labkey-matthewb commented May 2, 2024

Did this break the FileContent tests?

The sendDigest functionality seems to be sensitive to database/webserver time mismatch.
And also a missing null check

@labkey-matthewb labkey-matthewb merged commit 5a4ec2f into release24.3-SNAPSHOT May 2, 2024
6 checks passed
@labkey-matthewb labkey-matthewb deleted the 24.3_fb_resource_refactor branch May 2, 2024 16:32
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.

None yet

2 participants