-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_creator() does not return request creator #286
Comments
marcus-h
added a commit
that referenced
this issue
Apr 12, 2017
There is no need to compute the request creator, because it is stored in the request xml. Moreover, the old computation yields a wrong result (see issue #286).
On 2017-04-12 01:54:55 -0700, Andreas Stieger wrote:
`osc/core.py` has the following:
```python
def get_creator(self):
"""return the creator of the request"""
if len(self.statehistory):
return self.statehistory[0].who
return self.state.who
```
However this does not return the creator of the request, but the last one to change the request state. That is usually a reviewer.
|
On 2017-04-12 13:07:28 +0200, Marcus Hüwe wrote:
On 2017-04-12 01:54:55 -0700, Andreas Stieger wrote:
> `osc/core.py` has the following:
>
> ```python
> def get_creator(self):
> """return the creator of the request"""
> if len(self.statehistory):
> return self.statehistory[0].who
> return self.state.who
> ```
>
> However this does not return the creator of the request, but the last one to change the request state. That is usually a reviewer.
>
Good catch! Fixed in commit d68507f (6965dc5). Now, we
rely on the "creator" attribute, which is part of the <request>
node.
And the "get_creator" method was dropped in favor of a
"creator" attribute.
|
The removal of the |
so, do we need to fix the code or can we have the function back for compatibility? CC @jberry-suse |
marcus-h
added a commit
that referenced
this issue
Apr 12, 2017
Request.get_creator is used by some factory bots (see comment in issue #286). Note: Request.get_creator is deprecated and the "creator" attribute should be used instead.
On 2017-04-12 04:30:36 -0700, Andreas Stieger wrote:
The removal of the `get_creator()` function breaks some [factory bots](https://github.com/search?q=org%3AopenSUSE+get_creator&type=Code)... @lnussel @DimStar77
I readded Request.get_creator in commit 164435d. There is no good
reason to break the bots (now)...
|
thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
osc/core.py
has the following:However this does not return the creator of the request, but the last one to change the request state. That is usually a reviewer.
Case in point:
osc api '/request/487429'
. The request creator is leaper , butget_creator()
returns staging-bot once it performed some reviews.The text was updated successfully, but these errors were encountered: