Skip to content
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

request: state when date is incorrect #3858

Open
jberry-suse opened this issue Sep 20, 2017 · 1 comment
Open

request: state when date is incorrect #3858

jberry-suse opened this issue Sep 20, 2017 · 1 comment
Labels
API Things regarding our API Bug Frontend Things related to the OBS RoR app

Comments

@jberry-suse
Copy link
Contributor

Issue/Feature description

Using the API, the <state when=""> date is incorrect for some requests (from skimming data hundreds). My data is only obviously wrong when the date is prior to the actual final state change. So depending on what causes this there could be dates after, but given the date seems to be stale as it matches a prior state change I am guessing it somehow does not get updated.

Expected result

The date would be correct.

How to Reproduce

osc api '/request/$reqid' for a request effected by this issue

Further information

An example, but there are many (only includes relevant parts of XML).

Note that clearly the <state when=""> is prior to the final <history> entry and therefore has to be wrong.

  • 2016-12-05T22:55:57 (state)
  • 2016-12-05T22:56:02 (similar to date when factory-staging review was accepted)
  • 2016-12-08T17:33:24 (last history entry)
<request id="443177" creator="leaper">
  <action type="submit">
    <source project="SUSE:SLE-12:Update" package="php5.3636" rev="f1d436775eed4e441982e1c94ea4dfbc"/>
    <target project="openSUSE:Leap:42.3" package="php5"/>
    <acceptinfo rev="11" srcmd5="f1d436775eed4e441982e1c94ea4dfbc" osrcmd5="d684723db51a2f7f11c859eaa400d4f9"/>
  </action>
  <state name="accepted" who="lnussel_factory" when="2016-12-05T22:55:57">
    <comment>Accept to openSUSE:Leap:42.3</comment>
  </state>
  <review state="accepted" when="2016-12-02T12:50:02" who="jberry_factory" by_group="factory-staging">
    <comment>Picked openSUSE:Leap:42.3:Staging:A</comment>
    <history who="jberry_factory" when="2016-12-05T22:56:02">
      <description>Review got accepted</description>
      <comment>Picked openSUSE:Leap:42.3:Staging:A</comment>
    </history>
  </review>
  <history who="lnussel_factory" when="2016-12-08T17:33:24">
    <description>Request got accepted</description>
    <comment>Accept to openSUSE:Leap:42.3</comment>
  </history>
</request>

I can potentially work around this, but this seems like a serious issue in the validity of data.

@jberry-suse
Copy link
Contributor Author

jberry-suse commented Sep 20, 2017

It does appear that if I use history[last()]/@when instead when the state/@when is less then the majority of bad data resolves itself, but as I suspected it appears that individual review dates can be wrong as well. If the history entries turn out to be reliable I guess I'll have to parse the descriptions even though that is far uglier than using the structured review information.

Overall, this data structure is a tad wonky.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Things regarding our API Bug Frontend Things related to the OBS RoR app
Projects
None yet
Development

No branches or pull requests

4 participants