Skip to content

Add deprecation warnings to GCE provisioner (#5506)#5518

Merged
adamnovak merged 2 commits into
masterfrom
issues/5506-gce-deprecation-warnings
May 14, 2026
Merged

Add deprecation warnings to GCE provisioner (#5506)#5518
adamnovak merged 2 commits into
masterfrom
issues/5506-gce-deprecation-warnings

Conversation

@annagiroti
Copy link
Copy Markdown
Collaborator

When using the GCE provisioner, Toil will now emit deprecation warnings in gceProvisioner.py, common.py, and cwltoil.py to notify users that the GCE provisioner will be removed in a future release. Users should migrate to Kubernetes-based autoscaling.

Resolves #5506

Changelog Entry

To be copied to the draft changelog by merger:

  • PR submitter writes their recommendation for a changelog entry here

Reviewer Checklist

  • Make sure it is coming from issues/XXXX-fix-the-thing in the Toil repo, or from an external repo.
    • If it is coming from an external repo, make sure to pull it in for CI with:
      contrib/admin/test-pr otheruser theirbranchname issues/XXXX-fix-the-thing
      
    • If there is no associated issue, create one.
  • Read through the code changes. Make sure that it doesn't have:
    • Addition of trailing whitespace.
    • New variable or member names in camelCase that want to be in snake_case.
    • New functions without type hints.
    • New functions or classes without informative docstrings.
    • Changes to semantics not reflected in the relevant docstrings.
    • New or changed command line options for Toil workflows that are not reflected in docs/running/{cliOptions,cwl,wdl}.rst
    • New features without tests.
  • Comment on the lines of code where problems exist with a review comment. You can shift-click the line numbers in the diff to select multiple lines.
  • Finish the review with an overall description of your opinion.

Merger Checklist

  • Make sure the PR passed tests, including the Gitlab tests, for the most recent commit in its branch.
  • Make sure the PR has been reviewed. If not, review it. If it has been reviewed and any requested changes seem to have been addressed, proceed.
  • Merge with the Github "Squash and merge" feature.
    • If there are multiple authors' commits, add Co-authored-by to give credit to all contributing authors.
  • Copy its recommended changelog entry to the Draft Changelog.
  • Append the issue number in parentheses to the changelog entry.

@annagiroti annagiroti requested a review from adamnovak May 8, 2026 00:14
Copy link
Copy Markdown
Member

@adamnovak adamnovak left a comment

Choose a reason for hiding this comment

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

I figured this might result in multiple warnings in a single run, and I checked, and when I run a CWL workflow with the GCE provisioner I indeed see all three of these warnings in one run, with increasing levels of the logging system having been set up properly at each point.

(venv) [anovak@swords toil]% toil-cwl-runner --provisioner=gce '#workflow/github.com/denis-yuen/dockstore-whalesay:0.10'
The GCE provisioner is deprecated and will be removed in a future release. Please use Kubernetes-based autoscaling instead.
/Users/anovak/workspace/toil/venv/lib/python3.10/site-packages/google/api_core/_python_version_support.py:273: FutureWarning: You are using a Python version (3.10.18) which Google will stop supporting in new releases of google.api_core once it reaches its end of life (2026-10-04). Please upgrade to the latest Python version, or at least Python 3.11, to continue receiving updates for google.api_core past that date.
  warnings.warn(message, FutureWarning)
Toil's GCE provisioner is deprecated and will be removed in a future release. Please use Kubernetes-based autoscaling instead.
Pulling debian:8 with docker...
INFO:cwl_utils.image_puller:Pulling debian:8 with docker...
Image successfully pulled: debian:8
INFO:cwl_utils.image_puller:Image successfully pulled: debian:8
...
[2026-05-12T17:09:35-0400] [MainThread] [W] [toil.common] Toil's GCE provisioner is deprecated and will be removed in a future release. Please use Kubernetes-based autoscaling instead.
...

The warning looks the nicest (and is most noticeable, because it gets the logging colors) at the final point, which is the one that comes from common.py. I would remove the other copies of the warning and just issue it in that one place.

Is there a good reason I don't know about that explains why we'd need it in all 3 of these places?

@adamnovak adamnovak merged commit 4d93834 into master May 14, 2026
3 checks passed
@adamnovak adamnovak deleted the issues/5506-gce-deprecation-warnings branch May 14, 2026 20:28
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.

Add the deprecation warnings to Google provisioner

2 participants