Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

v0.7.1 client incompatible with earlier versions of the service #107

Closed
whbruce opened this issue Mar 4, 2022 · 1 comment
Closed

v0.7.1 client incompatible with earlier versions of the service #107

whbruce opened this issue Mar 4, 2022 · 1 comment
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@whbruce
Copy link

whbruce commented Mar 4, 2022

vaclient was updated to use the new "instance only" REST api calls (see "What's Changed" section of release notes). These calls are not supported by older versions of the service so vaclient will fail as follows:

./vaclient/vaclient.sh run object_detection/person_vehicle_bike https://github.com/intel-iot-devkit/sample-videos/blob/master/person-bicycle-car-detection.mp4?raw=true
<snip>
Starting pipeline object_detection/person_vehicle_bike, instance = 1
Got unsuccessful status code: 400
"Invalid Pipeline or Version"
Error in pipeline, please check pipeline-server log messages

Sever log from v0.7.0 or earlier will show the following

{"levelname": "INFO", "asctime": "2022-03-04 05:22:22,474", "message": "Creating Instance of Pipeline object_detection/person_vehicle_bike", "module": "pipeline_manager"}
{"levelname": "WARNING", "asctime": "2022-03-04 05:22:22,507", "message": "Invalid pipeline or version", "module": "pipeline_manager"}
WARNING:tornado.access:400 GET /pipelines/status/1 (172.17.0.1) 1.50ms
{"levelname": "INFO", "asctime": "2022-03-04 05:22:23,707", "message": "Setting Pipeline 1 State to RUNNING", "module": "gstreamer_pipeline"}
{"levelname": "INFO", "asctime": "2022-03-04 05:22:53,955", "message": "Pipeline 1 Ended", "module": "gstreamer_pipeline"}

vaclient has started the pipeline successfully and it will run to completion, it's the status call that has failed.

The simplest workaround is ensure vaclient and the service are using the same container version.

Any client, such as vaclient, that has been updated to use the new "instance only" call (GET /pipelines/status/{instance_id}) will fail in a similar way. As a workaround update client to use legacy status call (GET /pipelines/{name}/{version}/{instance_id}/status) if "instance only" call fails.

For vaclient, this can be done by updating get_pipleline_status as follows. More elegant solutions are possible.

legacy_status_url = None

def get_pipeline_status(server_address, instance_id, show_request=False):
    global legacy_status_url
    status = None
    if not legacy_status_url:
        status_url = urljoin(server_address,
                            "/".join(["pipelines",
                                    "status",
                                    str(instance_id)]))
        status = get(status_url, show_request)
    if status:
        return status
    pipelines_url = urljoin(server_address, "pipelines")
    response = get(pipelines_url, show_request)
    if not response:
        return None
    pipeline = response[0]
    legacy_status_url = urljoin(server_address,
                                "/".join(["pipelines",
                                pipeline["name"],
                                pipeline["version"],
                                str(instance_id),
                                "status"]))
    response = get(legacy_status_url, show_request)
    return response
@whbruce whbruce added the documentation Improvements or additions to documentation label Mar 4, 2022
@whbruce whbruce added bug Something isn't working and removed documentation Improvements or additions to documentation labels Mar 18, 2022
@whbruce whbruce changed the title vaclient incompatible with older versions of the service vaclient incompatible with v0.70 and older versions of the service Aug 18, 2022
@whbruce whbruce changed the title vaclient incompatible with v0.70 and older versions of the service Client incompatible with v0.70 and older versions of the service Aug 18, 2022
@whbruce whbruce changed the title Client incompatible with v0.70 and older versions of the service v0.7.1 client incompatible with v0.70 and older versions of the service Aug 18, 2022
@whbruce whbruce changed the title v0.7.1 client incompatible with v0.70 and older versions of the service v0.7.1 client incompatible with earlier versions of the service Aug 18, 2022
@whbruce whbruce added the wontfix This will not be worked on label Sep 15, 2022
@whbruce
Copy link
Author

whbruce commented Sep 15, 2022

Closing as "will not fix" as backward compatibility is not required prior to v1.0.

@whbruce whbruce closed this as completed Sep 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant