-
Notifications
You must be signed in to change notification settings - Fork 21
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
delete useless resource files; dramatically simplified retry strategies and response parsing #18
Conversation
Merge master
… add CHANGELOG.md
Get rid of resource files
Better retries; move service files to their own directory
* Add APPNEXUS_API_DEBUG env variable falg; Add respond_to_missing * Just use an accessor for raw_json * Get rid of :return_response flag; it's not used
… time; set log level to debug if debug mode turned on
…ion class with default logger (#6) * Consolidate download service * Fix final issues with log level data download * Real spec for log level data download; default feed
if body['error_code'] == RATE_EXCEEDED_ERROR | ||
raise AppnexusApi::RateLimitExceeded, "Retry after #{response.response_headers['retry-after']}s" | ||
elsif body['error_id'] && !body['error_id'].empty? | ||
# TODO: this should raise an error, but a lot of the specs currently have error responses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is kind of a bummer; not sure this is because of my account's access and @infinite-monkeys will be able to replace the .yml
files but the specs were passing even with these error responses (in fact this kind of error response never even generated any errors, which is ... problematic)
@joshuawscott any plans to merge/release this? |
@joshuawscott this has been open for over 5 months now... any plans to merge this? we have been running this streamlined version in production daily for that entire time. |
@mcmoyer can you take a look and give a 👍 / 👎 |
ping (sorry to be annoying, but it would be good if we could get this merged in the next 4 weeks) |
ping |
I’ll look at it this weekend…sorry for the delay |
had issues getting the tests to run this weekend. I believe it may be due to permissions with our sandbox login. Will check into that today |
thanks... are you trying to create new VCR files or just run the specs as is? |
maybe you have an old |
was able to get the tests running by renaming my .env file. I’m unable to get all the specs to pass
It seems to be all permissions related so getting in touch with Appnexus to see if I can get a login with more permissions in the test system. |
i get
but yeah the one spec i could not get to pass had to do with permissions on my account (that's the pending one). however, the specs should not be hitting appnexus in any way, as long as you don't clear the VCR files. are you trying to regenerate the VCR files from scratch? if so you need the
|
specifically the pending one is:
|
FWIW i was able to get the specs to pass just with a fresh checkout and without hitting appnexus's actual test server in any way. git clone git@github.com:lumoslabs/appnexusapi.git
cd appnexusapi
bundle install
bundle exec rspec maybe it's an issue with some older version of some dependency gem that needs an update? my
|
ping |
I’m able to run the specs without a .env file. It’s not ideal since our login is unable to run the specs against the actual appnexus sandbox. Since it’s taking a while to get the required permissions from appnexus, I’m going to merge these so you’re not held up any longer |
awesome, thanks. |
(i would definitely squash + merge, not just merge... all the tiny commits are not helpful) |
This includes all changes from #17 so if you prefer you can either merge that first, or just not merge that and go with this.
It also includes
Retriable
gem instead of chaos theoryReadOnlyService
superclassLogLevelDataDownloadService
- all the functionality lives inLogLevelDataService
with theLogLevelDataDownloadService
class to be removed whenever there's a 2.0 releaseThere are no functional changes to external APIs though if someone is reaching into the gem and mucking with classes like
AdvertiserResource
, this will break their code. In my opinion that means this doesn't warrant a major or even minor version bump - 1.0.1 would be fine.@joshuawscott @infinite-monkeys