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: Add the cloudevents client to the testing suite. #384

Merged
merged 1 commit into from
May 11, 2023

Conversation

lholmquist
Copy link
Member

The cloudevents sdk is a major part of the faas-js-runtime and is responsible for converting the requests events into CloudEvents.

@lholmquist
Copy link
Member Author

[test]

@hhorak
Copy link
Member

hhorak commented Apr 17, 2023

[test]

@hhorak
Copy link
Member

hhorak commented Apr 18, 2023

The tests fail because of two upstream packages -- pino that has made problems lont-term and also the newly added cloudevents:

STEP 10/11: RUN /usr/libexec/s2i/assemble
---> Installing application source ...
---> Building your Node application from source
npm WARN deprecated libnpmconfig@1.2.1: This module is not used anymore. npm config is parsed by npm itself and by @npmcli/config

added 772 packages, and audited 773 packages in 19s

217 packages are looking for funding
  run `npm fund` for details

3 vulnerabilities (2 moderate, 1 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
npm notice 
npm notice New major version of npm available! 8.19.2 -> 9.6.4
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.6.4>
npm notice Run `npm install -g npm@9.6.4` to update!
npm notice 
--> 5a1b3eed42c
STEP 11/11: CMD /usr/libexec/s2i/run
COMMIT ubi9/nodejs-18:1-cloudevents
--> 177a512d6b6
Successfully tagged localhost/ubi9/nodejs-18:1-cloudevents
177a512d6b603b917b700d1f46f15129a5d15a0f7bed10ea5cf2781b46de8a2e

> cloudevents@6.0.4 pretest
> npm run lint && npm run conformance


> cloudevents@6.0.4 lint
> npm run lint:md && npm run lint:js


> cloudevents@6.0.4 lint:md
> remark .

�[4m�[32mAPI_TRANSITION_GUIDE.md�[39m�[24m: no issues found
�[4m�[32mCHANGELOG.md�[39m�[24m: no issues found
�[4m�[32mCONTRIBUTING.md�[39m�[24m: no issues found
�[4m�[32mREADME.md�[39m�[24m: no issues found
�[4m�[32mRELEASE_GUIDELINES.md�[39m�[24m: no issues found
�[4m�[32mexamples/express-ex/README.md�[39m�[24m: no issues found
�[4m�[32mexamples/mqtt-ex/README.md�[39m�[24m: no issues found
�[4m�[32mexamples/typescript-ex/README.md�[39m�[24m: no issues found
�[4m�[32mexamples/websocket/README.md�[39m�[24m: no issues found
�[4m�[32mmaintainer_guidelines.md�[39m�[24m: no issues found
�[4m�[32mpr_guidelines.md�[39m�[24m: no issues found

> cloudevents@6.0.4 lint:js
> eslint 'src/**/*.{js,ts}' 'test/**/*.{js,ts}' cucumber.js


> cloudevents@6.0.4 conformance
> cucumber-js ./conformance/features/*-protocol-binding.feature -p default

TSError: ⨯ Unable to compile TypeScript:
src/event/spec.ts(10,22): error TS2307: Cannot find module '../schema/v1' or its corresponding type declarations.

    at createTSError (/opt/app-root/src/node_modules/ts-node/src/index.ts:859:12)
    at reportTSError (/opt/app-root/src/node_modules/ts-node/src/index.ts:863:19)
    at getOutput (/opt/app-root/src/node_modules/ts-node/src/index.ts:1077:36)
    at Object.compile (/opt/app-root/src/node_modules/ts-node/src/index.ts:1433:41)
    at Module.m._compile (/opt/app-root/src/node_modules/ts-node/src/index.ts:1617:30)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Object.require.extensions.<computed> [as .ts] (/opt/app-root/src/node_modules/ts-node/src/index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
S2I image 'ubi9/nodejs-18:1' test FAILED (exit code: 1)
Test for image 'ubi9/nodejs-18:1' FAILED (exit code: 1)

@lholmquist
Copy link
Member Author

lholmquist commented Apr 18, 2023

Yea, the cloudevents module fails because it needs to run the "build" step before it runs the tests since it is written in typescript. related to this question #386 . My plan was to add an extra step in the cloudevents package to fix this

@lholmquist
Copy link
Member Author

a new version has been released https://github.com/cloudevents/sdk-javascript/releases/tag/v7.0.0

going to rerun the tests

The cloudevents sdk is a major part of the faas-js-runtime and is responsible for converting the requests events into CloudEvents.
@lholmquist lholmquist force-pushed the add-cloudevents-to-testing branch from c15adea to 13f598c Compare May 3, 2023 16:22
@lholmquist
Copy link
Member Author

[test]

@lholmquist
Copy link
Member Author

@hhorak looks like these tests are now fixed

@lholmquist
Copy link
Member Author

@zmiklank tests are passing now that the pino tests have been removed. is there anything else we need to do to get this merged?

@zmiklank
Copy link
Contributor

@zmiklank tests are passing now that the pino tests have been removed. is there anything else we need to do to get this merged?

This lgtm, thank you for the PR.

@zmiklank zmiklank merged commit 0bcedc2 into sclorg:master May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants