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: clone smdk test to fluvio sm test #3559

Merged
merged 3 commits into from
Nov 17, 2023

Conversation

matheus-consoli
Copy link
Contributor

Closes #3553

Moves most of the TestCdm from the smdk to fluvio-cli-common and reutilizes it from fluvio-cli and smartmodule-development-kit.

The API for smdk is unchanged.

The API for fluvio sm test is mostly the same, except for removing:

      --release <RELEASE>                  Release profile name [default: release-lto]
  -p, --package-name <PACKAGE_NAME>        Optional package/project name
      --wasm-file <WASM_FILE>              Optional wasm file path

Testing

Download a SM from the hub:

fluvio hub download infinyon/regex-filter@0.1.0

and run a test for it:

fluvio sm test -t '{"uses":"infinyon/regex-filter@0.1.0", "with": {"regex": "^fl"}}' --text 'fluvio' 

fluvio-cli-sm

@sehz
Copy link
Contributor

sehz commented Sep 26, 2023

failure in the CI

@sehz
Copy link
Contributor

sehz commented Sep 26, 2023

also smdk test and fluvio test is two different. smdk is for supporting developer while fluvio is for regular user. fluvio test should test only downloaded SmartModule on cluster

@matheus-consoli
Copy link
Contributor Author

CI is failing again, but it's not related to the changes:

Run make cli-partition-test-multiple-partitions
...
Producer error: Producer received an error code: the given SPU is not the leader for the partition

sehz
sehz previously requested changes Sep 27, 2023
Copy link
Contributor

@sehz sehz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add CLI test

@matheus-consoli matheus-consoli force-pushed the smdk-sm-test-cli branch 2 times, most recently from 16cfcd7 to 2854036 Compare September 28, 2023 21:18
Copy link
Contributor

@tjtelan tjtelan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@digikata
Copy link
Contributor

@matheus-consoli can you open a separate issue for the ci service account for the failing test on this pr and the other one and assign it to me? Since this passes on local tests, lets merge that and I'll take a look at the auth separately.

@sehz
Copy link
Contributor

sehz commented Oct 30, 2023

Can we just create mock hub server them instead of trying to hub actually?

@digikata
Copy link
Contributor

Can we just create mock hub server them instead of trying to hub actually?

Yes, but I'd like to keep a live hub check test around for in pre release checks, a mock hub server is probably best for regular CI automation - but lets think about how to structure that on the follow on CI #3634 issue. And get this pr merged.

@matheus-consoli
Copy link
Contributor Author

bors r+

bors bot pushed a commit that referenced this pull request Nov 1, 2023
Closes #3553

Moves most of the `TestCdm` from the smdk to `fluvio-cli-common` and reutilizes it from `fluvio-cli` and `smartmodule-development-kit`.

The API for `smdk` is unchanged.

The API for `fluvio sm test` is mostly the same, except for removing:

```sh
      --release <RELEASE>                  Release profile name [default: release-lto]
  -p, --package-name <PACKAGE_NAME>        Optional package/project name
      --wasm-file <WASM_FILE>              Optional wasm file path
```

## Testing

Download a SM from the hub:

```sh
fluvio hub download infinyon/regex-filter@0.1.0
```

and run a test for it:

```sh
fluvio sm test -t '{"uses":"infinyon/regex-filter@0.1.0", "with": {"regex": "^fl"}}' --text 'fluvio' 
```

![fluvio-cli-sm](https://github.com/infinyon/fluvio/assets/27595790/6ee931cc-e3bc-45b8-a392-7773899a7a4c)
Copy link

bors bot commented Nov 1, 2023

Build failed:

@matheus-consoli
Copy link
Contributor Author

bors retry

For  testing a  smartmodule we  need  cranelift as  a dependency,  but
cranelift does not have support for arm target architectures
@digikata digikata dismissed sehz’s stale review November 17, 2023 16:04

Cli test to be added in #3634

@digikata digikata added this pull request to the merge queue Nov 17, 2023
Merged via the queue into infinyon:master with commit 43f2353 Nov 17, 2023
104 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clone smdk test to fluvio sm test
4 participants