adobe / aio-cli-plugin-asset-compute

Asset Compute Plugin for Adobe I/O Command Line Interface
Apache License 2.0
1 stars 7 forks source link

app:deploy --skip-deploy has been removed #95

Closed purplecabbage closed 1 year ago

purplecabbage commented 2 years ago

Description

app:deploy --skip-deploy has been removed `app:build accomplishes the same thing

Types of changes

Checklist:

jdelbick commented 1 year ago

Not sure why node18 is failing...i will look into it later

shazron commented 1 year ago

@jdelbick Added https://github.com/adobe/aio-cli-plugin-asset-compute/pull/95/commits/cc905e8f9949553a032d6d4a9859e150b5f195fa which should make all the unit tests pass (see commit log for why the changes are needed).

related: https://github.com/adobe/generator-app-asset-compute/pull/5

shazron commented 1 year ago

Tests are passing locally (node-16) but not in the CI, it keeps saying: /bin/sh: 1: aio: not found

shazron commented 1 year ago

ah, I uninstalled my aio-cli locally, and can see the CI error now. https://github.com/adobe/aio-cli-plugin-asset-compute/blob/64fe411eb06d0814439cec1373cb9944476009ef/src/base-command.js#L118

jdelbick commented 1 year ago

thanks for making the fixes. I see the tests are still failing, any update on the CI errors @shazron?

codecov[bot] commented 1 year ago

Codecov Report

Merging #95 (e5b86c3) into master (aa518c3) will increase coverage by 0.05%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #95      +/-   ##
==========================================
+ Coverage   90.89%   90.95%   +0.05%     
==========================================
  Files          13       13              
  Lines         857      851       -6     
==========================================
- Hits          779      774       -5     
+ Misses         78       77       -1     
Impacted Files Coverage Δ
src/lib/actionrunner.js 92.68% <ø> (ø)
src/base-command.js 94.36% <100.00%> (+0.85%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

MichaelGoberling commented 1 year ago

@jdelbick Pushed a change to use the Runtime lib to build actions instead of invoking the app plugin directly. Tests seem to be passing :thumbsup:

@purplecabbage The scope of this PR has changed significantly, a title edit may be in order. Also, does this close https://github.com/adobe/aio-cli-plugin-asset-compute/issues/93?

MichaelGoberling commented 1 year ago

Please update the PR description since it is a bigger change. Also, do you think this is a breaking change now (if so update the PR description)?

It doesn't look like I have permission to change the description since the branch is on Jesse's fork. I was just given permission to push code

I don't believe this is a breaking change since it's only an internal change to how actions are built

jdelbick commented 1 year ago

@shazron i used npm link locally to test these changes with an aio project created with aio v9 and i am getting this error:

» aio app test                                                                          1 ↵ jamiedelbick@Jamies-MacBook-Pro-2
static build path /Users/jamiedelbick/adobe/github/forks/aio-cli-plugin-asset-compute/node_modules/@adobe/asset-compute-devtool/client-build
(node:73114) Warning: Mismatched version in @adobe/aio-cli-plugin-asset-compute plugin manifest. Expected: 4.0.2 Received: 4.0.1
This usually means you have an oclif.manifest.json file that should be deleted in development. This file should be automatically generated when publishing.
(Use `node --trace-warnings ...` to show where the warning was created)
Using local project's @adobe/aio-cli-plugin-asset-compute version 4.0.2

dx/asset-compute/worker/1/* (hook) - running tests...
(node:73114) Warning: Mismatched version in @adobe/aio-cli-plugin-asset-compute plugin manifest. Expected: 4.0.2 Received: 4.0.1
This usually means you have an oclif.manifest.json file that should be deleted in development. This file should be automatically generated when publishing.
static build path /Users/jamiedelbick/adobe/github/forks/aio-cli-plugin-asset-compute/node_modules/@adobe/asset-compute-devtool/client-build
(node:73119) Warning: Mismatched version in @adobe/aio-cli-plugin-asset-compute plugin manifest. Expected: 4.0.2 Received: 4.0.1
This usually means you have an oclif.manifest.json file that should be deleted in development. This file should be automatically generated when publishing.
(Use `node --trace-warnings ...` to show where the warning was created)
 ›   Error: command test-worker not found

app:test results:
    × dx/asset-compute/worker/1/* (hook)

Note: i bumped the version of aio-cli-plugin-asset-compute to v4.0.2 in the package.json to make sure it was using the version i had locally

» aio info                                                                              3 ↵ jamiedelbick@Jamies-MacBook-Pro-2
static build path /Users/jamiedelbick/adobe/github/forks/aio-cli-plugin-asset-compute/node_modules/@adobe/asset-compute-devtool/client-build
(node:73780) Warning: Mismatched version in @adobe/aio-cli-plugin-asset-compute plugin manifest. Expected: 4.0.2 Received: 4.0.1
This usually means you have an oclif.manifest.json file that should be deleted in development. This file should be automatically generated when publishing.
(Use `node --trace-warnings ...` to show where the warning was created)
Using local project's @adobe/aio-cli-plugin-asset-compute version 4.0.2

(node:73780) Warning: Mismatched version in @adobe/aio-cli-plugin-asset-compute plugin manifest. Expected: 4.0.2 Received: 4.0.1
This usually means you have an oclif.manifest.json file that should be deleted in development. This file should be automatically generated when publishing.

  System:
    OS: macOS 12.5.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 268.14 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.17.1 - ~/.nvm/versions/node/v16.17.1/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.18.0 - /opt/homebrew/bin/npm
  Virtualization:
    Docker: 20.10.17 - /usr/local/bin/docker
  npmGlobalPackages:
    @adobe/aio-cli: 9.1.0

  Proxies:
    http: (not set)
    https: (not set)
  CLI plugins:
    core:
      @adobe/aio-cli 9.1.0
      @adobe/aio-cli-plugin-app 10.0.2
      @adobe/aio-cli-plugin-app-templates 1.4.0
      @adobe/aio-cli-plugin-auth 3.0.1
      @adobe/aio-cli-plugin-certificate 1.0.1
      @adobe/aio-cli-plugin-config 4.0.1
      @adobe/aio-cli-plugin-console 4.0.1
      @adobe/aio-cli-plugin-events 2.0.2
      @adobe/aio-cli-plugin-info 3.0.1
      @adobe/aio-cli-plugin-runtime 6.0.1
      @adobe/aio-cli-plugin-telemetry 1.1.0
      @oclif/plugin-autocomplete 1.3.6
      @oclif/plugin-help 5.1.18
      @oclif/plugin-not-found 2.3.8
      @oclif/plugin-plugins 2.1.7
      @oclif/plugin-warn-if-update-available 2.0.13
    user:
      @adobe/aio-cli-plugin-asset-compute 4.0.2
    link:
MichaelGoberling commented 1 year ago

@jdelbick Performing an npm run prepare in the plugin folder may get rid of the initial issue. I believe oclif is complaining about a difference in version between the plugin's oclif manifest and its package.json.

The latter test error is because test-worker on its own won't work anymore. As mentioned in the log of @shazron's commit that fixed tests earlier:

- with oclif v2, you need to pass in the fully scoped command.

I believe @shazron's PR here has the fix. Doing some testing locally to verify

Edit: @shazron's PR linked above is necessary, but may not fix the issue entirely.

@jdelbick are you familiar with the adobe-asset-compute executable? The tests the generator creates uses it and after initializing an app with the asset compute template, aio app test fails saying adobe-asset-compute can't be found. It seems maybe the tests should use aio instead.

jdelbick commented 1 year ago

@MichaelGoberling thanks for the response.

i tried updating the ext.config.yaml to match the hooks update in this PR

then running aio app test fails with this:

Actions:
- worker

Running tests in /Users/jamiedelbick/adobe/github/forks/test-worker/src/dx-asset-compute-worker-1/test/asset-compute/worker

Error: Unsupported kind: nodejs:16

app:test results:
    × dx/asset-compute/worker/1/* (hook)

it works if i change the runtime to nodejs:14 but 16 was the default created by aio app init. Here is the working ext.config.yaml

operations:
  workerProcess:
    - type: action
      impl: dx-asset-compute-worker-1/worker
hooks:
  post-app-run: adobe-asset-compute asset-compute:devtool
  test: adobe-asset-compute asset-compute:test-worker
actions: actions
runtimeManifest:
  packages:
    dx-asset-compute-worker-1:
      license: Apache-2.0
      actions:
        worker:
          function: actions/worker/index.js
          web: 'yes'
          runtime: nodejs:14
          limits:
            concurrency: 10
          annotations:
            require-adobe-auth: true
MichaelGoberling commented 1 year ago

@jdelbick Added the nodejs:16 runtime image to the local action runner :thumbsup:

Note: Runtime is deprecating nodejs:10 on Jan. 4th, 2023, so it should be removed from the list of available kinds on or before that date. Issue created here as a reminder

jdelbick commented 1 year ago

Awesome, so I think with this PR & https://github.com/adobe/generator-app-asset-compute/pull/5/files, we should be good to go. Thanks @MichaelGoberling @shazron

Just confirmed with the changes nodejs:16 is working.

jdelbick commented 1 year ago

i also validated these changes work with aio v8.3.0 (with the generator changes) Screen Shot 2022-11-08 at 1 50 41 PM

adobe-bot commented 1 year ago

:tada: This PR is included in version 4.0.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: