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

KAZOO-786 #10

Closed
wants to merge 3 commits into from
Closed

KAZOO-786 #10

wants to merge 3 commits into from

Conversation

lazedo
Copy link
Member

@lazedo lazedo commented Apr 2, 2013

@jamesaimonetti
Copy link
Member

Your second diff, "include normalization", won't be included. I'm not sure what build errors you're getting to need that change of path. What errors are you getting? File a bug and issue a pull request against it so we can see why you think its needed. We have no issues with it as is.

I think your first diff is fine though, good to not coerce the types in this case. We are adding the single quotes around atoms to be explicit about their type - if you can adjust your patch to wrap true/false as 'true' and 'false', that'd be great!

@lazedo
Copy link
Member Author

lazedo commented Apr 2, 2013

Hi James,

THANKS!

actually it was my first pull request and didn't noticed that the second
commit was also included, i'm very sorry for that.

you are building the whole thing with makefiles that in some cases
(ex:crossbar) iterate over source files and include them in the compiling
statement.
i'm using ERLIDE inside eclipse with separated projects (ecallmgr,
whistle_apps, libraries (individually) and apps (also individually), and
noticed that there isn't a formal project template that suits this.
some parts use an include folder to place the .hrl files and some others
place the .hrl in the src folder and there iis also a mix of the two. you
probably have a good reason for this and i'm just starting.
i also changed the makefiles (locally) to reflect the changes and set the
-I (include) argument.

i create the jira issue and tried to "start work" but i don't have the
pemissions for that. is it possible to give me permissions so that i can
start the jira issues i post ?

if possible, i would like to get early access to the kazoo source (back and
gui) because there are many thing i believe you're already working on and
i'm sure i can help an extend it.
things like hierarchical accounts (local/global resources),
internationalization, billing, routing, sms, callflow modules.

thank you very much for reading this to the end.

best regards

On Tue, Apr 2, 2013 at 5:36 PM, James Aimonetti [email protected]:

Your second diff, "include normalization", won't be included. I'm not sure
what build errors you're getting to need that change of path. What errors
are you getting? File a bug and issue a pull request against it so we can
see why you think its needed. We have no issues with it as is.

I think your first diff is fine though, good to not coerce the types in
this case. We are adding the single quotes around atoms to be explicit
about their type - if you can adjust your patch to wrap true/false as
'true' and 'false', that'd be great!


Reply to this email directly or view it on GitHubhttps://github.com//pull/10#issuecomment-15786909
.

Luis Azedo

@lazedo
Copy link
Member Author

lazedo commented Apr 2, 2013

Hi,

just one more thing, what are you guys using to edit the bigcouch views ?
i found some errors that i also would like to correct or propose another of
doing it. (why don't you save the cost of the call after the call to and
calculate it everytime ? if there is a change in the form of calculation
you have to changed it in more tha 1 place )
if i call "sup whapps _maintenance refresh" will it pick the views from the
private folders and update them ?

thanks

On Tue, Apr 2, 2013 at 5:56 PM, Luis Azedo [email protected]:

Hi James,

THANKS!

actually it was my first pull request and didn't noticed that the second
commit was also included, i'm very sorry for that.

you are building the whole thing with makefiles that in some cases
(ex:crossbar) iterate over source files and include them in the compiling
statement.
i'm using ERLIDE inside eclipse with separated projects (ecallmgr,
whistle_apps, libraries (individually) and apps (also individually), and
noticed that there isn't a formal project template that suits this.
some parts use an include folder to place the .hrl files and some others
place the .hrl in the src folder and there iis also a mix of the two. you
probably have a good reason for this and i'm just starting.
i also changed the makefiles (locally) to reflect the changes and set the
-I (include) argument.

i create the jira issue and tried to "start work" but i don't have the
pemissions for that. is it possible to give me permissions so that i can
start the jira issues i post ?

if possible, i would like to get early access to the kazoo source (back
and gui) because there are many thing i believe you're already working on
and i'm sure i can help an extend it.
things like hierarchical accounts (local/global resources),
internationalization, billing, routing, sms, callflow modules.

thank you very much for reading this to the end.

best regards

On Tue, Apr 2, 2013 at 5:36 PM, James Aimonetti [email protected]:

Your second diff, "include normalization", won't be included. I'm not
sure what build errors you're getting to need that change of path. What
errors are you getting? File a bug and issue a pull request against it so
we can see why you think its needed. We have no issues with it as is.

I think your first diff is fine though, good to not coerce the types in
this case. We are adding the single quotes around atoms to be explicit
about their type - if you can adjust your patch to wrap true/false as
'true' and 'false', that'd be great!


Reply to this email directly or view it on GitHubhttps://github.com//pull/10#issuecomment-15786909
.

Luis Azedo

Luis Azedo

@k-anderson
Copy link
Contributor

Howdy,

I am using VIM to edit the views but their format bothers me (some are leading commas others trailing, some even mix this, and we haven't found a way we all agree on for putting JSON in a string). Ultimately we just keep doing what we have been until we come up with a better way, suggestions welcome! What errors did you find?

We calculate it each time because it grew organically. Originally only jonny5 needed the amounts, then the UI started calculating it in the call history display in the browser. When we (backend guys) saw this we said we would send it so it was under our control and the easiest way to support CDRs that didnt have a precomputed amount was to simply do it each time. Its not too expensive as bigcouch only has to run the view on new CDRs (unless you flush the view indexs). Prior to v2.12 the calculation logic was specific to jonny5 (except for the part in whapps_util, which was left over from the our oldest module Trunkstore). We didnt want to make a dependency between jonny5 and the cdr whapp (or duplicate that code). However, now that Peter has built wht_utils the cdr whapp could safely execute the same logic as jonny5, adding a cost to the cdr prior to save. For backward compatibility the view will need to be able to calculate the cost if the precomputed is not present... Anyway we are about to significantly refactor cdr storage and I am sure this will be addressed :)

Calling whapps_maintenance:refresh() will update all views in all account dbs as well as the aggregate dbs (accounts, sip_auth, ect). However since it attempts to write status to a stream (assumed to be the Erlang shell) you need to use blocking_refresh when calling it from the sup tool. IE: sup whapps_maintenance blocking_refresh

Thanks!

@lazedo
Copy link
Member Author

lazedo commented Apr 2, 2013

Hi,

thanks for the info and explanations.

about the errors...

cdrs.json : crossbar_listing *and *transactions.json
: reconcile_by_callid

var RInc = parseInt(doc.custom_channel_vars.increment) || 60
should be var RInc = parseInt(doc.custom_channel_vars.rate_increment) ||
60

if one is billing with increments different than 60 it doesn't work because
it always defaults to 60

it was filed with KAZOO-731

just one more, why do we see 2 rows for each call in winkstart call history
?

thanks.

On Tue, Apr 2, 2013 at 9:11 PM, bitbashing [email protected] wrote:

Howdy,

I am using VIM to edit the views but their format bothers me (some are
leading commas others trailing, some even mix this, and we haven't found a
way we all agree on for putting JSON in a string). Ultimately we just keep
doing what we have been until we come up with a better way, suggestions
welcome! What errors did you find?

We calculate it each time because it grew organically. Originally only
jonny5 needed the amounts, then the UI started calculating it in the call
history display in the browser. When we (backend guys) saw this we said we
would send it so it was under our control and the easiest way to support
CDRs that didnt have a precomputed amount was to simply do it each time.
Its not too expensive as bigcouch only has to run the view on new CDRs
(unless you flush the view indexs). Prior to v2.12 the calculation logic
was specific to jonny5 (except for the part in whapps_util). We didnt want
to make a dependency between jonny5 and the cdr whapp (or duplicate that
code). However, now that Peter has built wht_utils the cdr whapp can safely
execute the same logic as jonny5, adding a cost to the cdr prior to save.
For backward compatibility the view will need to be able to calculate the
cost if the precomputed is not present... Anyway we are about to
significantly refactor cdr stora ge and I am sure this will be addressed :)

Calling whapps_maintenance:refresh() will update all views in all account
dbs as well as the aggregate dbs (accounts, sip_auth, ect). However since
it attempts to write status to a stream (assumed to be the Erlang shell)
you need to use blocking_refresh when calling it from the sup tool. IE: sup
whapps_maintenance blocking_refresh

Thanks!


Reply to this email directly or view it on GitHubhttps://github.com//pull/10#issuecomment-15799397
.

Luis Azedo

@k-anderson
Copy link
Contributor

Ah nice find, thanks! If you want credit in the git history feel free to issue a separate pull request with the corrected view :)

Kazoo keeps cdrs per-leg (channel). If you hit a ring group of four endpoints you will end up with five cdrs (the originating leg and four endpoints). One of the up-coming tasks is to thread the cdrs together so you see them grouped by call or condensed. That hasn't been designed fully yet but should be a simple backend improvement to the API.

k-anderson added a commit that referenced this pull request Apr 3, 2013
KAZOO-731: Cherry pick accepted commits from pull request #10
@k-anderson
Copy link
Contributor

Thank you for your contribution!

I have cherry-picked the parts change to the view and wh_util. With regards to your include normalization I was not able to compile with those changes. For example in cb_about.erl the include specifies the header is in the local directory but it is actually in the parent. I am not sure how you are able to compile it ;)

If we can find a happy common ground that works for you and still compiles via our makefile I would be will do include it.

For future reference, please submit as pull requests as specific as possible. We would have preferred to have seen this as three separate requests.

@k-anderson k-anderson closed this Apr 3, 2013
@lazedo
Copy link
Member Author

lazedo commented Apr 3, 2013

Hi,

thank you and sorry for the 3 inclusions (includes was not meant to be),
will do better next time.

the include will work if you change the makefile , change in blue
erlc -I src -v $(ERLC_OPTS) -o ebin/ -pa ebin/ $

i would prefer to, move the .hrl files to folder include and have the -I be
include instead of src.

On Wed, Apr 3, 2013 at 10:53 PM, bitbashing [email protected]:

Thank you for your contribution!

I have cherry-picked the parts change to the view and wh_util. With
regards to your include normalization I was not able to compile with those
changes. For example in cb_about.erl the include specifies the header is in
the local directory but it is actually in the parent. I am not sure how you
are able to compile it ;)

If we can find a happy common ground that works for you and still compiles
via our makefile I would be will do include it.

For future reference, please submit as pull requests as specific as
possible. We would have preferred to have seen this as three separate
requests.


Reply to this email directly or view it on GitHubhttps://github.com//pull/10#issuecomment-15867746
.

Luis Azedo

jamesaimonetti added a commit that referenced this pull request Dec 16, 2016
# This is the 1st commit message:
doc_storage: add descriptions to schema

update docs and swagger in the process

# This is the commit message #2:

doc_storage: start to document the storage API

# This is the commit message #3:

doc_storage: add schema description to table output

# This is the commit message #4:

doc_storage: update schema ref

# This is the commit message #5:

doc_storage: sort order to allowed methods

# This is the commit message #6:

doc_storage: add description

# This is the commit message #7:

doc_storage: add descriptions to google drive schema

# This is the commit message #8:

doc_storage: incorporate latest generated doc

# This is the commit message #9:

doc_storage: start blog about storage

# This is the commit message #10:

doc_storage: update header

# This is the commit message #1:

doc_storage: ignore "id" field in schema

# This is the commit message #2:

doc_storage: refactor to more functions, add log

# This is the commit message #3:

doc_storage: add patch support to cb_storage

# This is the commit message #4:

doc_storage: refactor to more functions

# This is the commit message #5:

doc_storage: handle additionalProperties schema fail

# This is the commit message #6:

doc_storage: get resp_status from right context

# This is the commit message #7:

doc_storage: add plan config

# This is the commit message #8:

doc_storage: add JSON for ref

# This is the commit message #9:

doc_storage: update markdown
lazedo pushed a commit that referenced this pull request Dec 16, 2016
* # This is a combination of 9 commits.
# This is the 1st commit message:
doc_storage: add descriptions to schema

update docs and swagger in the process

# This is the commit message #2:

doc_storage: start to document the storage API

# This is the commit message #3:

doc_storage: add schema description to table output

# This is the commit message #4:

doc_storage: update schema ref

# This is the commit message #5:

doc_storage: sort order to allowed methods

# This is the commit message #6:

doc_storage: add description

# This is the commit message #7:

doc_storage: add descriptions to google drive schema

# This is the commit message #8:

doc_storage: incorporate latest generated doc

# This is the commit message #9:

doc_storage: start blog about storage

# This is the commit message #10:

doc_storage: update header

# This is the commit message #1:

doc_storage: ignore "id" field in schema

# This is the commit message #2:

doc_storage: refactor to more functions, add log

# This is the commit message #3:

doc_storage: add patch support to cb_storage

# This is the commit message #4:

doc_storage: refactor to more functions

# This is the commit message #5:

doc_storage: handle additionalProperties schema fail

# This is the commit message #6:

doc_storage: get resp_status from right context

# This is the commit message #7:

doc_storage: add plan config

# This is the commit message #8:

doc_storage: add JSON for ref

# This is the commit message #9:

doc_storage: update markdown

* doc_storage: write basic guide to using storage

* doc_storage: add xmerl to base PLT
jamhed pushed a commit to jamhed/kazoo that referenced this pull request Dec 23, 2016
* # This is a combination of 9 commits.
# This is the 1st commit message:
doc_storage: add descriptions to schema

update docs and swagger in the process

# This is the commit message #2:

doc_storage: start to document the storage API

# This is the commit message #3:

doc_storage: add schema description to table output

# This is the commit message 2600hz#4:

doc_storage: update schema ref

# This is the commit message 2600hz#5:

doc_storage: sort order to allowed methods

# This is the commit message 2600hz#6:

doc_storage: add description

# This is the commit message 2600hz#7:

doc_storage: add descriptions to google drive schema

# This is the commit message 2600hz#8:

doc_storage: incorporate latest generated doc

# This is the commit message 2600hz#9:

doc_storage: start blog about storage

# This is the commit message 2600hz#10:

doc_storage: update header

# This is the commit message 2600hz#1:

doc_storage: ignore "id" field in schema

# This is the commit message #2:

doc_storage: refactor to more functions, add log

# This is the commit message #3:

doc_storage: add patch support to cb_storage

# This is the commit message 2600hz#4:

doc_storage: refactor to more functions

# This is the commit message 2600hz#5:

doc_storage: handle additionalProperties schema fail

# This is the commit message 2600hz#6:

doc_storage: get resp_status from right context

# This is the commit message 2600hz#7:

doc_storage: add plan config

# This is the commit message 2600hz#8:

doc_storage: add JSON for ref

# This is the commit message 2600hz#9:

doc_storage: update markdown

* doc_storage: write basic guide to using storage

* doc_storage: add xmerl to base PLT
jamesaimonetti added a commit that referenced this pull request Sep 11, 2018
# This is the 1st commit message:

Merge the diff into the current doc and try saving again

cleanup logging

prefer the diff's value (excepting _rev)

# This is the commit message #1:

simplfy doc return

# This is the commit message #2:

only convert to binary if a list of ascii is present

also don't convert kz_json:object() to null if found

update tests accordingly

# This is the commit message #3:

use sets:subtract/2 to find the diff in J1 and J2

# This is the commit message #4:

add ability to merge list of jobjs with strategy fun

# This is the commit message #5:

more diff testing

# This is the commit message #6:

flag ensure_saved as deprecated

# This is the commit message #7:

remove arity-4 export

we can change arity-3 to accept options instead of the updates directly

# This is the commit message #8:

ignore return

# This is the commit message #9:

refactor update_doc to take an options list instead

# This is the commit message #10:

update account docs with update proplist

# This is the commit message #11:

add specs and update type

# This is the commit message #12:

update usage of kz_datamgr:update_doc

# This is the commit message #13:

update uses of update_doc

# This is the commit message #14:

expose paths for properties

also fixes updating the version in the accounts DB

# This is the commit message #15:

expose the base properties being set

# This is the commit message #16:

use a setter

# This is the commit message #17:

expose more paths

# This is the commit message #18:

update uses of ensure_saved to use update_doc

# This is the commit message #19:

fix function call

# This is the commit message #20:

ignore returns

# This is the commit message #21:

less args passed around

# This is the commit message #22:

filter undefined

# This is the commit message #23:

takes a flat proplist

# This is the commit message #24:

match return

# This is the commit message #25:

use the saved version in future contexts

# This is the commit message #26:

just try to delete the doc without opening it

# This is the commit message #27:

handle returns

# This is the commit message #28:

handle return

# This is the commit message #29:

delete the doc directly, handle returns

# This is the commit message #30:

refactor a bit

# This is the commit message #31:

remove unreachable clause

# This is the commit message #32:

update spec

# This is the commit message #33:

expose more paths

# This is the commit message #34:

expose more paths

# This is the commit message #35:

fix specs

# This is the commit message #36:

match on proper return

# This is the commit message #37:

update spec

# This is the commit message #38:

update account docs

# This is the commit message #39:

should save the docs

# This is the commit message #40:

add missing types

# This is the commit message #41:

hackney wants a binary

# This is the commit message #42:

hackney wants a binary

# This is the commit message #43:

more strict checking of design docs

# This is the commit message #44:

update type

# This is the commit message #45:

update usages

# This is the commit message #46:

add announcement for 4.3

# This is the commit message #47:

update spelling

# This is the commit message #48:

fix spelling

# This is the commit message #49:

ref the local fun

# This is the commit message #50:

save the accounts version if not_found

# This is the commit message #51:

return the account db version

# This is the commit message #52:

hide $ from formatter

# This is the commit message #53:

make sure to update the account doc

# This is the commit message #54:

move saving account docs to updates instaed

# This is the commit message #55:

right function name this time
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.

3 participants