portkey

Portkey: from REPL to Serverless in one call
2018-05-01T08:55:13.000099Z

2018-05-01T10:04:34.000213Z

2018-05-01T10:04:35.000006Z

2018-05-01T10:33:24.000190Z

viesti 2018-05-01T10:33:55.000079Z

from 39 failures, 12 errors to 15 failures, 12 errors by fixing test :troll:

🙌 1
2018-05-01T11:11:50.000100Z

👌 1
viesti 2018-05-01T11:14:02.000043Z

just what I was looking for too 🙂

2018-05-01T11:40:27.000215Z

baptiste-from-paris 2018-05-01T12:20:50.000171Z

sorry for that...

baptiste-from-paris 2018-05-01T12:23:13.000215Z

very cool 🙂 ! I go at the restaurant for 2 hours and you guys already did the review job ^^

viesti 2018-05-01T12:42:37.000136Z

np, this is small compared to your contribution 🙂

cgrand 2018-05-01T12:46:08.000161Z

>>> For some services, you must include the X-Amz-Security-Token query parameter in the canonical (signed) query string. For other services, you add the X-Amz-Security-Token parameter at the end, after you calculate the signature. For details, see the API reference documentation for that service.

cgrand 2018-05-01T12:46:22.000196Z

Ok and how do I know?

baptiste-from-paris 2018-05-01T12:46:43.000018Z

hĂŠhĂŠ

baptiste-from-paris 2018-05-01T12:46:55.000311Z

from sign4 or 2 ?

baptiste-from-paris 2018-05-01T12:47:01.000241Z

thx 🙂

viesti 2018-05-01T12:47:43.000022Z

hmm, might this relate to role based access control

cgrand 2018-05-01T12:48:08.000215Z

so iot is an exception https://github.com/mhart/aws4/issues/30

cgrand 2018-05-01T12:48:15.000350Z

sigv4 non s3

viesti 2018-05-01T13:02:12.000253Z

mkay

2018-05-01T13:34:40.000241Z

2018-05-01T13:42:56.000510Z

2018-05-01T13:44:46.000135Z

2018-05-01T13:52:54.000592Z

2018-05-01T14:05:17.000421Z

cgrand 2018-05-01T14:05:51.000053Z

all tests pass

baptiste-from-paris 2018-05-01T14:06:12.000003Z

nice 🎉

viesti 2018-05-01T14:06:42.000548Z

🦜

baptiste-from-paris 2018-05-01T14:06:54.000489Z

can you quickly explain what went wrong ?

viesti 2018-05-01T14:07:38.000524Z

> Yay, all your tests have been fixed!

viesti 2018-05-01T14:07:47.000114Z

says CircleCI too

baptiste-from-paris 2018-05-01T14:08:15.000200Z

lol

baptiste-from-paris 2018-05-01T14:08:31.000150Z

I hope they gave a test suite for signing v2

cgrand 2018-05-01T14:10:37.000227Z

there were errors in the tests: • treating normalize-path.txt as a test case • multi-valued headers (both multiline value and multiple occurences) were not properly handled when generating the headers map

cgrand 2018-05-01T14:11:31.000183Z

errors in signature code: • missing percent encoding for non-ASCII • improper path normalization

baptiste-from-paris 2018-05-01T14:11:45.000397Z

ok

cgrand 2018-05-01T14:12:18.000127Z

v2 is only required by simple db, no?

baptiste-from-paris 2018-05-01T14:12:38.000042Z

I am not sure, that’s what I am looking at right now

cgrand 2018-05-01T14:13:18.000209Z

oh and third bullet: STS token handling depending on service name and moon phase

baptiste-from-paris 2018-05-01T14:13:32.000594Z

😂

baptiste-from-paris 2018-05-01T14:14:59.000057Z

okay so it looks like sdb is the only service that supports ONLY v2

baptiste-from-paris 2018-05-01T14:15:10.000029Z

which is a pretty good news

baptiste-from-paris 2018-05-01T14:15:31.000639Z

as it’s also a “deprecated” service

cgrand 2018-05-01T14:15:41.000341Z

and is there any compelling reason for someone to use v2 on other services?

baptiste-from-paris 2018-05-01T14:15:49.000275Z

nope, none

viesti 2018-05-01T14:24:28.000302Z

hmm, did we have issue for S3 support?

baptiste-from-paris 2018-05-01T14:25:42.000198Z

it’s a special protocol not yet implemented

baptiste-from-paris 2018-05-01T14:26:08.000498Z

there are 5 of them, we’ve done 1

baptiste-from-paris 2018-05-01T14:26:38.000412Z

I have to finish the query protocol, working on it, hope to come with something in the next 2 weeks

baptiste-from-paris 2018-05-01T14:31:17.000130Z

oh, I did not see the new partitions.json ^^

baptiste-from-paris 2018-05-01T14:34:04.000454Z

no more resources/aws-sdk-core/apis/ ?

baptiste-from-paris 2018-05-01T14:34:13.000282Z

how do we generate apis then ^^ ?

cgrand 2018-05-01T14:34:18.000345Z

And I should revive the spec split

cgrand 2018-05-01T14:36:32.000542Z

Most apis descriptors are now part of the Java SDK. @viesti worked on that

baptiste-from-paris 2018-05-01T14:37:07.000221Z

ok

baptiste-from-paris 2018-05-01T14:37:08.000307Z

most ?

cgrand 2018-05-01T14:40:28.000625Z

S3 is missing iirc

cgrand 2018-05-01T15:06:32.000118Z

I’d rather source from aws-sdk-ruby for example; @viesti, your opinion?

viesti 2018-05-01T15:11:15.000750Z

hum, it might be more complete, haven't checked

cgrand 2018-05-01T15:11:51.000457Z

and what about script vs dev dep?

viesti 2018-05-01T15:12:17.000760Z

dev time script could fetch the specs

viesti 2018-05-01T15:12:59.000244Z

I'm a bit surprised on this amount of corners of the internet that have aws specs here and there :)

cgrand 2018-05-01T15:14:21.000201Z

or why don’t they have a public repo for them?

viesti 2018-05-01T15:25:58.000652Z

maybe aws-sdk-ruby as git submodule, to keep track of specific version

viesti 2018-05-01T15:31:41.000193Z

from where was the initial api specs, before aws-java-sdk-models, taken from @cgrand ? (as I recall, s3 was missing from those specs too)

baptiste-from-paris 2018-05-01T16:39:40.000394Z

I don’t remember

baptiste-from-paris 2018-05-01T16:40:02.000387Z

so there is no harmonized way of having some descriptions files

baptiste-from-paris 2018-05-01T16:40:10.000506Z

from official sdks ?

viesti 2018-05-01T16:42:56.000354Z

I guess com.amazonaws/aws-java-sdk-models is official source, but is missing S3

viesti 2018-05-01T16:43:24.000282Z

apropo, resources/aws-sig-v4-test-suite should be a dev-time resource

viesti 2018-05-01T16:44:46.000385Z

hmm, aws-sdk-ruby is I guess official too, since it’s under aws github organization

viesti 2018-05-01T16:46:39.000271Z

but haven’t yet found a single language independent place of api specs

2018-05-01T16:59:16.000149Z

baptiste-from-paris 2018-05-01T17:01:36.000732Z

👍

viesti 2018-05-01T17:01:51.000509Z

So made it such. Also using classpath for resolving path to aws-sig-v4-test-suite, since remembering that in Cursive the working directory might not be the project directory (might be that this actually was for Leiningen tasks though only).

viesti 2018-05-01T17:02:36.000412Z

should compare list of api specs from the ruby sdk with the maven artifact

viesti 2018-05-01T17:03:06.000638Z

I think a git submodule would make sense for tracking a repo with the api specs

baptiste-from-paris 2018-05-01T17:03:32.000644Z

so 2 submodules, java and ruby one

baptiste-from-paris 2018-05-01T17:03:44.000329Z

one task to compare both api description

baptiste-from-paris 2018-05-01T17:04:24.000136Z

?

baptiste-from-paris 2018-05-01T17:53:59.000612Z

note that I see only what appears to be the last version of each lib =>

baptiste-from-paris 2018-05-01T17:55:13.000285Z

I compare this to the “old” way where we had all versions co-existing

baptiste-from-paris 2018-05-01T17:56:23.000278Z

which is fine, I am just saying

baptiste-from-paris 2018-05-01T17:57:50.000005Z

it looks like there is some light this way => https://github.com/aws/aws-sdk-ruby/tree/master/apis/s3/2006-03-01

viesti 2018-05-01T18:16:11.000289Z

user> (count model-jar-entries)
128

viesti 2018-05-01T18:16:27.000095Z

kimmoko@MACTN0AFH040  ~/programming/aws-sdk-ruby/apis(master|✔)
0% ls -C1 | wc -l
     136

viesti 2018-05-01T18:16:38.000725Z

I guess we’d need only stuff from the ruby sdk

baptiste-from-paris 2018-05-01T18:16:53.000520Z

might be yes

viesti 2018-05-01T18:24:48.000026Z

so thinking that would make sense to keep only the latest version of the api spec

viesti 2018-05-01T18:26:19.000369Z

0% du -h -d 1 | sort -h
8.0K	./.github
 32K	./tasks
 92K	./doc-src
992K	./build_tools
 27M	./apis
 53M	./gems
 58M	./.git
139M	.

baptiste-from-paris 2018-05-01T18:27:10.000602Z

#{"alexaforbusiness" "opsworkscm" "application-autoscaling"
  "lex-models" "appstream" "secretsmanager" "connect"
  "mediastore-data" "fms" "resourcegroupstaggingapi"
  "AWSMigrationHub" "s3" "meteringmarketplace" "iotanalytics"
  "elasticloadbalancingv2" "iot-data" "kinesis-video-media"
  "autoscaling-plans" "pricing" "iot-jobs-data"
  "kinesis-video-archived-media" "acm-pca"}

baptiste-from-paris 2018-05-01T18:27:22.000462Z

found in ruby and not in java

viesti 2018-05-01T18:28:33.000737Z

that’s 22 items, there 8 item difference in the count, hmm…

baptiste-from-paris 2018-05-01T18:29:29.000005Z

yes I know 🙂

baptiste-from-paris 2018-05-01T18:30:23.000649Z

I might be wrong because I did a difference on a set, on directory names by excluding all the 2222-22-22 dirs

viesti 2018-05-01T18:30:52.000580Z

different naming, for example iot-jobs-data vs data.jobs.iot

baptiste-from-paris 2018-05-01T18:31:04.000336Z

oh, nice one lol

baptiste-from-paris 2018-05-01T18:31:52.000569Z

anyway, there are more description files in the ruby repo

viesti 2018-05-01T18:36:18.000173Z

do we need to generate api from versions other than the latest?

viesti 2018-05-01T19:01:57.000359Z

user> (def ruby-sdk-apis (set (for [file (.listFiles (java.io.File. “/Users/kimmoko/programming/aws-sdk-ruby/apis”))
                                    :let [[latest-api-dir] (sort #(compare %2 %1) (.listFiles file))
                                          json (with-open [rdr (<http://clojure.java.io/reader|clojure.java.io/reader> (<http://clojure.java.io/file|clojure.java.io/file> latest-api-dir “api-2.json”))]
                                                 (cheshire.core/parse-stream rdr true))]]
                                (get-in json [:metadata :serviceFullName]))))
#’user/ruby-sdk-apis
user&gt; (def aws-java-sdk-apis (set (for [entry model-jar-entries
                                        :let [json (with-open [in (.getInputStream jar-file entry)
                                                               rdr (<http://clojure.java.io/reader|clojure.java.io/reader> in)]
                                                     (cheshire.core/parse-stream rdr true))
                                              ]]
                                    (get-in json [:metadata :serviceFullName]))))
#’user/aws-java-sdk-apis
user&gt; (clojure.set/difference ruby-sdk-apis aws-java-sdk-apis)
#{“Amazon Kinesis Video Streams” “AWS IoT Analytics” “Amazon Simple Storage Service” “Firewall Management Service” “Amazon Kinesis Video Streams Archived Media” “Amazon Connect Service” “AWS Certificate Manager Private Certificate Authority” “AWS Secrets Manager”}
user&gt; (count (clojure.set/difference ruby-sdk-apis aws-java-sdk-apis))
8

viesti 2018-05-01T19:05:59.000548Z

133 entries in latest maven model artifact: https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-models/1.11.320

viesti 2018-05-01T19:14:59.000248Z

no S3 though 😕

viesti 2018-05-01T19:48:36.000380Z

right, so we go back to sourcing from ruby

viesti 2018-05-01T19:48:56.000180Z

is the submodule idea any good?

viesti 2018-05-01T19:49:31.000092Z

was thinking that bumping the source dependency would be a bump of the submodule, would not need to write code to fetch the spec files

cgrand 2018-05-01T19:57:56.000290Z

Sounds ok but I have no strong git opinions.

2018-05-01T20:07:34.000600Z

2018-05-01T20:07:34.000603Z

viesti 2018-05-01T20:07:54.000156Z

trying it out

viesti 2018-05-01T20:07:56.000639Z

but sleep now

baptiste-from-paris 2018-05-01T21:05:10.000076Z

👍