Closed kondurure closed 10 months ago
Can you please show the actual commands that were executed? In the sequence you executed them.
here is the integration execution.
token=$(gcloud auth print-access-token)
export INTEGRATIONCLI_VERSION=v0.69.1-beta
curl -L https://raw.githubusercontent.com/GoogleCloudPlatform/application-integration-management-toolkit/main/downloadLatest.sh | sh -
/home/runner/.integrationcli/bin/integrationcli prefs set --reg=${{ inputs.region }} --proj=${{ inputs.organization }}
/home/runner/.integrationcli/bin/integrationcli token cache -t $token
if [ "${{ inputs.region }}" == "europe-west1" ]; then
echo "Integration deploy in ${{ inputs.region }}"
/home/runner/.integrationcli/bin/integrationcli integrations create -n ${{ inputs.integration_name }} -f ${{ github.workspace }}/src/${{ inputs.integration_name }}.json -u $SHORT_SHA -o ${{ github.workspace }}/overrides/${{ inputs.deploy_environment }}/overrides-weu.json > /tmp/response
else
echo "Integration deploy in ${{ inputs.region }}"
/home/runner/.integrationcli/bin/integrationcli integrations create -n ${{ inputs.integration_name }} -f ${{ github.workspace }}/src/${{ inputs.integration_name }}.json -u $SHORT_SHA -o '${{ github.workspace }}/overrides/${{ inputs.deploy_environment }}/overrides.json' > /tmp/response
fi
echo "integration response: " $(cat /tmp/response)
basename $(cat /tmp/response | jq -r .name) > /tmp/version
echo "integration version: " $(cat /tmp/version)
/home/runner/.integrationcli/bin/integrationcli integrations versions publish -n ${{ inputs.integration_name }} -v $(cat /tmp/version)
Based on the commands you have entered, I think the behavior is expected.
You have the following line:
/home/runner/.integrationcli/bin/integrationcli prefs set --reg=${{ inputs.region }} --proj=${{ inputs.organization }}
This sets the region to ${{ inputs.region }}
for all subsequent commands.
You have two options
-r
flag or-r
flag when you want it to point to another region. can you confirm its executing the if else condition you have correctly? Do you see the echo command getting executed if the region is europe-west1
?
Yes, it executing as expected, echo command executing when the region is europe-west1.
@srinandan, as suggested tried with 1st option deployment failing with below error.
Tried with both options as suggested but both are not working.
1) getting Error: region was not set in preferences or supplied in the command
/home/runner/.integrationcli/bin/integrationcli prefs set --proj=${{ inputs.organization }}
/home/runner/.integrationcli/bin/integrationcli token cache -t $token > /tmp/logs.tst
if [ "${{ inputs.region }}" == "europe-west1" ]; then
echo "Integration deploy in ${{ inputs.region }}"
/home/runner/.integrationcli/bin/integrationcli integrations create -n ${{ inputs.integration_name }} -f ${{ github.workspace }}/src/${{ inputs.integration_name }}.json -u $SHORT_SHA -o ${{ github.workspace }}/overrides/${{ inputs.deploy_environment }}/overrides-weu.json -r ${{ inputs.region }} > /tmp/response
else
echo "Integration deploy in ${{ inputs.region }}"
/home/runner/.integrationcli/bin/integrationcli integrations create -n ${{ inputs.integration_name }} -f ${{ github.workspace }}/src/${{ inputs.integration_name }}.json -u $SHORT_SHA -o '${{ github.workspace }}/overrides/${{ inputs.deploy_environment }}/overrides.json' -r ${{ inputs.region }} > /tmp/response
fi
2) integration deployments is success but overrides not happening from overrides.
if [ "${{ inputs.region }}" == "europe-west1" ]; then
echo "Integration deploy in ${{ inputs.region }}"
/home/runner/.integrationcli/bin/integrationcli prefs set --reg=${{ inputs.region }} --proj=${{ inputs.organization }}
/home/runner/.integrationcli/bin/integrationcli token cache -t $token > /tmp/logs.txt
/home/runner/.integrationcli/bin/integrationcli integrations create -n ${{ inputs.integration_name }} -f ${{ github.workspace }}/src/${{ inputs.integration_name }}.json -u $SHORT_SHA -o ${{ github.workspace }}/overrides/${{ inputs.deploy_environment }}/overrides-weu.json -r ${{ inputs.region }} > /tmp/response
else
/home/runner/.integrationcli/bin/integrationcli prefs set --reg=${{ inputs.region }} --proj=${{ inputs.organization }}
/home/runner/.integrationcli/bin/integrationcli token cache -t $token > /tmp/logs.txt
echo "Integration deploy in ${{ inputs.region }}"
/home/runner/.integrationcli/bin/integrationcli integrations create -n ${{ inputs.integration_name }} -f ${{ github.workspace }}/src/${{ inputs.integration_name }}.json -u $SHORT_SHA -o ${{ github.workspace }}/overrides/${{ inputs.deploy_environment }}/overrides.json -r ${{ inputs.region }} > /tmp/response
fi
can you test this from your local machine. Just execute the integrationcli command and make sure its doing the right thing for both regions?
I recommend two things
-r
with the integrationcli integrations create
, I would remove the -r
flag from the integrationcli pres set
command.integrationcli integrations create
with --verbose
so we can see what is being to sent to the control plane. Since debug may have sensitive information, please send the logs to @ssvaidyanathan by email.
Thanks @srinandan and @ssvaidyanathan. tried with manual deployment and deployment went fine as expected.
/home/runner/.integrationcli/bin/integrationcli token cache -t $token > /tmp/logs.txt
/home/runner/.integrationcli/bin/integrationcli prefs set --proj=${{ inputs.organization }}
if [ "${{ inputs.region }}" == "europe-west1" ]; then
echo "Integration deploy in ${{ inputs.region }}"
/home/runner/.integrationcli/bin/integrationcli integrations create -n ${{ inputs.integration_name }} -f ${{ github.workspace }}/src/${{ inputs.integration_name }}.json -o ${{ github.workspace }}/overrides/${{ inputs.deploy_environment }}/overrides-weu.json -r ${{ inputs.region }} > /tmp/response
else
echo "Integration deploy in ${{ inputs.region }}"
/home/runner/.integrationcli/bin/integrationcli integrations create -n ${{ inputs.integration_name }} -f ${{ github.workspace }}/src/${{ inputs.integration_name }}.json -o ${{ github.workspace }}/overrides/${{ inputs.deploy_environment }}/overrides.json -r ${{ inputs.region }} > /tmp/response
fi
echo "integration response: " $(cat /tmp/response)
basename $(cat /tmp/response | jq -r .name) > /tmp/version
echo "integration version: " $(cat /tmp/version)
/home/runner/.integrationcli/bin/integrationcli integrations versions publish -n ${{ inputs.integration_name }} -v $(cat /tmp/version) -r ${{ inputs.region }}
I'm trying to region specific deployments (overrides will be differ per region) with integrationcli integrations create but noticed below two issues post integration deployment to target environment.
integrationcli version 0.69.1-beta
1) I have few regions specific parm override for environments but with integrationcli integrations create, overrides from overrides not reflecting in target environments:
overrides for us-central1:
overrides for europe-west1:
2) we have requirement to deploy connectors and integrations in two regions (us-cetral1 and west-europe1) with same name but overrides of integrations differ Expectation: Integration of us-cetral1 should refer to us-cetral1 connector and Integration of west-europe1 should refer to west-europe1 connector
issue: integration which deployed in west-europe1 by using integrations create option, referring to us-cetral1 connector instead of west-europe1.
whereas above two issues not encountering if i use integration apply but here limitation is we don't have option to choose overrides based on regions