Skip to content

kubernetes cluster: Deploying the jumpstart example for fastapi fails to render. #258

@kgartland-rstudio

Description

@kgartland-rstudio

Using the testing and kubernetes setup instructions found here:
#245

Deploy the fastapi example.

rsconnect deploy api -s http://localhost:3939 -k {API_KEY} ./

Deployment succeeds but fails to render with no errors in Connect UI.

Browser console logs:

Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Application logs:


2022/06/23 4:37:05 PM: Loading code from "main"


2022/06/23 4:37:06 PM: Starting server...


2022/06/23 4:37:06 PM: Traceback (most recent call last):


2022/06/23 4:37:06 PM: File "/opt/rstudio-connect/python/connect_api_runtime.py", line 52, in wrapper


2022/06/23 4:37:06 PM: return app(environ, start_response)


2022/06/23 4:37:06 PM: File "/opt/rstudio-connect/python/environ_middleware.py", line 17, in __call__


2022/06/23 4:37:06 PM: return self.app(environ, start_response)


2022/06/23 4:37:06 PM: File "/opt/rstudio-connect/python/root_api_console_middleware.py", line 52, in __call__


2022/06/23 4:37:06 PM: response = self.app(environ, interceptor)


2022/06/23 4:37:06 PM: File "/opt/rstudio-connect/python/connect_api_runtime.py", line 125, in wrapper


2022/06/23 4:37:06 PM: return app(environ, start_response_wrapper)


2022/06/23 4:37:06 PM: File "/opt/rstudio-connect/python/connect_api_runtime.py", line 101, in wrapper


2022/06/23 4:37:06 PM: return app(environ, start_response)


2022/06/23 4:37:06 PM: TypeError: __call__() missing 1 required positional argument: 'send'

Deploying the same app using a manifest, it succeeds.

rsconnect deploy manifest -s http://localhost:3939 -k {API_KEY} ./manifest.json --new

manifest.json:

{
  "version": 1,
  "locale": "en_US.UTF-8",
  "metadata": {
    "appmode": "python-fastapi",
    "entrypoint": "main"
  },
  "python": {
    "version": "3.8.2",
    "package_manager": {
      "name": "pip",
      "version": "22.0.4",
      "package_file": "requirements.txt"
    }
  },
  "environment": {
    "image": "rstudio/dev-connect-duplicate"
  },
  "files": {
    "requirements.txt": {
      "checksum": "e29ab3438b69b7e4e1bab7fde0a0bf9d"
    },
    "README.md": {
      "checksum": "07a155866be78c318022981a4fd02d73"
    },
    "main.py": {
      "checksum": "a8d8820f25be4dc8e2bf51a5ba1690b6"
    },
    "manifest-original.json": {
      "checksum": "e414b85f0833a0eedf72375a05321ac0"
    },
    "prices.csv": {
      "checksum": "e0bc27e3dd358c360863807e09079985"
    },
    "thumbnail.jpg": {
      "checksum": "5c5a71ff714d51af90d1b19bd3a35517"
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions