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

fix/ciirus skip monthly rates #356

Merged
merged 1 commit into from
Sep 16, 2016
Merged

Conversation

kkolotyuk
Copy link
Contributor

FIx for #279

@kkolotyuk
Copy link
Contributor Author

@keang please

@keang
Copy link
Contributor

keang commented Sep 16, 2016

Related to #335, I think this and other ignored errors properties would be forgotten silently 2 months from now 💭

@keang
Copy link
Contributor

keang commented Sep 16, 2016

It would be worthwhile have a log of the ids that were skipped, grouped by reasons? So when we have time to revisit, or just when we communicate with suppliers we can reproduce the ids quickly.

For now we have to shift through ExternalErrors; with this patch (and similar ones) we completely lose the data. For this particular case, for example, we have the option of contacting the host and let them know which setup is missing, etc. What do you think @kkolotyuk @rmascarenhas ?

@kkolotyuk
Copy link
Contributor Author

This is good point. I thought about improvement of skip_property method and not only count such properties, but also store additional info for them. But this is difficult task - to analyze and group errors.

What I see now: a lot of soap_errors are exactly about this fix and they make it difficult to analyze Ciirus errors in Concierge UI.

@keang
Copy link
Contributor

keang commented Sep 16, 2016

But since we know a few cases that we expect to occur, maybe what we can do is just build a hash like:

ignored: [
  {
    reason: "(soap:Server) Server was unable to process request. ---> GetPropertyRates: Error - No Rate Assigned by user. Please contact the user and request they populate this data."
    ids: [a, b, c]
  }, {
    reason: "(soap:Server) Server was unable to process request. ---> GetPropertyRates: Error - No Rate Rows Returned",
    ids: [x, y]
  }
]

Or something like that and just throw the hash as json into the SynchronisationRepository?

@kkolotyuk
Copy link
Contributor Author

kkolotyuk commented Sep 16, 2016

Yes this is exactly I was talking about.
For now stats looks like:

{"properties_created":0,"properties_updated":0,"properties_deleted":0,"properties_skipped":1}

but can be like this:

{
  properties_created: 0,
  properties_updated: 0,
  properties_deleted: 0,
  properties_skipped: [
    {
      reason: "(soap:Server) Server was unable to process request. ---> GetPropertyRates: Error - No Rate Assigned by user. Please contact the user and request they populate this data."
      ids: [a, b, c]
    }, {
      reason: "(soap:Server) Server was unable to process request. ---> GetPropertyRates: Error - No Rate Rows Returned",
      ids: [x, y]
    }
  ]
}

@kkolotyuk
Copy link
Contributor Author

If we will change stats structure we need new place (may be new page) in Concierge UI about skipped properties. This is not small task and it should be done in separate PR I think.

Copy link
Contributor

@keang keang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes true, let's merge this first, it looks good for its issue
👍

@kkolotyuk kkolotyuk merged commit e276a8a into development Sep 16, 2016
@kkolotyuk kkolotyuk deleted the fix/ciirus-skip-monthly-rates branch September 16, 2016 07:22
@keang
Copy link
Contributor

keang commented Sep 16, 2016

Moving some of discussions here into an enhancement issue: #359

@kkolotyuk
Copy link
Contributor Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants