Skip to content

Add a client-side HTTP method fallback for pre-24.03.7 servers for session-download function #3179

Open
@achimnol

Description

@achimnol

After #2635 has been applied (24.03.7+), the manager now accepts POST requests while replying the GET requests with a deprecation warning (HTTP 400 Bad Request) for the session-download API (backend.ai session download command), which is often used to fetch a random-generated or user-configured id_container SSH private key in various client-side SSH applications such as backend.ai ssh command.

The problem is that when using a latest client, a server older than 24.03.7 simply rejects the POST requests with HTTP 405 Method Not Allowed error, which may surprise the latest client SDK users who use it against our cloud (24.03.4 now).

Let's add a fallback mechanism to the client so that it retries using the GET method when it observes 405, so that it could work with old servers as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions