Skip to content

Slow post-action after v4 #878

Closed
@TrygveUrdahl

Description

@TrygveUrdahl

Description:
The post-action step for this action seems to have become much slower after version 4.0.0 was released.
In the two included images, the only major difference should be the version of actions/setup-node.

Before:
image

After:
image

Action version:
Using actions/setup-node@v4 15 hours after 4.0.0 was released.

Platform:

  • Ubuntu
    macOS
    Windows

Runner type:

  • Hosted
    Self-hosted

Tools version:
Node 18.18.2, and Yarn@4.0.0.

Activity

TrygveUrdahl

TrygveUrdahl commented on Oct 24, 2023

@TrygveUrdahl
Author

I noticed that my workflow files didn't specify what node version to use for this workflow through any node-version or node-version-file. By adding that, and upgrading my project to use node 20, this issue seems to go away.

nikolai-laevskii

nikolai-laevskii commented on Oct 24, 2023

@nikolai-laevskii
Contributor

Thank you for detailed description of the issue! We'll investigate it and come back with details.

panva

panva commented on Oct 25, 2023

@panva
Contributor

I noticed that my workflow files didn't specify what node version to use for this workflow through any node-version or node-version-file. By adding that, and upgrading my project to use node 20, this issue seems to go away.

My workflows do always specify node-version but the post-action is slow as well.

I also have a flow log here which despite requesting lts/iron resolved 20.8.1 which isn't lts/iron. This particular setup-node use is from a reused worflow, when setup-node is used outside of a reused workflow the correct 20.9.0 is resolved.

bodinsamuel

bodinsamuel commented on Oct 27, 2023

@bodinsamuel
ledermann

ledermann commented on Oct 31, 2023

@ledermann

Same here in multiple projects using JS with Yarn. The Post Setup Node.js job slows down from a few seconds to about 2:20 minutes after upgrading to v4.

It seems to me that this only happens when JS dependencies have been updated. Re-running the job (which causes a cache hit) is fast again - perhaps because the cache doesn't need to be saved.

My conclusion: Saving the cache is significantly slower with v4 than with v3.

ari-becker

ari-becker commented on Nov 4, 2023

@ari-becker

Noticing this as well because I have an aggressive timeout-minutes: 1 on my actions/setup-node step, which is now causing many of my builds to fail.

I concur with @ledermann that the issue is somewhere in cache-saving.

With a cache hit, the post-action takes 0s as expected:

image

Without a cache hit, when trying to save the cache, the post-action times out:

image

eregon

eregon commented on Nov 7, 2023

@eregon

See ruby/setup-ruby#543 which explains a possible cause and fix.

46 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @ledermann@nrutman@eregon@panva@colinrotherham

    Issue actions

      Slow post-action after v4 · Issue #878 · actions/setup-node