CircleCI-Public / serverless-framework-orb

Use the Serverless Framework orb for CircleCI to easily deploy to your favorite cloud platform.
https://circleci.com/orbs/registry/orb/circleci/serverless-framework
MIT License
5 stars 16 forks source link

Serverless Deploy failing #51

Closed atharrison closed 5 months ago

atharrison commented 6 months ago

Orb Version circleci/serverless-framework@2.0.1

Describe the bug The "Install Serverless CLI" step is failing, following the instructions from https://circleci.com/developer/orbs/orb/circleci/serverless-framework#orb-source

To Reproduce

Run a serverless deploy in the CircleCI pipeline.

Our deploy config, essentially straight from the CircleCI documentation:

  deploy-prod:
    executor: serverless-framework/default
    steps:
      - attach_workspace:
          at: .
      - aws-cli/setup
      - serverless-framework/setup
      - run:
          command: serverless deploy --stage prod --verbose
          name: deploy

Expected behavior

The serverless deploy executes.

Current behavior

Screenshot 2024-05-21 at 1 43 31 PM

Additional context

This was working yesterday, but started failing today. I've been informed that the Serverless team released their v4 beta today, so there may be something going on there.

Link to Serverless thread: https://forum.serverless.com/t/serverless-deploy-failing-when-run-from-circleci/20184

brunodamacena97 commented 6 months ago

+1, it's happening to me as well.

geminiDelta commented 6 months ago

+1, same here seems to have been broken by this commit https://github.com/serverless/serverless/commit/bb55e0b38c30348c3284bbdba672b97cf18f3d39 which removed the scripts/pkg/install.sh script referenced by this orb here (https://slss.io/install redirects to https://raw.githubusercontent.com/serverless/serverless/main/scripts/pkg/install.sh).

elliott-chenger-ribbiot commented 6 months ago

In our forum post with the Serverless team, they have suggested that they are going to fix the broken link. Will keep this thread posted once we see it working again on our side.

If this doesn't work then I think we potentially try and PR a small fix to hard code the exact location for now and then work with their team to figure out a better long term strategy. Thoughts?

geminiDelta commented 6 months ago

Sounds good. If it does come to temporarily hard coding a location, I would recommend one of these:

elliott-chenger-ribbiot commented 6 months ago

Thanks @geminiDelta for the suggestions.

Yeah likely to make it so that none of us have any other weird issues, I would probably just point it to the 2.0.0 if that was, what was used to approve this orb. I know technically the shortlink allowed them to bypass any "test" process. But it may just be more tolerable for us all until we can figure out the long term flow here.

elliott-chenger-ribbiot commented 6 months ago

@KyleTryon or @EricRibeiro how would you like me to contribute this change? I can fork and have my PR or can y'all add me to this project so I can push up my branch?

geminiDelta commented 6 months ago

Just had a thought regarding the link used for v2.0.0. It looks like a CDN, which could start to fail as well depending on where it's sourcing the file from (e.g. main branch where it's been deleted) and how cache invalidation, etc is configured. You would probably know more than I do about that, but I wonder if the tagged version in GitHub could be considered more reliable/permanent (link to repo for ref).

EricRibeiro commented 6 months ago

Neither Kyle nor I are with CircleCI anymore. I suggest contacting their support team to get some insight into this issue.

omi-jbrivero commented 6 months ago
salemgolemugoo commented 6 months ago

If you guys need a quick fix, i've published a new version to my circleci registry. You can use it like this:

version: 2.1

orbs:
  node: circleci/node@5.1.0
  serverless-framework: salemgolemugoo/serverless-framework@dev:issue-51

jobs:
  deploy:
    docker:
      - image: cimg/base:2023.06
    steps:
      - checkout
      - node/install:
          node-version: '14.21.3'
      - serverless-framework/setup

[!CAUTION] You need to disable "Orb Security Settings" in "Organization Settings -> Security"

elliott-chenger-ribbiot commented 6 months ago

It looks like CircleCI has patched and released a fix for us. 🎉 https://github.com/CircleCI-Public/serverless-framework-orb/pull/54

We can probably close this out. However we still need to make sure that there is a better long term solution for this. Will see if I can follow up with both groups to understand what that looks like.

jgrugru commented 6 months ago

+1 Also happening to us

atharrison commented 6 months ago

Confirmed that this is working again for us. For those scrolling quickly to the bottom:

Update your orb:

orbs:
  serverless-framework: circleci/serverless-framework@2.0.2
zaki-arain commented 5 months ago

Thanks for your patience while we looked into this. We'll close this issue as resolved by #54 😄