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

Axios Post Request fails behind HTTP Proxy #131

Closed
4 of 10 tasks
EHitchcockIAG opened this issue Sep 29, 2022 · 5 comments · Fixed by #132
Closed
4 of 10 tasks

Axios Post Request fails behind HTTP Proxy #131

EHitchcockIAG opened this issue Sep 29, 2022 · 5 comments · Fixed by #132
Labels
enhancement New feature or request
Milestone

Comments

@EHitchcockIAG
Copy link
Contributor

Description

Describe your issue here.

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • example code related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

When Axios POSTs the request to HTTPS webhook (to trigger Slack Workflow) on a Github Runner acting behind a HTTP proxy, the request will hang forever. This is due to an outstanding Axios bug which hasn't been fixed.

Reproducible in:

package version: 1.22.0

node version: 16.14.2

OS version(s): Amazon Linux 2

Steps to reproduce:

  1. Configure Slack workflow and add SLACK_WEBHOOK_URL to Github Secrets.
  2. Trigger slackapi/slack-github-action in Github Agent running an HTTP proxy configured with the HTTPS_PROXY environment variable.
    steps:
      - name: Send GitHub Action trigger data to Slack workflow
        id: slack
        uses: slackapi/slack-github-action@v1.22.0
        with:
          payload: |
            {
              "version": "1.0.0",
              "message": "This came from Github!"
            }
        env:
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

Expected result:

Github Workflow passes and Webhook triggers Slack Workflow.

Actual result:

slackapi/slack-github-action runs forever in Github Workflow.

Attachments:

image

I was able to resolve this by configuring an https-proxy-agent when the request webhook uses HTTPS and the proxy uses HTTP. Link to PR in fork https://github.com/EHitchcockIAG/slack-github-action-debug/pull/2/files. Currently we are using the tag v1.23.0-alpha from the fork in our Github Workflows.

image

I'm not sure if this is an adequate solution by the team's standards. If this looks okay, I can add some tests and open a PR to main.

@seratch
Copy link
Member

seratch commented Sep 29, 2022

Hi @EHitchcockIAG, thanks a lot for writing in with details!

Can you help me understand the need you described here? The scenario is that you have a public proxy endpoint and you would like to use it for Slack webhook requests from a GitHub Actions job, right? If yes, this feature request makes sense to me and I think we should support it in future versions.

@seratch seratch added the enhancement New feature or request label Sep 29, 2022
@seratch seratch added this to the 1.23 milestone Sep 29, 2022
@EHitchcockIAG
Copy link
Contributor Author

Hi @seratch,,

Our use case is to trigger a Slack webhook from a Github runner running behind a corporate HTTP proxy. Requests are blocked to the wider web from the Github runner unless routed through the corporate proxy.

Cheers

@seratch
Copy link
Member

seratch commented Sep 29, 2022

Help me better understand your situation a bit more. Does it mean you use on-premise github enterprise?

@EHitchcockIAG
Copy link
Contributor Author

EHitchcockIAG commented Sep 29, 2022

We are using Github SaaS (not the on-premise enterprise version) with an Organization, and the runner agents within this organization are AWS hosted runners

@seratch
Copy link
Member

seratch commented Sep 29, 2022

Ah I see. This makes sense. Thanks for answering! Our team is happy to have your contribution!

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

Successfully merging a pull request may close this issue.

2 participants