Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel Matrix Actions Fail When Connecting to Twingate #12

Open
gal1419 opened this issue Dec 14, 2024 · 0 comments
Open

Parallel Matrix Actions Fail When Connecting to Twingate #12

gal1419 opened this issue Dec 14, 2024 · 0 comments

Comments

@gal1419
Copy link

gal1419 commented Dec 14, 2024

I have a GitHub workflow that runs a matrix of actions to deploy services to EKS. Each action within the matrix connects to Twingate using the same service key and then attempts to run helm upgrade. However, only one service deployment succeeds at a time.

When I rerun the failed jobs using the Re-run failed jobs option, another action succeeds while the rest fail. I can repeat this process multiple times until the workflow is eventually completed successfully. This suggests that multiple connections to Twingate cannot be established in parallel.

I also attempted to connect to Twingate at the workflow level (before the matrix actions) to see if it would resolve the issue, but it didn't work.

Below is a simplified version of the workflow YAML to demonstrate the issue:

name: deploy-api
inputs:
  twingate-service-key:
    description: 'Twingate service key'
    required: true

runs:
  using: composite
  steps:
    - name: Configure Twingate
      uses: twingate/github-action@v1
      with:
        service-key: ${{ inputs.twingate-service-key }}

    - name: Deploy
      uses: koslib/helm-eks-action@master
      env:
        KUBE_CONFIG_DATA: ${{ env.KUBE_CONFIG_DATA }}
      with:
        command: |
          helm upgrade --install ${{ inputs.app-name }} ${{ inputs.deployment-chart }} \
          --namespace ${{ inputs.namespace }} \
          --values ${{ inputs.deployment-chart }}/values.yaml \
          --values ${{ inputs.app-values }} \
          --set version=${{ inputs.app-name }}-${{ inputs.image-tag }} \
          --set image=${{ steps.login-ecr.outputs.registry }}/${{ inputs.ecr-repository }} \
          --set environment=production \
          --atomic --timeout 5m

It appears that Twingate does not support multiple parallel connections with the same service key. If that’s the case, guidance on how to configure Twingate for parallel matrix jobs would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant