GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Update Cruise Control External Task Type by luke-e-schaefer · Pull Request #105 · scaleapi/scaleapi-python-client

Conversation

@luke-e-schaefer

@luke-e-schaefer luke-e-schaefer commented Mar 18, 2026 •
edited by greptile-apps Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Pull Request Summary

Context

The server now exposes cruise control tasks under the external type name federal2dvideoannotation instead of cruisecontrol. This affects:

  • Task creation endpoint: /task/federal2dvideoannotation
  • Task type in API responses: "federal2dvideoannotation"

Change

File: scaleapi/tasks.py

Update line 38 from:

CruiseControl = "cruisecontrol"

to:

CruiseControl = "federal2dvideoannotation"

This single change propagates to the relevant usages in scaleapi/init.py:

  • Task creation endpoint becomes task/federal2dvideoannotation (line 721)
  • Task listing filter becomes type=federal2dvideoannotation (line 690)

Description

Please include a summary of the changes. Please also include the relevant context and motivation. List any dependencies and assumptions that are required for this change.

How did you test your code?

Which of the following have you done to test your changes? Please describe the tests that you ran to verify your changes.

  • Created new unit tests in tests/ for the newly implemented methods
  • Updated existing unit tests in tests/ to cover changes made to existing methods

Checklist

Please make sure all items in this checklist have been fulfilled before sending your PR out for review!

  • I have commented my code in details, particularly in hard-to-understand areas
  • I have updated Readme.rst document with examples for newly implemented public methods
  • I have reviewed Deployment and Publishing Guide for Python SDK document
  • I incremented the SDK version in _version.py (unless this PR only updates the documentation).
  • In order to release a new version, a "Release Summary" needs to be prepared and published after the merge

Greptile Summary

This PR updates the CruiseControl entry in the TaskType enum to reflect the new backend API type name federal2dvideoannotation. Both the enum member name and its string value are updated (CruiseControl = "cruisecontrol" → Federal2dVideoAnnotation = "federal2dvideoannotation"), which correctly aligns the enum key with its value per the project's constant-naming convention. The SDK version is bumped from 2.18.2 to 2.18.3.

Key points:

  • The enum rename correctly addresses the name/value mismatch flagged in previous review.
  • Removing the public symbol TaskType.CruiseControl is a breaking change for any existing SDK consumer; a patch version bump (2.18.3) does not communicate this to users following semver — a minor or major bump would be more appropriate.
  • No deprecation alias or migration path is provided for callers using TaskType.CruiseControl.

Confidence Score: 3/5

  • Safe to merge if the breaking change is intentional and communicated; the version bump should be reconsidered.
  • The change itself is minimal and mechanically correct — the enum key and value now align. However, removing a public symbol (TaskType.CruiseControl) without a deprecation path or a semver-appropriate version bump creates a real risk of silently breaking existing SDK consumers who upgrade.
  • scaleapi/_version.py — version bump understates the breaking nature of the change; scaleapi/tasks.py — no backward-compatibility alias provided for removed enum member.

Important Files Changed

Filename Overview
scaleapi/tasks.py Renames enum member CruiseControl → Federal2dVideoAnnotation and updates its value from "cruisecontrol" to "federal2dvideoannotation" to match the new backend API type name; this is a breaking change for existing SDK consumers who reference TaskType.CruiseControl.
scaleapi/_version.py Bumps version from 2.18.2 to 2.18.3; given the breaking enum rename in tasks.py, a patch bump understates the severity of the change per semver conventions.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["SDK Consumer calls\nTaskType.CruiseControl"] -->|Before PR| B["Value: 'cruisecontrol'\nAPI endpoint: /task/cruisecontrol"]
    A -->|After PR - AttributeError| E["❌ AttributeError: CruiseControl not found"]

    C["SDK Consumer calls\nTaskType.Federal2dVideoAnnotation"] -->|After PR| D["Value: 'federal2dvideoannotation'\nAPI endpoint: /task/federal2dvideoannotation"]

    style E fill:#ff6b6b,color:#fff
    style D fill:#51cf66,color:#fff
Loading
Prompt To Fix All With AI
This is a comment left during a code review.
Path: scaleapi/tasks.py
Line: 38

Comment:
**Breaking change warrants a higher version bump**

Renaming `TaskType.CruiseControl` to `TaskType.Federal2dVideoAnnotation` removes a public enum member entirely. Any downstream code that references `TaskType.CruiseControl` will raise an `AttributeError` after upgrading. This is a **breaking API change** for existing SDK consumers.

Per semantic versioning, removing or renaming a public symbol qualifies as a breaking change and should increment the **minor** version at minimum (e.g. `2.19.0`) or the **major** version (e.g. `3.0.0`) if the project treats the public API as stable. The current bump to `2.18.3` (a patch release) signals only a backwards-compatible bug fix, which is misleading to consumers who rely on the changelog and version number to decide when to upgrade.

If backward compatibility is a concern, consider keeping the old member as a deprecated alias alongside the new one:

```python
Federal2dVideoAnnotation = "federal2dvideoannotation"
CruiseControl = "federal2dvideoannotation"  # Deprecated alias; use Federal2dVideoAnnotation
```

This allows existing users to migrate without immediately breaking.

How can I resolve this? If you propose a fix, please make it concise.

Last reviewed commit: "bump version"

Context used:

  • Rule used - Constants should accurately reflect their actual v... (source)

Learnt From
scaleapi/scaleapi#127157

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@luke-e-schaefer
update to new format
b196013
@luke-e-schaefer
luke-e-schaefer requested a review from cakhsu March 18, 2026 19:42
@luke-e-schaefer luke-e-schaefer self-assigned this Mar 18, 2026
greptile-apps[bot]
greptile-apps Bot reviewed Mar 18, 2026
View reviewed changes
Comment thread scaleapi/tasks.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@luke-e-schaefer luke-e-schaefer changed the title update to new format Update Cruise Control External Task Type Mar 18, 2026
cakhsu
cakhsu reviewed Mar 18, 2026
View reviewed changes

@cakhsu cakhsu left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

can you bump the version https://github.com/scaleapi/scaleapi-python-client/blob/master/scaleapi/_version.py?

after it's merged, it has to be deployed

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

luke-e-schaefer reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@luke-e-schaefer
bump version
2a01c27
cakhsu
cakhsu approved these changes Mar 18, 2026
View reviewed changes
vinay553
vinay553 approved these changes Mar 19, 2026
View reviewed changes
schumry
schumry approved these changes Mar 19, 2026
View reviewed changes
@schumry
schumry merged commit d2380a4 into master Mar 19, 2026
4 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@GabeBlanchard GabeBlanchard mentioned this pull request Oct 28, 2026
Add task type DataCollectionV2 #108
Merged
3 of 7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@greptile-apps greptile-apps[bot] greptile-apps[bot] left review comments
+3 more reviewers
@vinay553 vinay553 vinay553 approved these changes
@schumry schumry schumry approved these changes
@cakhsu cakhsu cakhsu approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@luke-e-schaefer luke-e-schaefer

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@luke-e-schaefer @vinay553 @schumry @cakhsu
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.