openshiftio / openshift.io

Red Hat OpenShift.io is an end-to-end development environment for planning, building and deploying modern applications.
https://openshift.io
97 stars 66 forks source link

Inconsistent stack analysis results - analysis is temporarily returned without results created by the 'recommendation_v2' job #1314

Closed tisnik closed 6 years ago

tisnik commented 7 years ago

Current behaviour:

  1. stack analysis is started via API endpoint
  2. when the stack analysis results are available, the API returns HTTP code 200
  3. the returned JSON does not contains partial results created by the 'recommendation_v2' job (the path to missing results is result/0/recommendation/alternate)
  4. after some time, when user made another call to get stack analysis, the whole results are returned

Expected behaviour:

  1. stack analysis is started via API endpoint
  2. when the stack analysis results are available, the API returns HTTP code 200
  3. the whole results are returned, including results generated by the 'recommendation_v2' job
tisnik commented 7 years ago

@msrb @samuzzal-choudhury needinfo

miteshvp commented 7 years ago

@tisnik - This is actually an expected behavior. Since we have two workers running async and in parallel, since stack_aggregator runs faster, you see partial results. Idea was show whatever results are currently available to the user. One thing that we can change here is the response code of 202 to see partial results or no results. cc @samuzzal-choudhury

tisnik commented 7 years ago

Hi @miteshvp. If this is expected, it should be mentioned in the Integration Cookbook + the info should be publicly available because the API might be consumed by virtually anybody. Is it possible (at least) to introduce attributes with status of each workers?

(actually I think this behaviour goes again RESTfull API logic, let's talk about this issue later)

qodfathr commented 6 years ago

Any updates here?

miteshvp commented 6 years ago

Not reproducible. And v2 is dead.