question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Regression of #110, package.patterns are ignored

See original GitHub issue

It seems #110 is back.

serverless.yml:

functions:
  myFn:
    package:
      patterns:
        - resources/some.txt

Running serverless package with serverless-esbuild v1.10.6 works as expected.

$ cd .serverless
$ unzip myFn.zip
Archive:  myFnl.zip
  inflating: resources/some.txt
  inflating: myFn.js

But with v1.10.7 and onwards it’s no longer working, the extra file is missing in the zip.

$ cd .serverless
$ unzip myFn.zip
Archive:  myFn.zip
  inflating: myFn.js

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
olupcommented, Jul 1, 2021

So, there are two ways, how bestzip can zip, nativeZip and nodeZip. If we can confirm the path structure issue limitation is because of nativeZip, we can provide an option in YAML to choose an approach like below, internally the chosen approach will be used for zipping.

custom:
  esbuild:
    zip: node # defaults to native

It’s just that I don’t want to lose the capability of nativeZip because the zipping is very fast with it as you can see here. FYI, in that benchmarking GitLab CI was using nodeZip since there was no native zip installed, when we installed zip in the container the zip time was reduced even more to < 200 seconds.

Making this optional is not very useful, and complicated for the end-user. I feel we have to choose one path and do it well. If we decide to support the native option, then duplication is needed. But the performance overhead might not be too bad, I’ll make a PR and we can benchmark.

0reactions
github-actions[bot]commented, Sep 4, 2021

🎉 This issue has been resolved in version 1.17.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Regression of #110, package.patterns are ignored #150 - Issuehunt
It seems #110 is back. serverless.yml: functions: myFn: package: patterns: - resources/some.txt. Running serverless package with serverless-esbuild v1.10.6 ...
Read more >
When Can You Safely Ignore Multicollinearity?
I am working with panel data containing 110 observations ( 22 cross sections for 5 years ) and I need to apply quantile...
Read more >
Missing data - Finalfit
The pattern of missingness is related to other variables in the dataset, but in addition, the values of the missing data are not...
Read more >
Density-based weighting for imbalanced regression
No weight should be 0 to avoid models ignoring parts of the dataset. P.5: The mean weight over all data points is 1....
Read more >
Regression modeling - Modern Data Science with R
Regression analysis is a powerful and flexible framework that allows an analyst to model an outcome (the response variable) as a function of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found