Skip to content

Fix: add scope to auth when uploading the ragfile. #5347

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Wasimhejazi
Copy link

@Wasimhejazi Wasimhejazi commented May 23, 2025

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:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)
  • Get the necessary approvals
  • Once the last commit on the PR has been approved, add the "ready to pull" label to the Pull Request

Note: do not merge your PR from GitHub. Adding the "ready to pull" label is the final step in the review process.
After approvals, the changes in your PR will be committed to the main branch and this PR will be closed.

Fixes :
fixed the following error :

app-1      |     |   File "/usr/local/lib/python3.11/site-packages/vertexai/preview/rag/rag_data.py", line 467, in upload_file
app-1      |     |     raise RuntimeError("Failed in uploading the RagFile due to: ", e) from e
app-1      |     | RuntimeError: ('Failed in uploading the RagFile due to: ', RefreshError('invalid_scope: Invalid OAuth scope or ID token audience provided.', {'error': 'invalid_scope', 'error_description': 'Invalid OAuth scope or ID token audience provided.'}))

🦕

Copy link

google-cla bot commented May 23, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: vertex-ai Issues related to the googleapis/python-aiplatform API. labels May 23, 2025
@matthew29tang matthew29tang requested a review from yinghsienwu May 29, 2025 21:12
@matthew29tang
Copy link
Contributor

Can you sign the CLA? It is required for the PR

@Wasimhejazi
Copy link
Author

@matthew29tang Sure, I've just signed it .

@matthew29tang matthew29tang self-assigned this Jun 4, 2025
@matthew29tang matthew29tang added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 4, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 4, 2025
@matthew29tang
Copy link
Contributor

matthew29tang commented Jun 4, 2025

The lint is failing, can you format the line as follows:

credentials, _ = auth.default(
    scopes=["https://www.googleapis.com/auth/cloud-platform"]
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: vertex-ai Issues related to the googleapis/python-aiplatform API. size: xs Pull request size is extra small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants