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

support heroku status via '/current-status' API endpoint #27

Closed
wants to merge 1 commit into from

Conversation

jacobsmith
Copy link

This PR closes #26.

Often times, I find myself wanting to check heroku's status to detect whether a failure is on my end, or on theirs. This PR adds support for hubot heroku status, which will give the current status of Heroku, along with a list of any issues that Heroku deems important enough to include in their default current-status endpoint. (I would imagine it is time-sensitive to include certain issues that are less than X number of hours old).

This PR gives the status of both Production and Development heroku endpoints and, if either of them are not "green", will iterate over all of the issues that are included in the response, giving

  • Title
  • Resolution status (true or false)
  • Created At
  • Updated At
  • A link to Heroku's overview page of this specific issue, if a user wants additional information

I've included additional tests and fixtures to mock the response of the Heroku current-status endpoint.

Please let me know if there's anything you'd like me to add or change!

Thanks,
Jacob

@daemonsy
Copy link
Owner

Hey @jacobsmith this looks good. 👍

Can you post a message of how the status message is supposed to look like (especially if both the environments have issues).

I'll then just check it out and merge the PR :)

@jacobsmith
Copy link
Author

Yeah, I'd be happy to! I'm having a little bit of trouble being able to run this locally (I usually am working with single-script packages, so just copying the command.coffee file to scripts/ works fine, or I'm just calling out to it in the external-scripts.json file). Mind giving me some pointers?

I've gone to my hubot-heroku repo and run npm link, then gone to my hubot repo and run npm link hubot-heroku -- I'm betting there's some way I need to tell hubot to load the hubot-heroku module, but I cannot seem to figure it out! Any direction would be much appreciated! (:

UPDATE: Okay, I think I figured it out -- I needed to add the node module as a dependency inside of external-scripts.json, but name it as just the package name ( hubot-heroku ). That seems a bit counterintuitive, as I would expect the ...-scripts.json file to be a collection of scripts, not scripts OR modules, but that is a problem with Hubot naming conventions, certainly not this repo! I'll post when I've got the returned text and formatting!

@daemonsy
Copy link
Owner

Any luck with the text output? Don't mean to rush, just because this is close to :shipit:ing. Don't want to be a blocker :)

For context, reason why I asked for the text is so that we can compare the text output you envisioned with tests on the end platforms, I test on Slack and Flowdock, to see if they all look the same / look good.

@jacobsmith
Copy link
Author

I actually hit a blocker where I'm getting a 404 when I try and call
heroku.get('/current-status'), so I'm betting the actual URL it is
creating is not completely correct? It might be that most of the
heroku.get methods are actually trying to use the private APIs that need
authentication, and this might be the only public URL. I'm going to try
using just regular robot.http.get('https://HEROKU_API_STATUS') and see if
that gets us any closer -- I'll keep you posted on the progress!

On Fri, Feb 19, 2016 at 12:26 AM, Damon Aw [email protected] wrote:

Any luck with the text output? Don't mean to rush, just because this is
close to [image: :shipit:]ing. Don't want to be a blocker :)

For context, reason why I asked for the text is so that we can compare the
text output you envisioned with tests on the end platforms, I test on Slack
and Flowdock, to see if they all look the same / look good.


Reply to this email directly or view it on GitHub
#27 (comment).

@daemonsy daemonsy force-pushed the master branch 5 times, most recently from eb77746 to 8131c7a Compare April 25, 2017 04:40
@jacobsmith
Copy link
Author

I'm going to close this as it's 2 years old and I'm not even sure if I still have the code on my computer! Sorry for the clutter! If anyone finds this in the future, feel free to use this work as a starting point (:

@jacobsmith jacobsmith closed this May 21, 2018
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.

Add Heroku Status command
2 participants