HarrisKirk / blue-green-dreams

2 stars 1 forks source link

TypeError since removing all artifacts #129

Closed HarrisKirk closed 7 months ago

HarrisKirk commented 7 months ago

This error started when I deleted all clusters. I suspect the initial check for the existing items cannot handle the empty results properly. The error has nothing to do with the Flake8 merge since the same error happens on an earlier commit.

To reproduce, run "make deploy-test". The error happens immediately.

chrissound commented 7 months ago

I assume this is a typo and make deploy_test is what is meant to run.

I've tried that but I don't seem to run into the same error (from master branch which is commit 29a114e629e345becec2adce5135b8bf13176a98) immediately.

Was this run locally? Are you able to replicate again and provide the full error?

make deploy_test
sha256:7ae795aed559991c1a6dfd2372fa48e356ff640eeed067c63694ba853ee40e00
.
----------------------------------------------------------------------
Ran 1 test in 0.000s

OK
2024-02-12 at 18:29:53 DEBUG     _invoke_rest_call             () REST call to /lke/clusters 
2024-02-12 at 18:29:53 DEBUG     _new_conn                     () Starting new HTTPS connection (1): api.linode.com:443 
2024-02-12 at 18:29:53 DEBUG     _make_request                 () https://api.linode.com:443 "GET /v4/lke/clusters HTTP/1.1" 200 49 
2024-02-12 at 18:29:53 DEBUG     _invoke_rest_call             () {
    "data": [],
    "page": 1,
    "pages": 1,
    "results": 0
} 
2024-02-12 at 18:29:53 DEBUG     _invoke_rest_call             () REST call to /nodebalancers 
2024-02-12 at 18:29:53 DEBUG     _new_conn                     () Starting new HTTPS connection (1): api.linode.com:443 
2024-02-12 at 18:29:54 DEBUG     _make_request                 () https://api.linode.com:443 "GET /v4/nodebalancers HTTP/1.1" 200 648 
2024-02-12 at 18:29:54 DEBUG     _invoke_rest_call             () {
    "data": [
        {
            "client_conn_throttle": 20,
            "created": "2023-11-04T17:48:00",
            "hostname": null,
            "id": 473856,
            "ipv4": null,
            "ipv6": null,
            "label": "ccm-7cb5ce23bc1f",
            "region": "us-east",
            "tags": [],
            "transfer": {
                "in": 5.918576240539551,
                "out": 149.30475330352783,
                "total": 155.22332954406738
            },
            "updated": "2024-01-29T11:23:02"
        },
        {
            "client_conn_throttle": 20,
            "created": "2023-12-28T17:27:04",
            "hostname": "172-234-2-223.ip.linodeusercontent.com",
            "id": 504559,
            "ipv4": "172.234.2.223",
            "ipv6": "2600:3c03:1::acea:02df",
            "label": "ccm-0ee82da222e4",
            "region": "us-east",
            "tags": [],
            "transfer": {
                "in": 15.278080940246582,
                "out": 12.194659233093262,
                "total": 27.472740173339844
            },
            "updated": "2024-01-29T11:21:31"
        },
        {
            "client_conn_throttle": 20,
            "created": "2024-01-16T17:37:00",
            "hostname": "170-187-131-18.ip.linodeusercontent.com",
            "id": 515337,
            "ipv4": "170.187.131.18",
            "ipv6": "2600:3c03:1::aabb:8312",
            "label": "ccm-e479a9728449",
            "region": "us-east",
            "tags": [
                "env_christest-a1",
                "project_bgd"
            ],
            "transfer": {
                "in": 13.811553001403809,
                "out": 11.127213478088379,
                "total": 24.938766479492188
            },
            "updated": "2024-01-29T11:08:45"
        },
        {
            "client_conn_throttle": 20,
            "created": "2024-01-18T23:31:53",
            "hostname": "143-42-127-200.ip.linodeusercontent.com",
            "id": 517288,
            "ipv4": "143.42.127.200",
            "ipv6": "2600:3c03:1::8f2a:7fc8",
            "label": "ccm-950069e5013f",
            "region": "us-east",
            "tags": [],
            "transfer": {
                "in": 13.961522102355957,
                "out": 11.381609916687012,
                "total": 25.34313201904297
            },
            "updated": "2024-01-29T11:06:37"
        }
    ],
    "page": 1,
    "pages": 1,
    "results": 4
} 
2024-02-12 at 18:29:54 DEBUG     get_nodebalancer_id           () The tags associated with 473856 are: {} 
2024-02-12 at 18:29:54 DEBUG     get_nodebalancer_id           () The tags associated with 504559 are: {} 
2024-02-12 at 18:29:54 DEBUG     get_nodebalancer_id           () The tags associated with 515337 are: {'env': 'christest-a1', 'project': 'bgd'} 
2024-02-12 at 18:29:54 DEBUG     get_nodebalancer_id           () The tags associated with 517288 are: {} 
2024-02-12 at 18:29:54 DEBUG     execute_linode_cli            () linode-cli linodes list --tags project_bgd --tags env_test --json 
2024-02-12 at 18:29:54 DEBUG     execute_linode_cli            () [] 
2024-02-12 at 18:29:54 INFO      deploy                        () Creating k8s environment 'test' with keep=False 
2024-02-12 at 18:29:54 DEBUG     execute_linode_cli            () linode-cli lke cluster-create --tags env_test --tags project_bgd --label bgd cluster for test --region us-east --node_pools.type g6-standard-1 --k8s_version 1.28 --node_pools.count 2 --json 
2024-02-12 at 18:30:15 DEBUG     execute_linode_cli            () [
  {
    "id": 156122,
    "created": "2024-02-12T18:29:56",
    "updated": "2024-02-12T18:29:56",
    "label": "bgd cluster for test",
    "region": "us-east",
    "k8s_version": "1.28",
    "control_plane": {
      "high_availability": false
    },
    "tags": [
      "env_test",
      "project_bgd"
    ]
  }
] 
2024-02-12 at 18:30:15 INFO      deploy_kubernetes_artifacts   () Cluster id '156122' was created 
2024-02-12 at 18:30:15 INFO      deploy_kubernetes_artifacts   () Waiting to receive kubeconfig... 
2024-02-12 at 18:30:15 DEBUG     execute_linode_cli            () linode-cli lke kubeconfig-view 156122 --json 
2024-02-12 at 18:30:16 DEBUG     execute_linode_cli            ()  
2024-02-12 at 18:30:16 DEBUG     execute_linode_cli            () The API responded with version 4.172.3, which is newer than the CLI's version of 4.157.1.  Please update the CLI to get access to the newest features.  You can update with a simple `pip3 install --upgrade linode-cli`
Request failed: 503
[{"field": "", "reason": "Cluster kubeconfig is not yet available. Please try again later."}]

2024-02-12 at 18:30:16 WARNING   __retry_internal              () , retrying in 60 seconds... 
2024-02-12 at 18:31:16 DEBUG     execute_linode_cli            () linode-cli lke kubeconfig-view 156122 --json 
2024-02-12 at 18:31:17 DEBUG     execute_linode_cli            ()  
2024-02-12 at 18:31:17 DEBUG     execute_linode_cli            () The API responded with version 4.172.3, which is newer than the CLI's version of 4.157.1.  Please update the CLI to get access to the newest features.  You can update with a simple `pip3 install --upgrade linode-cli`
Request failed: 503
[{"field": "", "reason": "Cluster kubeconfig is not yet available. Please try again later."}]
 ...
HarrisKirk commented 7 months ago

Closing this ticket since the problem was my bad token