Skip to content

Feat / add delete bot runs#165

Merged
cardosofede merged 5 commits into
mainfrom
feat/add_controller_performance_cache
May 27, 2026
Merged

Feat / add delete bot runs#165
cardosofede merged 5 commits into
mainfrom
feat/add_controller_performance_cache

Conversation

@cardosofede

Copy link
Copy Markdown
Contributor

No description provided.

@rapcmia rapcmia self-assigned this May 27, 2026
@rapcmia rapcmia added this to the June 2026 milestone May 27, 2026
@rapcmia rapcmia changed the title Feat/add delete bot runs Feat / add delete bot runs May 27, 2026
@rapcmia

rapcmia commented May 27, 2026

Copy link
Copy Markdown
Contributor

Commit a6d275f

  • Build hummingbot lib image from hummingbot/8249
  • Run make setup and build local docker image successfully
  • Run make deploy ok
  • The delete route uses the id, not the bot folder name or container name
  • The bot run record can be used as the API/UI tracking entry that makes a run visible in the Runs view
  • After deleting a bot run by ID, the run record no longer appears in /bot-orchestration/bot-runs. Same as condor’s bot page, run tab
  • Deleting the bot run record did not delete local bot files
  • This behavior confirms that the route removes the run tracking record only

Test delete existing bot run (archived bot) ✅

  • Deploy bot using generic.pmm_mister controller-config then archived it initial tests
  • GET /bot-orchestration/bot-runs?limit=10 showed bot run ID 1 before deletion
    curl -sS -u admin:admin 'http://localhost:8000/bot-orchestration/bot-runs?limit=10' | jq .
    
    {
      "status": "success",
      "data": [
        {
          "id": 1,
          "bot_name": "bot_20260527043219-20260527-043222",
          "instance_name": "bot_20260527043219-20260527-043222",
          "deployment_status": "ARCHIVED",
          "run_status": "STOPPED"
        }
      ],
      "total": 1,
      "limit": 10,
      "offset": 0
    }
    
  • GET /bot-orchestration/bot-runs/1 returned the same bot run before deletion
    curl -sS -u admin:admin 'http://localhost:8000/bot-orchestration/bot-runs/1' | jq .
    
    {
      "status": "success",
      "data": {
        "id": 1,
        "bot_name": "bot_20260527043219-20260527-043222",
        "instance_name": "bot_20260527043219-20260527-043222",
        "deployment_status": "ARCHIVED",
        "run_status": "STOPPED"
      }
    }
    
  • DELETE /bot-orchestration/bot-runs/1 returned success
    curl -sS -u admin:admin -X DELETE 'http://localhost:8000/bot-orchestration/bot-runs/1' | jq .
    
    {
      "status": "success",
      "message": "Bot run 1 deleted successfully",
      "bot_name": "bot_20260527043219-20260527-043222"
    }
    
  • GET /bot-orchestration/bot-runs/1 returned Bot run 1 not found after deletion
    curl -sS -u admin:admin 'http://localhost:8000/bot-orchestration/bot-runs/1' | jq .
    
    {
      "detail": "Bot run 1 not found"
    }
    
  • GET /bot-orchestration/bot-runs?limit=10 no longer listed bot run ID 1 after deletion
    curl -sS -u admin:admin 'http://localhost:8000/bot-orchestration/bot-runs?limit=10' | jq .
    
    {
      "status": "success",
      "data": [],
      "total": 0,
      "limit": 10,
      "offset": 0
    }
    

Test delete deployed bot run (active bot) ✅

  • Deploy bot owed bot_20260527054622-20260527-054625 via condor/102
  • GET /bot-orchestration/bot-runs/2 showed bot run ID 2 before deletion
    curl -sS -u admin:admin 'http://localhost:8000/bot-orchestration/bot-runs/2' | jq .
    
    {
      "status": "success",
      "data": {
        "id": 2,
        "bot_name": "bot_20260527054622-20260527-054625",
        "instance_name": "bot_20260527054622-20260527-054625",
        "deployment_status": "DEPLOYED",
        "run_status": "CREATED"
      }
    }
    
    • The bot run had deployment_status: DEPLOYED and run_status: CREATED
  • DELETE /bot-orchestration/bot-runs/2 returned success
    curl -sS -u admin:admin -X DELETE 'http://localhost:8000/bot-orchestration/bot-runs/2' | jq .
    
    {
      "status": "success",
      "message": "Bot run 2 deleted successfully",
      "bot_name": "bot_20260527054622-20260527-054625"
    }
    
    • GET /bot-orchestration/bot-runs/2 returned Bot run 2 not found after deletion
    • GET /bot-orchestration/bot-runs?limit=10 returned an empty list after deletion
  • /bot-orchestration/status still showed bot_20260527054622-20260527-054625 after the bot run record was deleted
  • Docker still showed the bot_20260527054622-20260527-054625 container as up after the bot run record was deleted
  • This confirms the route deletes the bot run database record only and it does not stop, remove, or archive the bot container

Test using condor/102

  • Delete bots from bots page, run tab ❌
    image
    #### condor/102 logs
    2026-05-27 14:53:40,256 - condor.web.routes.controller_performance - WARNING - Failed to delete bot run 'qatest01-20260527-062542' from 'local': 422, message=[{'type': 'int_parsing', 'loc': ['path', 'bot_run_id'], 'msg': 'In
    put should be a valid integer, unable to parse string as an integer', 'input': 'qatest01-20260527-062542'}], url='http://localhost:8000/bot-orchestration/bot-runs/qatest01-20260527-062542'
    
    #### hummingbot-api/165 logs 
    INFO:     172.21.0.1:33490 - "GET /bot-orchestration/controller-performance-latest HTTP/1.1" 200 OK
    2026-05-27 06:53:40,256 - root - WARNING - Validation error on DELETE /bot-orchestration/bot-runs/qatest01-20260527-062542: path -> bot_run_id: Input should be a valid integer, unable to parse string as an integer
    06:53:40.254 DELETE /bot-orchestration/bot-runs/qatest01-20260527-062542
    INFO:     172.21.0.1:33558 - "DELETE /bot-orchestration/bot-runs/qatest01-20260527-062542 HTTP/1.1" 422 Unprocessable Entity
    
    • Condor failed to delete the bot because it sent the container name instead of the expected numeric bot_run_id
    • The API returned 422 since the request used a bot name string rather than a valid numeric bot_run_id

IN PROGRESS: I have active bot deployed using condor/102 using the updated generic.pmm_mister from this PR

#### new paramters added per latest commit of this PR
- position_side: LONG # Position direction to build; use LONG/BUY for long positions or SHORT/SELL for short positions.
- global_tp_enabled: true # Turns on the overall take-profit check; use true or false.
- global_sl_enabled: true # Turns on the overall stop-loss check; use true or false.
- global_tp_activation_from: min_base # When take-profit starts checking; use always, min_base, or target_base.
- global_sl_activation_from: target_base # When stop-loss starts checking; use target_base or max_base.
- global_pnl_reference: position # How PnL is measured; use position for position size or portfolio for total quote amount.
- close_chaser_distance: 0.0001 # How close the close order stays to market price; smaller means closer.
- close_chaser_refresh_threshold: 0.0005 # How far price can move before refreshing the close order; smaller refreshes sooner.

@rapcmia rapcmia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • Tested commit a6d275f..., then retested archive-delete behavior on be930db....
  • Confirmed DELETE /bot-orchestration/bot-runs/{id} deletes bot-run records by numeric ID.
  • Confirmed stopped but not archived bot-runs return archived_folder_deleted: false.
  • Confirmed archived/stopped bot-runs return archived_folder_deleted: true and remove matching ./bots/archived/ files.
  • Found GET /bot-orchestration/bot-runs/stats still hits the {bot_run_id} route and returns an ID parsing error, but this appears to already exist on main, see issue 166
  • Confirmed latest commit 3384ab3... removes chaser fields from the pmm_mister template.
  • Successfully deployed the updated generic.pmm_mister controller config with hyperliquid_perpetual ok

@cardosofede cardosofede merged commit 77f6024 into main May 27, 2026
@rapcmia rapcmia moved this to Hummingbot-API (June) in Pull Request Board May 28, 2026
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.

2 participants