Github action output of qovery variables change?

hi,

i previously had a github action that would post the terraform outputs to pull request. this has recently broken does anyknow why?

qovery code:

          qovery_terraform_output=`qovery lifecycle env list --json -n "terraform" \
          --organization "Open Corporates" \
          --project "Open Corporates" \
          --environment ${{ steps.extract_branch.outputs.branch }} \
          | jq -r '.[] | select(.scope == "ENVIRONMENT" and .alias_parent_key != null) | [.key, .interpolated_value] | @tsv' \
          | awk -v OFS=" | " 'BEGIN{print "| Key | Value |\n| --- | ----- |"} {print "| "$1, $2" |"}'`

          echo "QOVERY_STATUS_MARKDOWN_OUTPUT<<EOF" >> "$GITHUB_OUTPUT"
          echo "$qovery_terraform_output" >> "$GITHUB_OUTPUT"
          echo "EOF" >> "$GITHUB_OUTPUT"

$qovery_terraform_output now only returns the environment, where as previously it would return all outputs

Hello Stephen,

I’ll have a look at your problem.

Do you have an example of the expected output vs the new output?

Have you made any modifications since this post?

Regards,
Charles-Edouard

yes still that code with no changes. i expected to see what the pic in that post shows, which is all the outputs from terraform module. But now i just get

Hello @Stephen_Bennett :wave:

Looking at your environments, seems that the environment sec-fix doesn’t have any job outputs so it’s normal you don’t see any.

In your entire project, only the ren-cattrs environment has some job outputs.

Do you target the correct environment in your github action ?

so am i looking at it wrong then.

Im taking it that sec-fix is created in the namespace: z4789d231-sec-fix

and the logs are below, and i expected all those outputs to be in the github pull request

Outputs:

batch-job-environment = "oc-idp-turbot-fillet-sec-fix-compute-environment"
batch-job-queue = "arn:aws:batch:eu-west-2:058264218412:job-queue/oc-idp-turbot-fillet-sec-fix-job-queue"
dc-user = "oc-idp-turbot-fillet-sec-fix-user"
dc-user-secret-path = "arn:aws:secretsmanager:eu-west-2:058264218412:secret:turbot-fillet-sec-fix/oc-idp-turbot-fillet-sec-fix-user-kAuGbo"
s3-output-arn = "arn:aws:s3:::oc-idp-turbot-fillet-sec-fix-output"
s3-output-name = "oc-idp-turbot-fillet-sec-fix-output"
s3-state-arn = "arn:aws:s3:::oc-idp-turbot-fillet-sec-fix-state"
s3-state-name = "oc-idp-turbot-fillet-sec-fix-state"

Ok I took a deeper look, it comes from the variable output format
Your environment ren-cattrs has outputs variables that follow the good format: the “-” character is forbidden.

Can you output your variables using _ in your environment sec-fix ?

We added a task in our backlog to indicate which variables will be imported / which variables are rejected

so its the variable name that has to not contain -?

so s3-state-name is bad
s3_state_name is good?

yep changed all the outputs to _ and thats working! the other services deployed where already using _ for outputs…

thank you for the clarification!

S

so s3-state-name is bad
s3_state_name is good?

Yes exactly @Stephen_Bennett, sorry if it wasn’t clear

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.