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

Parallelize RAGE queries and fix some decoding #96

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
bd364b9
use http basic authentication when fetching url data
mg12ctx Mar 22, 2019
27307ed
fix brief report link
edwintorok Apr 29, 2019
7a8e811
CP-30677: expand variables from XenRT suite files
edwintorok Aug 21, 2019
c6f4168
Clean up Curl connections
edwintorok Aug 21, 2019
ec01f32
Update to OCaml 4.08.1, Core v0.13, and Dune build system
edwintorok Nov 29, 2019
f16d7b6
decode &45; to - for --
edwintorok Nov 29, 2019
5745fe3
Add bootmode precedence
edwintorok Nov 22, 2019
85c44f5
Escaping for +
edwintorok Nov 29, 2019
f73dec2
Show patches_applied, and build_is_release axes
edwintorok Nov 25, 2019
3639eab
Fix some Dune warnings
edwintorok Nov 29, 2019
e45cbe6
Memoize the result of some Sql queries: we've been repeating the same…
edwintorok Aug 21, 2019
e337897
Async postgres queries
edwintorok Nov 29, 2019
51ee3c8
async wip
edwintorok Dec 1, 2019
4dcb9a9
Convert queries to asynchronous queries
edwintorok Dec 1, 2019
98478d9
Convert more queries to asynchronous ones
edwintorok Dec 1, 2019
a8a9052
Shut down the async loop when done
edwintorok Dec 1, 2019
85d690b
Cleanup some async handling
edwintorok Dec 1, 2019
e81d0b7
Handle nested includes from suite definitions
edwintorok Dec 1, 2019
2130144
Parallelize more queries
edwintorok Dec 1, 2019
2210dd4
Parallelize more queries
edwintorok Dec 1, 2019
cfaab55
parallelize more queries and https queries too
edwintorok Dec 1, 2019
51b1d9c
Show more accurate median statistics
edwintorok Dec 2, 2019
8f90a17
ssl0.5.7 for older openssl version
edwintorok Dec 10, 2019
c038cac
fix url decoding of -
edwintorok Dec 10, 2019
ceb86d3
Disable forcing of Y from/to zero and split by build_is_release
edwintorok Dec 10, 2019
5e5e7f2
Add Travis CI build script
edwintorok Dec 19, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
use http basic authentication when fetching url data
Signed-off-by: Marcus Granado <marcus.granado@citrix.com>
mg12ctx authored and edwintorok committed Nov 29, 2019
commit bd364b9c9691d8dae76eeea7ff1224927abea4c3
17 changes: 17 additions & 0 deletions src/brief_handler.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
open Core.Std
open Utils

let config_file = Sys.argv.(2)

let config =
In_channel.(with_file config_file ~f:input_lines)
|> List.map ~f:(fun line -> Scanf.sscanf line "%s@=%s" (fun k v -> (k,v)) )
|> String.Table.of_alist_exn

let get_config key =
match String.Table.find config key with
| None -> debug (sprintf "Fatal error: Could not find config key '%s' in %s" key config_file); raise Not_found
| Some x -> x

let rage_username = get_config "rage_username"
let rage_password = get_config "rage_password"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we already have config fields called "rage_user" and "rage_pass"? See OMakefile. Is there a reason why these need to be different from those?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are for the database, and this one is for a service account used to access confluence/bitbucket (they no longer work without authentication).
Agreed that it is confusing if both are called rage_user*, I'll rename to something more obvious.


(* types of the url input arguments *)
type cols_t = (string * string list) list list with sexp
type rows_t = (string * string list) list list with sexp
@@ -82,6 +97,8 @@ let t ~args = object (self)
let conn = Curl.init() and write_buff = Buffer.create 16384 in
Curl.set_writefunction conn (fun x->Buffer.add_string write_buff x; String.length x);
Curl.set_url conn url;
Curl.set_username conn rage_username;
Curl.set_password conn rage_password;
Curl.perform conn;
Curl.global_cleanup();
Buffer.contents write_buff;