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

Chore: Move the project forward. #216

Open
3 of 6 tasks
ryan-roemer opened this issue Apr 21, 2021 · 1 comment
Open
3 of 6 tasks

Chore: Move the project forward. #216

ryan-roemer opened this issue Apr 21, 2021 · 1 comment
Labels
enhancement New feature or request high priority

Comments

@ryan-roemer
Copy link
Member

ryan-roemer commented Apr 21, 2021

  • Hone down the test/packages scenarios to just simple and complex.
    • WARNING: Disable layers in complex if its still there.
  • Reduce dependencies in those scenarios.
  • Then upgrade dependencies Infra: Upgrade deps #210
  • Then GH actions Infra: Switch to GH actions #215
  • ... then figure out anything else?
@ryan-roemer ryan-roemer added enhancement New feature or request high priority labels Apr 21, 2021
@seanmcfo
Copy link

seanmcfo commented Apr 28, 2021

All but simple and complex scenarios removed. layers removed from complex. Changed files -> https://github.com/FormidableLabs/serverless-jetpack/compare/chore/move-project-forward-%23216

test/packages/
├── complex
│   ├── npm
│   │   ├── node_modules
│   │   ├── package.json
│   │   ├── package-lock.json
│   │   ├── serverless.js
│   │   ├── serverless.yml
│   │   └── src
│   └── yarn
│       ├── node_modules
│       ├── package.json
│       ├── serverless.js
│       ├── serverless.yml
│       ├── src
│       └── yarn.lock
└── simple
    ├── npm
    │   ├── node_modules
    │   ├── package.json
    │   ├── package-lock.json
    │   ├── serverless.js
    │   ├── serverless.yml
    │   └── src
    └── yarn
        ├── node_modules
        ├── package.json
        ├── serverless.js
        ├── serverless.yml
        ├── src
        └── yarn.lock
$yarn concat-locks
yarn run v1.22.5
$ node scripts/concat-locks.js
Done in 0.21s.
$yarn install --frozen-lockfile
yarn install v1.22.5
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
Done in 0.62s.
$yarn benchmark:install --skip-if-exists
yarn run v1.22.5
$ node test/script.js install --skip-if-exists
simple/yarn: Found existing node_modules. Skipping
simple/npm: Found existing node_modules. Skipping
complex/yarn: Found existing node_modules. Skipping
complex/npm: Found existing node_modules. Skipping
Done in 0.53s.
$yarn run check
yarn run v1.22.5
$ yarn lint && yarn test:spec
$ eslint .
$ mocha test/spec


  index
    trace mode
      packaging
        ✓ traces dependencies (82ms)
        ✓ excludes ignores and package include when tracing
        ✓ allows missing when tracing (40ms)
        ✓ traces with various trace.include options (49ms)
        trace.dynamic.resolutions
          ✓ resolves misses at service-level
          ✓ resolves misses at function-level
          ✓ fails for unresolved misses at function-level
      configurations
        trace
          ✓ traces with service config even if non-individually function is false
          ✓ traces with service and skips individually + trace=false functions
          ✓ pattern matches service and traces individually + trace=true functions
          ✓ traces for service-level individually and trace
        trace.dynamic.bail
          ✓ does not error on dynamic misses by default
          ✓ bails on misses at service-level
          ✓ bails on misses at function-level
    collapsed zip
      ✓ warns on collapsed files
      collapsed.bail
        ✓ does not error on collapsed conflicts by default
        ✓ errors on service-level bail
        ✓ errors on function-level bail
        ✓ errors on layer-level bail

  util/bundle
    #findCollapsed
      ✓ should handle empty cases
      ✓ should handle no duplicates
      ✓ should find collapsed packages
      ✓ should handle missing package.json in collapsed packages
      ✓ should find collapsed sources
    #resolveFilePathsFromPatterns
      ✓ should error on no patterns, no matches
      ✓ should match on no patterns, basic sources
      ✓ should handle broad exclude and include re-adding in
      ✓ doesn't removes appropriate serverless.EXT config file
      - should handle only node_modules
      - should handle sources and node_modules


  28 passing (387ms)
  2 pending

Done in 4.54s.
$yarn test:cli
yarn run v1.22.5
$ mocha test/cli


  jetpack package
    simple
      ✓ displays CLI usage (2852ms)
      ✓ packages the entire service with no options (3240ms)
      ✓ packages the entire service with no options in trace mode (2708ms)
      ✓ packages the entire service with -f base (3006ms)
    complex
      ✓ packages all functions with no options (3402ms)
      ✓ packages all functions with no options in trace mode (3602ms)
      ✓ packages 1 function with -f individually (3663ms)
      ✓ packages service with -f base (4123ms)


  8 passing (27s)

Done in 27.28s.
$yarn benchmark --parallel --concurrency=4
...
...

## Benchmark: System Information
* os:   `linux 5.11.15-200.fc33.x86_64 x64`
* node: `v14.16.1`
* yarn: `1.22.5`
* npm:  `7.11.1`

## Benchmark: Timed Packages
| Scenario | Pkg  | Type     | Mode  |  Time |      vs Base |
| :------- | :--- | :------- | :---- | ----: | -----------: |
| simple   | yarn | jetpack  | trace |  4528 | **-82.35 %** |
| simple   | yarn | jetpack  | deps  |  4333 | **-83.11 %** |
| simple   | yarn | baseline |       | 25658 |              |
| simple   | npm  | jetpack  | trace |  4393 | **-82.82 %** |
| simple   | npm  | jetpack  | deps  |  4189 | **-83.62 %** |
| simple   | npm  | baseline |       | 25568 |              |
| complex  | yarn | jetpack  | trace |  5209 | **-85.33 %** |
| complex  | yarn | jetpack  | deps  |  5085 | **-85.68 %** |
| complex  | yarn | baseline |       | 35498 |              |
| complex  | npm  | jetpack  | trace |  5294 | **-85.09 %** |
| complex  | npm  | jetpack  | deps  |  5026 | **-85.85 %** |
| complex  | npm  | baseline |       | 35512 |              |

## Benchmark: Other Packages
| Scenario | Pkg | Type | Mode | Time | vs Base |
| :------- | :-- | :--- | :--- | ---: | ------: |
Done in 47.06s.
$yarn benchmark:test
yarn run v1.22.5
$ mocha test/benchmark.js


  benchmark
    1) "before all" hook in "benchmark"


  0 passing (2s)
  1 failing

  1) benchmark
       "before all" hook in "benchmark":
     Error: the string "Invalid filename" was thrown, throw an Error :)
      at processTicksAndRejections (internal/process/task_queues.js:93:5)



error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high priority
Projects
None yet
Development

No branches or pull requests

2 participants