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

Add support for same-name file-and-directory #4267

Conversation

jean-philippe-martin
Copy link

@jean-philippe-martin jean-philippe-martin commented Dec 28, 2018

Update for the corner case of a file with a name that ends with '/', and a folder with the same name. As discussed in the issue, this can happen if a user presses "create folder" in the GCS web UI.

We now return true for both isRegularFile and isDirectory in that case if pseudodirs are enabled (as they are by default). If pseudodir is disabled then it just shows up as a file.

Fixes #3918

Update for the corner case of a file with a name that ends
with '/', and a folder with the same name. We now return
true for both isRegularFile and isDirectory in that case
if pseudodirs are enabled (as they are by default).
If pseudodir is disabled then it just shows up as a file.
@jean-philippe-martin jean-philippe-martin requested a review from a team as a code owner December 28, 2018 19:26
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 28, 2018
@chingor13 chingor13 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 2, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 2, 2019
@jean-philippe-martin
Copy link
Author

I see one of the errors is:

[INFO] Processed 45 files (3 non-complying).
[ERROR] Found 3 non-complying files, failing build
[ERROR] To fix formatting errors, run "mvn fmt:format"
[ERROR] Non complying file: /tmpfs/src/github/google-cloud-java/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileAndDirectoryAttributes.java
[ERROR] Non complying file: /tmpfs/src/github/google-cloud-java/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemProvider.java
[ERROR] Non complying file: /tmpfs/src/github/google-cloud-java/google-cloud-clients/google-cloud-contrib/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/it/ITGcsNio.java

I tried running that but got: "[ERROR] No plugin found for prefix 'fmt' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/usr/local/google/home/jpmartin/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]"

I already installed the files you recommend for intelliJ formatting but they don't work for me. I asked for help but never got it.

I can fix the files by hand, but I'm going to need to know what I should change.

@chingor13
Copy link
Contributor

chingor13 commented Jan 3, 2019

Sorry, the plugin we're using reports the wrong command to run. It should be mvn com.coveo:fmt-maven-plugin:format.

This is fixed in the plugin's master branch, but not released yet.

@jean-philippe-martin
Copy link
Author

Thank you very much, @chingor13! That worked!

@jean-philippe-martin
Copy link
Author

It looks like not all the tests reran? What do I need to do to have them run again?

@JesseLovelace JesseLovelace added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 9, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 9, 2019
@sduskis sduskis added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 7, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 7, 2019
@jean-philippe-martin
Copy link
Author

No point in continuing with this branch since the competing fix at #3918 was merged. I still think we should return a file-and-dir object but it won't be this commit as is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants