Updating environment variable in dashboard and re-running job

I just wanted some clarification around the envars.

We updated a password, but did not realize we needed to also update the password in the Circle environment till after part of the build failed. I then updated the envar and clicked re-run workflow, but it is still failing with the same error.

Do the envars not get set at the time of running the workflow? Is the envar somehow already saved in the actual workflow at the time the workflow was generated?

I can even run the workflow with ssh and see that the password is not the same as the one set in the dashboard (it’s cat’d to a file then echo’d).

For now I’m assuming the envars are somehow saved with the workflow when it is created, but I wanted some clarification.

Edit: I actually just kicked off a completely new workflow via git push, and it is still failing saying the password is incorrect. I’ve double checked everything. The password is verified working elsewhere as well. At a loss here.

Hi @steezeburger, and welcome to the CircleCI community!

Is the workflow in question using a context?

I’m thinking that maybe two environment variables with the same name have been declared in two different places, the one that was updated is not the one actually used in the workflow/job.

Let me know if this makes sense.

That does make sense!

I actually discovered the issue though.

We updated the password, and updated the envar, BUT the database that was being hit by Circle was actually an older instance of the database that had not been switched over yet. So just a user error after all :slight_smile:

1 Like

Thanks for letting me know, @steezeburger!

I’m glad you were able to identify the cause, and solve this issue.