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

Integration tests rely on no default project found #8

Closed
chingor13 opened this issue Jan 13, 2020 · 3 comments
Closed

Integration tests rely on no default project found #8

chingor13 opened this issue Jan 13, 2020 · 3 comments
Assignees
Labels
api: storage Issues related to the googleapis/java-storage-nio API. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. release blocking Required feature/issue must be fixed prior to next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@chingor13
Copy link
Collaborator

See sample failing integration test: https://source.cloud.google.com/results/invocations/9f7be5ed-d63f-4a9a-9d5f-ca43996197bf/targets/github%2Fjava-storage-nio%2Fgoogle-cloud-nio%2Ftarget%2Ffailsafe-reports/tests;group=com.google.cloud.storage.contrib.nio.it.ITGcsNio%28sponge_log%29;test=testCantCreateWithoutUserProject;row=1

Our integration tests run on a GCE instance with a service account that has a default project set.

@chingor13 chingor13 added release blocking Required feature/issue must be fixed prior to next release. type: cleanup An internal cleanup or hygiene concern. labels Jan 13, 2020
@athakor athakor self-assigned this Jan 21, 2020
@google-cloud-label-sync google-cloud-label-sync bot added the api: storage Issues related to the googleapis/java-storage-nio API. label Jan 30, 2020
@athakor
Copy link
Contributor

athakor commented Jan 30, 2020

@chingor13 Locally working fine.something weird, i am not sure, why it's getting failed on test environment.

@athakor athakor removed their assignment Feb 27, 2020
@chingor13 chingor13 added priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed type: cleanup An internal cleanup or hygiene concern. labels Mar 4, 2020
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Mar 4, 2020
@frankyn frankyn self-assigned this Mar 6, 2020
@frankyn
Copy link
Member

frankyn commented Mar 14, 2020

@chingor13 started work in #45

Copying response in here:

Hi @chingor13, I was diving into #8 and found your PR.

IIUC, the issue here is that the service account used to execute tests has Project Owner role granted.
I was able to pass tests locally when my service account is only granted Project Editor role. The reason is that Project Owner has serviceusage.services.use. This lets requests succeed without having the user set a user_project as expected.

An alternative solution to this is to create a new service account for this project that only has Project Editor role.

This was encountered here as well: googleapis/google-cloud-java#3448

Totally open to discussing this more. I don't know where the service account is stored but I can help update it with a new service account credentials file to unblock this failure.

@chingor13
Copy link
Collaborator Author

We changed the permissions and this seems to be fixed by dropping to Project Editor. Thanks @frankyn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/java-storage-nio API. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. release blocking Required feature/issue must be fixed prior to next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

4 participants