Skip to content

Conversation

@brajrajnagar
Copy link

What changed

Backtrack & cleanup now runs only when deployment fails. It no longer runs after successful deployments.

Why

Previously, Right after successful deployment user is asked "Do you want to backtrack and clean up?" Which is ambiguous and could lead to unintentionally deletion of deployments or model versions.

New behavior

  • Cleanup runs only on deployment failure
  • No cleanup or prompt on successful deployment

Testing

  • Verified successful deployment does not trigger cleanup
  • Verified failed deployment triggers backtrack & cleanup

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

Code Coverage

Package Line Rate Health
clarifai 45%
clarifai.cli 61%
clarifai.cli.templates 46%
clarifai.client 68%
clarifai.client.auth 67%
clarifai.constants 100%
clarifai.datasets 100%
clarifai.datasets.export 80%
clarifai.datasets.upload 75%
clarifai.datasets.upload.loaders 37%
clarifai.models 100%
clarifai.modules 0%
clarifai.rag 0%
clarifai.runners 52%
clarifai.runners.models 61%
clarifai.runners.pipeline_steps 41%
clarifai.runners.pipelines 77%
clarifai.runners.utils 62%
clarifai.runners.utils.data_types 72%
clarifai.schema 100%
clarifai.urls 60%
clarifai.utils 60%
clarifai.utils.evaluation 67%
clarifai.workflows 95%
Summary 63% (9206 / 14653)

Minimum allowed line rate is 50%

@ackizilkale
Copy link
Contributor

How was this tested @brajrajnagar ?

@ackizilkale
Copy link
Contributor

cause looking at the code I do not understand which change disables backtrack path for successful deployment

@brajrajnagar
Copy link
Author

brajrajnagar commented Jan 9, 2026

@ackizilkale from line 2050 to 2057 I commented It gives users backtrack and cleanup option after deployment Which is confusing for user .
from line 2039 to 2048 I added backtrack_workflow to cleanup failed uploads and deployments.
It tested as expected for successful as well as for failed deployment.

@ackizilkale
Copy link
Contributor

Why not just this? max_retries seems to be 1 anyway.

if success:
    state.update(...)
    print("Model deployed successfully!")
    time.sleep(2)
else:  # Deployment failed
    logger.warning("Deployment failed. Initiating backtrack & cleanup.")
    backtrack_workflow(state)
    return

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants