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

Added log streaming support #64

Closed
wants to merge 3 commits into from

Conversation

Aaron1011
Copy link
Contributor

This resolves issue #15

@rkh
Copy link
Contributor

rkh commented Jul 27, 2013

Oh my god. <3

Can you look into the 1.8 failures?

@rkh
Copy link
Contributor

rkh commented Jul 27, 2013

Also, we should integrate that with the travis logs command.

@Aaron1011
Copy link
Contributor Author

Oh wow! I completely missed those failures! I'll look into that right away.

@Aaron1011
Copy link
Contributor Author

Oh, whoops, I found the problem. I didn't read the pusher-client docs 😄 . I'll fix it.

@Aaron1011
Copy link
Contributor Author

Ugh, there is a problem with Rubinius. I'm looking into it...

@Aaron1011
Copy link
Contributor Author

Hmm, I haven't been able to reproduce the error locally. Do you have any ideas, @rkh?

@rkh
Copy link
Contributor

rkh commented Jul 27, 2013

@Aaron1011 I don't know. Can you maybe ping someone in #rubinius on freenode about this? Heading out, can also spin up a debug VM later.

One thing you can also try is running Rubinius in 1.9 mode (simply edit the .travis.yml).

@Aaron1011
Copy link
Contributor Author

I realized that the reason for the failure on Ruby 1.8 with openssl-nonblock was because pusher-client tried to require it, preventing a module from loading. I've modified the Gemfile to point to my fork of pusher-client which removes all uses of openssl-nonblock.

@rkh
Copy link
Contributor

rkh commented Jul 28, 2013

Sorry, pusher-client needs to go to the gemspec, could you open an issue with them about this?

@simi
Copy link

simi commented Jul 28, 2013

@rkh
Copy link
Contributor

rkh commented Jul 28, 2013

\o/

@Aaron1011
Copy link
Contributor Author

I'm starting to think that pusher-ruby-client might be unmaintained (the last activity was three months ago). I think it might be a good idea to publish a fork of it it RubyGems, and use that instead.

@joshk
Copy link
Contributor

joshk commented Jul 30, 2013

It shouldn't be unmaintained, it is looked after by pusher. We can reach out to them?

@Aaron1011
Copy link
Contributor Author

According to this, they don't provide "official support" for the Ruby client. But I do agree that we should reach out to them.

@Aaron1011
Copy link
Contributor Author

I've contacted Pusher through their support form. Hopefully, they will take a look at my PR soon.

@adamyeats-zz
Copy link

I've merged this for you now, guys. Sorry about the delay!

@Aaron1011
Copy link
Contributor Author

I'll add it to the gemspec.

@Aaron1011
Copy link
Contributor Author

@adamyeats is deploying pusher-client to RubyGems, then this can be merged.

@adamyeats-zz
Copy link

This should be deployed now, @Aaron1011. Thanks!

@Aaron1011
Copy link
Contributor Author

@rkh: I'm going to squash the commits into one. Everything should be good to merge.

@stream = Travis::Tools::Stream.new
@stream.on_data data
@stream.on_finished finished
@stream.subscribe(job.id)

This comment was marked as spam.

@rkh
Copy link
Contributor

rkh commented Aug 3, 2013

This is a really good start, but exposes the fact that we use pusher a bit too much. I think I'll merge it into a branch so I can work on it, too.

@Aaron1011
Copy link
Contributor Author

Okay, sounds good! Sorry about the problems.

@rkh
Copy link
Contributor

rkh commented Aug 3, 2013

No need to apologise. I need to figure out how to get this working with pro.

@Aaron1011
Copy link
Contributor Author

I've allowed the api key to be passed as a parameter, but I'm not sure of the best way to have it use the Pro api key.

@sarahhodne
Copy link
Contributor

The API key is available through the API:

› curl https://api.travis-ci.org/config
{
  "config": {
    "host": "travis-ci.org",
    "shorten_host": "trvs.io",
    "assets": {
      "host": "travis-ci.org",
      "version": "asset-id",
      "interval": 15
    },
    "pusher": {
      "key": "5df8ac576dcccf4fd076"
    }
  }
}

Of course, the Pro API requires more things such as authenticating against the Pusher stream, which I don't really know how works.

@receive.call(data)
end

@socket["#{JOB_PREFIX}#{id}"].bind('job:finished') do |data|

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@rkh rkh closed this in 3851f5c Aug 4, 2013
@Aaron1011
Copy link
Contributor Author

@rkh: Thanks for all of the additional code you added to this! It looks awesome! Sorry about the small amount I ended up contributing.

@rkh
Copy link
Contributor

rkh commented Aug 5, 2013

Don't worry, your code made me understand how the pusher client works.

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.

None yet

6 participants