Skip to content
This repository was archived by the owner on Apr 2, 2026. It is now read-only.

fix: use projectId from CloudStorageConfig#429

Merged
gcf-merge-on-green[bot] merged 1 commit into
masterfrom
fix-user-project-failure
Feb 12, 2021
Merged

fix: use projectId from CloudStorageConfig#429
gcf-merge-on-green[bot] merged 1 commit into
masterfrom
fix-user-project-failure

Conversation

@frankyn
Copy link
Copy Markdown
Contributor

@frankyn frankyn commented Feb 11, 2021

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)

Fixes #352 ☕️

@frankyn frankyn requested a review from a team February 11, 2021 06:07
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Feb 11, 2021
@product-auto-label product-auto-label Bot added the api: storage Issues related to the googleapis/java-storage-nio API. label Feb 11, 2021
@frankyn frankyn requested a review from BenWhitehead February 11, 2021 06:07
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 11, 2021

Codecov Report

Merging #429 (0a02af3) into master (3a3d465) will increase coverage by 0.27%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #429      +/-   ##
============================================
+ Coverage     72.29%   72.57%   +0.27%     
  Complexity      500      500              
============================================
  Files            29       29              
  Lines          1664     1670       +6     
  Branches        277      276       -1     
============================================
+ Hits           1203     1212       +9     
+ Misses          336      335       -1     
+ Partials        125      123       -2     
Impacted Files Coverage Δ Complexity Δ
...le/cloud/storage/contrib/nio/CloudStoragePath.java 78.63% <100.00%> (+2.95%) 52.00 <0.00> (+1.00)
...ud/storage/contrib/nio/testing/FakeStorageRpc.java 70.96% <0.00%> (-0.47%) 47.00% <0.00%> (-1.00%)
...ge/contrib/nio/CloudStorageFileSystemProvider.java 63.23% <0.00%> (ø) 76.00% <0.00%> (ø%)
...storage/contrib/nio/CloudStorageConfiguration.java 88.46% <0.00%> (+2.56%) 14.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a3d465...0f64570. Read the comment docs.

import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

/** Unit tests for {@link CloudStorageFileSystemProvider} late initialization. */
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: I don't think this comment is true

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

lol.... copy paste disaster over here!

fileSystem.provider().getProject() == null
? null
: Storage.BlobListOption.userProject(fileSystem.provider().getProject()));
String userProject = fileSystem.config().userProject();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Am I understanding correctly, the bug was reading projectId from the ServiceOptions instead of from the CloudStorageConfig? If so, can we update the commit comment to explain this fact?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good call, that's much clearer.

@frankyn frankyn force-pushed the fix-user-project-failure branch from f97db4d to 0f64570 Compare February 12, 2021 01:12
@frankyn frankyn changed the title fix: incorrectly used userProject fix: use projectId from CloudStorageConfig Feb 12, 2021
@frankyn frankyn added the automerge Merge the pull request once unit tests and other checks pass. label Feb 12, 2021
@gcf-merge-on-green gcf-merge-on-green Bot merged commit b6ec240 into master Feb 12, 2021
@gcf-merge-on-green gcf-merge-on-green Bot deleted the fix-user-project-failure branch February 12, 2021 01:22
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Feb 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: storage Issues related to the googleapis/java-storage-nio API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error when we try to check if a file is a directory on google buckets

2 participants