#Quick one that probably doesn't need a

1 messages · Page 1 of 1 (latest)

heavy jasper
#

Can you share a snippet of the code you're using to assign to the variable?

prisma token
#
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

heavy jasper
#

Well, that doesn't make sense 🤔

#

Can you make a simple reproducible example?

prisma token
#

I'd have to write it from scratch, this is work code rather than any of my stuff, but probably yes

heavy jasper
#

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.

prisma token
#

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

heavy jasper
#

I can't replicate your issue. If I make a simple example I get a string back. So waiting for more info.

prisma token
#

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

heavy jasper
#

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.

prisma token
#

Yeah that module a bit out of date, the version in use in work has the aws

prisma token
#

Ok I can't reproduce on my machine either

#

I'll revisit this tomorrow morning on my work laptop