InvalidTransitionError in response to review completion

Bug #1459234 reported by James Westby
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Developer registration portal
Fix Committed
Undecided
Matias Bordese

Bug Description

When version 0.3 of https://myapps.developer.ubuntu.com/dev/click-apps/2700/ finished
automated review it triggered an AnalyzeReviewTask.

[2015-05-26 17:26:50,900: INFO/Worker-1] BlaBlaCar WebApp - 0.3: ReviewPending -> ReviewInProgress
[2015-05-26 17:26:50,901: INFO/MainProcess] Received task: devportal.tasks.ReviewClickPackageTask[86cf49e5-5b8a-492d-8bc9-bc2155157aa1]
[2015-05-26 17:26:50,917: INFO/MainProcess] Task devportal.tasks.PerformClickPackageScanTask[2e796baa-eeee-4958-bda7-be31ccb9f3f2] succeeded in 0.882162332535s: True
[2015-05-26 17:26:50,957: INFO/Worker-5] Starting new HTTPS connection (1): upload.apps.ubuntu.com
[2015-05-26 17:26:51,114: INFO/Worker-5] ReviewClickPackageTask(7755): success
[2015-05-26 17:26:51,119: INFO/MainProcess] Task devportal.tasks.ReviewClickPackageTask[86cf49e5-5b8a-492d-8bc9-bc2155157aa1] succeeded in 0.217893570662s: True
[2015-05-26 17:26:54,115: INFO/MainProcess] Received task: devportal.tasks.AnalyzeReviewTask[525319e6-e1b1-4095-b54d-c91cd773be46]
[2015-05-26 17:26:54,217: WARNING/Worker-3] /srv/sc.ubuntu.com/production/software-center-agent-rev-2059/lib/oops_celery/oops_reporter.py:59: DeprecationWarning: Using the oops.Config.publishers attribute is deprecated. Use the oops.Config.publisher attribute instead, with an oops.publishers.publish_to_many object if multiple publishers are needed
  self.config.publish(report)

[2015-05-26 17:26:54,256: ERROR/MainProcess] Task devportal.tasks.AnalyzeReviewTask[525319e6-e1b1-4095-b54d-c91cd773be46] raised unexpected: InvalidTransitionError()
Traceback (most recent call last):
  File "/srv/sc.ubuntu.com/production/software-center-agent-rev-2059/lib/celery/app/trace.py", line 240, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/srv/sc.ubuntu.com/production/software-center-agent-rev-2059/lib/celery/app/trace.py", line 437, in __protected_call__
    return self.run(*args, **kwargs)
  File "/srv/sc.ubuntu.com/production/software-center-agent-rev-2059/src/devportal/tasks.py", line 290, in run
    app.approve(reviewer, comment, safe=True)
  File "/srv/sc.ubuntu.com/production/software-center-agent-rev-2059/src/devportal/clickpackage_states.py", line 251, in __getattr__
    attribute = getattr(self._state_object, attr)
  File "/srv/sc.ubuntu.com/production/software-center-agent-rev-2059/src/devportal/clickpackage_states.py", line 57, in __getattribute__
    raise InvalidTransitionError()
InvalidTransitionError
[2015-05-26 17:26:56,044: INFO/MainProcess] Received task: webservices.tasks.RequestTask[514bc76f-10d3-477b-8a65-3107c4fa2ea1]

This apparently triggered an InvalidTransitionError, but the error doesn't report the
current or target states, so it's not entirely clear what is happening.

A previous log line suggested that the package should be in ReviewInProgress, and the review page
says that the review passed.

It's possible that the user published the previous version during the time the review was happening,
which would cause a failure as it tried to approve a published package.

Next steps:

  1) Fix the error to report the current state and the requested transition.
  2) Confirm which state the package was in
  3) Maybe allow Approve in Published.

Revision history for this message
James Westby (james-w) wrote :

Another log line indicates that the package may well have been Published at the time this happened.

logs/saci/sca/sca.log-20150527:2015-05-26 17:26:55,798 INFO devportal.clickpackageupload_states BlaBlaCar WebApp - 0.2: Published -> Published

James Westby (james-w)
Changed in developer-portal:
status: New → In Progress
assignee: nobody → Matias Bordese (matiasb)
Matias Bordese (matiasb)
Changed in developer-portal:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.