Skip to content

Upgrade from to v0.13.0 to v0.15.0 leads to error in scale-up #980

@elft3r

Description

@elft3r

Hey,
I wanted to upgrade the module from v.0.13.0 to v0.15.0. However, this leads to the following error message in the scale-up lambda:

2021-07-13T08:32:37.700Z	undefined	ERROR	Uncaught Exception 	
{
    "errorType": "TypeError",
    "errorMessage": "Cannot set property 'scaleUp' of undefined",
    "stack": [
        "TypeError: Cannot set property 'scaleUp' of undefined",
        "    at Module.30873 (/var/task/index.js:61201:24)",
        "    at __nccwpck_require__ (/var/task/index.js:66346:43)",
        "    at /var/task/index.js:66431:37",
        "    at Object.<anonymous> (/var/task/index.js:66434:12)",
        "    at Module._compile (internal/modules/cjs/loader.js:999:30)",
        "    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)",
        "    at Module.load (internal/modules/cjs/loader.js:863:32)",
        "    at Function.Module._load (internal/modules/cjs/loader.js:708:14)",
        "    at Module.require (internal/modules/cjs/loader.js:887:19)",
        "    at require (internal/modules/cjs/helpers.js:74:18)"
    ]
}

Can anyone help me to understand what I am missing? Also, let me know if you need additional information to understand the problem I'm facing better.

This is the code I used to apply the module:

module "github_runners" {
  source = "git::git@github.com:philips-labs/terraform-aws-github-runner.git?ref=v0.15.0"

  aws_region = var.aws_region
  vpc_id     = data.terraform_remote_state.vpc_mgmt.outputs.vpc_id
  subnet_ids = data.terraform_remote_state.vpc_mgmt.outputs.private_subnet_ids

  environment = var.environment

  github_app = {
    key_base64     = var.github_app_key_base64
    id             = var.github_app_id
    client_id      = var.github_app_client_id
    client_secret  = var.github_app_client_secret
    webhook_secret = random_password.random.result
  }

  webhook_lambda_zip                = "${path.module}/lambdas-downloads/webhook.zip"
  runner_binaries_syncer_lambda_zip = "${path.module}/lambdas-downloads/runner-binaries-syncer.zip"
  runners_lambda_zip                = "${path.module}/lambdas-downloads/runners.zip"
  enable_organization_runners       = true
  runner_extra_labels               = var.runner_extra_labels

  # enable access to the runners via SSM
  enable_ssm_on_runners = true

  # Uncommet idle config to have idle runners from 9 to 5 in time zone Amsterdam
  idle_config = [{
    cron      = "* * 9-17 * * *"
    timeZone  = "Europe/Amsterdam"
    idleCount = 1
  }]

  # Let the module manage the service linked role
  create_service_linked_role_spot = true

  # For now we give the runner admin access, this needs to be restricted later
  runner_iam_role_managed_policy_arns = [
    "arn:aws:iam::aws:policy/AdministratorAccess",
    "arn:aws:iam::aws:policy/AmazonSSMFullAccess",
  ]

  userdata_pre_install = file("${path.module}/templates/install-packages.sh")
}

Thanks for your help.

Activity

changed the title [-]Upgrade from to v0.13.0 to v0.15.0 [/-] [+]Upgrade from to v0.13.0 to v0.15.0 leads to error in scale-up[/+] on Jul 13, 2021
mpkonmbk

mpkonmbk commented on Jul 13, 2021

@mpkonmbk

Same issue here

ravenolf

ravenolf commented on Jul 13, 2021

@ravenolf
Contributor

Had the same issue, it seems there was an issue while building the lambda package. I worked around it by using the runners zip file from the 0.14.0 release

npalm

npalm commented on Jul 13, 2021

@npalm
Member

And having the same issue, having no clue wat is the problem, I will disable the current release

npalm

npalm commented on Jul 13, 2021

@npalm
Member

Problem is caused by ncc/vercel upgrae, will downgrade ncc back to 0.27

added a commit that references this issue on Jul 13, 2021
npalm

npalm commented on Jul 13, 2021

@npalm
Member

issue should be resoved

elft3r

elft3r commented on Jul 14, 2021

@elft3r
Author

Thank you @npalm for your rapid response and the fix. I just upgraded to the latest version and it also works for me.

added a commit that references this issue on Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @elft3r@npalm@ravenolf@mpkonmbk

        Issue actions

          Upgrade from to v0.13.0 to v0.15.0 leads to error in scale-up · Issue #980 · github-aws-runners/terraform-aws-github-runner