GSOC Project : Improving RubyBench


#61

I am now using environment variables for both github api and password in the code to create an issue. But the problem is how do I pass travis ci tests?
I tried the following :
I can set a github password and use it in my tests to create an issue for the first time in vcr and then record this in cassette. Now I can change the original password and recorded http request will be sent via vcr to pass my tests. But what about the github api? If I provide the github api as an environment variable, how can the test environment know that?
Please help me out.


#62

@shahsaurabh0605 We can follow same approach followed here GitHub - octokit/octokit.rb: Ruby toolkit for the GitHub API

Please go through it and see how we can use same approach.


#63

Perhaps you can read through Usage with Test::Unit - Test frameworks - Vcr - VCR - Relish?


#64

@tgxworld I went through this already. I have surrounded my tests with vcr cassette.
The problem is say I set my github_pass:'abcde' in secrets.yml, which is my original github password and run the tests. Tests will pass and send the post request to create an issue. Afterwards, whenever I run the tests post request won’t be created and just the recorded cassette will pass the tests. But I can’t keep my password in test environment and I just set it arbitary github_pass:'12345'. Now when I run the tests vcr will give me VCR::Errors::UnhandledHTTPRequestError: because the post request got changed and it won’t just play the recording again. This is what is happening here, Rails.application.secrets.github_password fetches different password and vcr can’t handle it.

@prathamesh As far as I understand from that link we can set environment variables in travis. We can set github api and encrypted password in either repository settings or .travis.yml file. Not sure, but I think that should work :slight_smile:


#65

@prathamesh @tgxworld
I modified the PR to use secure environment variables in .travis.yml. Have a look at it. However such secure env variables cannot be set by pull requests from forks. So I think you need to set this.


#66

You won’t have to hit the API in TravisCI if you check in the cassettes. I’m not sure why I added the cassettes files to .gitignore but it’ll be worth a relook


#67

@shahsaurabh0605 The PR is finally looking good. What is next on your list?


#68

It’s huge relief to see that the PR is on the verge of completion :grin: It will be great if you assign me the next task :slight_smile:


#69

Sure I’ll like to have an admin panel where we can run our benchmarks manually :slight_smile: Basically, a way to run methods in ruby-bench-web/remote_server_job.rb at master · ruby-bench/ruby-bench-web · GitHub


#70

Currently there is a admin controller but it only redirects us to the home page. What do we exactly require here?

Say, we can create admin page where we can ask inputs for benchmarking methods and fetch suitable results.


#71

Opps sorry I missed this. Yea we need an admin page to allow an admin to trigger benchmarks. Don’t worry about users account for now.

Basically you have a form for users to choose which benchmark they want to run and the commit/version to run the benchmark for. Focus on being able to run all benchmarks for a single repo first before we drill down further and allow benchmark types to be selected.

Also, we need to allow them to backfill benchmarks within a range of dates.


#72

@tgxworld @prathamesh You must have had a look at Google Work Submission Guidelines mail. I wanted to know how do I submit the complete work? There are many commits which are merged and some of them unmerged with a little work remaining. I can make a blog post clearly mentioning the work done uptill now and giving proper links. Opinions?

And yeah, have a look at the github addition on admin panel. :slight_smile:


#73

You can link directly to the commits and pull requests. Other than that, there isn’t anything special we need from our end.

As far as I can tell, the admin interface PR isn’t complete so I’m don’t think reviewing it now will be meaningful.


#74

OK. I will create a blog with all the links to commits and pull requests with short description where ever needed and show it to you. Other than that if you want then we can still complete the admin PR interface even if it exceeds the time.


#75

Do you have an existing blog? If not, I think a gist on GitHub will work fine :slight_smile:


#76

I wrote this blog for final submissions in GSoC. You can have a look and I will submit it on the website.


#77

Great, please submit it on the GSOC website as 23rd August is last date.