#Quick one that probably doesn't need a
1 messages · Page 1 of 1 (latest)
string_value = await self.cli().with_exec(["command", "that", "returns", "string", "to", "stdout"]).stdout()
string_value is a tuple of ("actual_string_I_wanted",)
I originally had this inside set_secret in 0.12.0 (I'm updating this to 0.13.7):
dag.set_secret("secret-name", await self.cli().with_exec(["command", "that", "returns", "string", "to", "stdout"]).stdout())
And that worked
I'd have to write it from scratch, this is work code rather than any of my stuff, but probably yes
Yes, that's what I meant. A clean example from scratch which minimally shows this. I need to drop off in a couple minutes otherwise I'd jump on that, but it's strange that if that's released in 0.13.7, because it didn't fail any tests. So a great first step is for you to isolate the issue in a clean example and see if the same thing happens.
Will do so later, shouldn't take long
Oh actually I based this on my own module
Currently trying to debug why with_registry_auth isn't working, that was the first problem (now worked around) and there appears to be another issue somewhere
I can't replicate your issue. If I make a simple example I get a string back. So waiting for more info.
If you try with aws ecr --region <whichever> get-login-password that might replicate it before I get chance
I'm wondering if the stdout is just a bit different for that command
Yeah, I see. I don't have AWS, but you can try replacing it with a simple "echo". Also, in your code you have
.with_exec(["--region", self.region, "ecr", "get-login-password"])
That tells me you're relying on an entrypoint which no longer works. You should prepend it in the args there so it's more explicit, or enable with .with_exec([...], use_entrypoint=True). However, you should get an error from command "--region" not found, so I suppose you have additional changes locally.
Yeah that module a bit out of date, the version in use in work has the aws