libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LIBCLOUD-457) Reset "context" attribute on the connection class after the request finished
Date Sat, 07 Dec 2013 19:18:35 GMT

    [ https://issues.apache.org/jira/browse/LIBCLOUD-457?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13842299#comment-13842299
] 

ASF subversion and git services commented on LIBCLOUD-457:
----------------------------------------------------------

Commit 67910fd5189d2f9b3078c16601cef714cb86d486 in branch refs/heads/trunk from [~kami]
[ https://git-wip-us.apache.org/repos/asf?p=libcloud.git;h=67910fd ]

[LIBCLOUD-457] Reset context on the Connection class after the request has
finished.

Also update affected Abiquo driver to use "context" attribute correctly and
not rely on it being present across multiple requests. Instead of the
"context", use a new attribute called "cache".


> Reset "context" attribute on the connection class after the request finished
> ----------------------------------------------------------------------------
>
>                 Key: LIBCLOUD-457
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-457
>             Project: Libcloud
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Tomaz Muraus
>            Priority: Minor
>
> "context" attribute on the connection class is there to allow developers to save temporary
data on the connection class for the duration of a request.
> It's commonly used and accessed in places such as "parse_body" and "parse_error".
> Because of the oversight, this attribute is currently not reset after the request has
finished and the value of context is available across multiple requests.
> This is bad and in-directly encourages bad practices like persisting some state across
multiple requests.
> The goal of this issue is to fix that and reset the context after the request has finished.
We will also need to update the affected code, because sadly, some drivers rely on this broken
and bad behavior.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message