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

Support refreshing service connector credentials in the Vertex step operator to support long-running jobs #2198

Merged
merged 2 commits into from
Jan 11, 2024

Conversation

stefannica
Copy link
Contributor

@stefannica stefannica commented Dec 22, 2023

Describe changes

When synchronous orchestrators and step operator runs take a long time to complete, the service connector credentials used to poll their status can expire. This PR only addresses this problem for the Vertex step operator by refreshing credentials before they expire and can cause errors. A generic solution that targets all affected orchestrators, step operators and potentially other stack components will be devised in a separate upcoming change request.

Pre-requisites

Please ensure you have done the following:

  • I have read the CONTRIBUTING.md document.
  • If my change requires a change to docs, I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • I have based my new branch on develop and the open PR is targeting develop. If your branch wasn't based on develop read Contribution guide on rebasing branch to develop.
  • If my changes require changes to the dashboard, these changes are communicated/requested.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (add details above)

Copy link
Contributor

coderabbitai bot commented Dec 22, 2023

Important

Auto Review Skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository.

To trigger a single review, invoke the @coderabbitai review command.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@github-actions github-actions bot added internal To filter out internal PRs and issues bug Something isn't working labels Dec 22, 2023
Copy link
Contributor

@strickvl strickvl left a comment

Choose a reason for hiding this comment

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

LGTM assuming you've tested that this works on Sagemaker.

Makes me wonder whether we shouldn't be doing something like this across the board with other orchestrators and/or step operators...

@htahir1
Copy link
Contributor

htahir1 commented Jan 2, 2024

@stefannica i would also say that we should add this to basically everywhere right?

@stefannica stefannica changed the title Refresh creds on step operator job polling Support refreshing service connector credentials on step operator and orchestrator job polling Jan 9, 2024
@stefannica stefannica changed the title Support refreshing service connector credentials on step operator and orchestrator job polling Support refreshing service connector credentials in the Vertex step operator to support long-running jobs Jan 10, 2024
@stefannica stefannica force-pushed the bug/oss-2712-fix-vertex-token-expiration branch from c3a889f to 8613105 Compare January 10, 2024 08:30
@stefannica
Copy link
Contributor Author

stefannica commented Jan 10, 2024

@strickvl @htahir1 I decided to make this PR only about the Vertex step operator. I need to think about a generic solution for all other orchestrators/step operators and potentially other stack components that can be linked to service connectors. Implementing individual solutions for each case proved to be very hacky and prone to becoming outdated and buggy over time.

@stefannica stefannica force-pushed the bug/oss-2712-fix-vertex-token-expiration branch from 5bec282 to 5f1cf41 Compare January 11, 2024 16:43
@stefannica stefannica merged commit a1824a1 into develop Jan 11, 2024
29 checks passed
@stefannica stefannica deleted the bug/oss-2712-fix-vertex-token-expiration branch January 11, 2024 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working internal To filter out internal PRs and issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants