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

Enable minimal functionality of private worker pools with Cloud Build & Cloud Scheduler #211

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

joranE
Copy link

@joranE joranE commented Nov 30, 2023

This is an extremely minimal first pass. My aim here was to make creating & scheduling a build work when the yaml specifies a private worker pool by setting the option

pool:
  name: projects/{projects}/locations/{location}/workerPools/{worker-name}

The general strategy I took was to create a helper function that tests whether the build yaml has set the above option, and then create the API uri differently in that case. I've verified that a basic workflow using cr_build(), cr_schedule_http() & cr_schedule() work with private worker pools with these changes. I couldn't run the tests, even with no changes, tons of stuff was failing right out of the gate, so I'm not 100% sure of how much other stuff I might have broken with these changes.

If you think this is a decent approach I'll try manually testing other parts of the package to see if there are other places similar adjustments may be needed to handle private worker pools.

…creates helper function to detect if the build specifies a private worker pool and logic in cr_build & cr_build_status to use the correct api endpoint in that case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant