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

Github Runner Scaler doesn't trigger until all job environments are approved #5788

Closed
jamesgrogantech opened this issue May 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jamesgrogantech
Copy link

Report

I am using GitHub environments for deployment with rules setup to protect the GitHub actions from running the deployment to production without approval. I am using the GitHub Runner scaler to trigger a self hosted runner to start. The trigger is only sent once the approval has gone ahead despite the development environment not having any approval rules.

These are two separate jobs like this:

on:
  workflow_dispatch:

jobs:
  migrate-dev:
    runs-on: self-hosted
    environment: dev <- This environment has no protection rules
    steps: .....
  migrate-prod:
    runs-on: self-hosted
    environment: production <- This environment requires approval before deployment
    steps: .....

I am running my self hosted runner on an Azure Container App Job which makes use of the KEDA Github Runner Scaler

Expected Behavior

I expect the first job (on the development environment) to trigger immediately and then the production environment to wait until it's been approved before triggering.

Actual Behavior

The trigger isn't happening for either jobs until the approval rule has been satisfied.

Steps to Reproduce the Problem

  1. Setup a GitHub Action with two jobs.
  2. Setup two GitHub environments one with protection rules one without.
  3. Assign the environments to the GitHub Action jobs
  4. Trigger the action
  5. Wait for the trigger - it won't come through
  6. Approve one of the jobs - the trigger will start

Logs from KEDA operator

N/A

KEDA Version

2.12.1

Kubernetes Version

None

Platform

Microsoft Azure

Scaler Details

Github Runner Scaler

Anything else?

No response

@jamesgrogantech jamesgrogantech added the bug Something isn't working label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant