Hi team, I’ve started testing Roll with Jons help and have reached a blocker (I think). Can someone point me in the right direction?
to sanity check mach/roll I first ran “mach info” and that was fine. Then I ran “mach roll-info” based on seeing that in the machfile, and then I see…
➜ edge git:(master) ✗ mach roll-info $ git describe --dirty --long --tags --match [0-9]* 0.0.1-66-g054ed48-dirty Error whilst performing shell command.
am I on the right track or is this something that needs debugging. BTW I’m in no hurry on this but grateful for any help
What is the error?
That git output line is normal
more context. mach uberjar works fine
this is all within the edge project BTW
no modifications except changing my own AWS ids
but “mach tfjson” fails with same as “mach roll-info”
i.e. Error whilst performing shell command.
I’m wondering if there is a verbose/debug mode for mach that will tell us more?
@steveb8n just to check (coming into this late), are you on master of mach?
@dominicm I installed yesterday using “sudo npm install -g @juxt/mach” so I presume yes
how can I tell from an npm install?
d/w, you're probably up to date. I thought edge was more experimental than it is. So all is good there.
~/src/github.com/juxt/edge master*
❯ mach roll-info
$ git describe --dirty --long --tags --match [0-9]*
0.0.1-66-g054ed48
evalmachine.<anonymous>:98
throw ex;
^
Error: Error whilst performing shell command.
at roll$core$sh (evalmachine.<anonymous>:171:8)
at roll$core$resolve_region (evalmachine.<anonymous>:235:122)
at evalmachine.<anonymous>:526:42
at cljs.core.PersistentVector.cljs$core$IReduce$_reduce$arity$3 (<embedded>:1106:284)
at Function.cljs.core.reduce.cljs$core$IFn$_invoke$arity$3 (<embedded>:577:181)
at cljs.core.reduce (<embedded>:574:174)
at Function.roll.core.preprocess.cljs$core$IFn$_invoke$arity$variadic (evalmachine.<anonymous>:524:35)
at roll$core$preprocess (evalmachine.<anonymous>:500:29)
at evalmachine.<anonymous>:47:36
at evalmachine.<anonymous>:70:43
Is this your full error? ^^no, I just get the Error msg. I’ll paste exact….
➜ edge git:(master) ✗ mach roll-info $ git describe --dirty --long --tags --match [0-9]* 0.0.1-66-g054ed48-dirty Error whilst performing shell command. ➜ edge git:(master) ✗
Odd that you don't get a stack, but it's the same error I think 🙂. I wondered if you were cutting it off.
I can improve that error message I think, one sec.
odd indeed 🙂 holding…
@steveb8n https://github.com/SevereOverfl0w/roll/tree/sherrormsg can you try this branch/fork? Just:
git clone <https://github.com/SevereOverfl0w/roll.git>
cd roll
git checkout sherrormsg
lein install
then try run mach roll-info
from edge again➜ edge git:(master) ✗ mach roll-info $ git describe --dirty --long --tags --match [0-9]* 0.0.1-66-g054ed48-dirty Error whilst performing shell command: [“aws” “configure” “get” “region”] ➜ edge git:(master) ✗
can I try that aws cli command on it’s own?
yep
maybe a problem with my awscli
@steveb8n pro-tip: AWS_PROFILE=profilenameforaws aws configure get region
bear with me, need to swot up on awscli
https://github.com/juxt/edge/blob/054ed4879ba113ca3e52a732cb648e24ddc66921/resources/config.edn#L36 you can change this line to be your expected AWS profile for people if you don't want to use environment variable.
You can cat ~/.aws/credentials
to figure out which profiles you have.
Ah. Ensure u have a default aws region set in your aws cli setup
Or a region set for the profile u are using
@jonpither https://github.com/SevereOverfl0w/roll/commit/ddd5471d1581f7afa11952a825d3aeb4a3f9663b here's my patch, it's a bit crap because it just prints out the vector. You might want to do something a bit fancier similar to mach.
ok, that was it. I had no default region configured for the cli
now getting Error whilst performing shell command: [“aws” “s3api” “head-object” “--bucket” “roll-deployment-artifacts” “--key” “”]
but I suspect I need to follow the edge script a little further
that’s my bucket name but it looks like I need a key somewhere
either way, might be worth handling empty region in roll mach script for future noobs
https://github.com/juxt/edge/blob/054ed4879ba113ca3e52a732cb648e24ddc66921/resources/config.edn#L57 I think this is the key, or supposed to be. Haven't followed the code fully yet, but you might know what's wrong already based on that line
@steveb8n I did the same thing 😉 Repeatedly. Agree with what you're saying.
@steveb8n Did you set AWS_PROFILE
or did you make your profile the default one?
I just used “aws configure”
https://github.com/juxt/edge/blob/054ed4879ba113ca3e52a732cb648e24ddc66921/resources/config.edn#L36 roll needs this key set, you can change it to #or [#env AWS_PROFILE "default"]
. Uncertain whether making default
the default is a good idea rn, but under consideration.
roger that, trying now
(it probably is a good idea, I just have no idea how people use awscli in practice, I use it by not using it and just having the config file saying it's there.)
Error whilst performing shell command: [“aws” “s3api” “head-object” “--bucket” “roll-deployment-artifacts” “--key” “” “--profile” “default”]
still missing a “key” somewhere
yeah, looks like I was wrong :thinking_face:
You know what, this might be normal.
Do you have any artifacts released?
Try mach upload
first @steveb8n
that worked. apparently I need to RTFM
I didn't know there was a manual, I'm reading the source code 😜
tfjson now works as well
problem was that it tries to resolve latest artifact (of which there was none), and tries to continue.
Gonna open issue on roll for this stuff
cool. good to avoid this in future
Feel free to @ me if you have any more problems. I've opened issues on github.
will do, thanks. It’s dinner time so I’ll stop for now.
I’ll update with progress when I resume
have a good Friday