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

test: [TESTENG-121] oval bindings for e2e #10180

Closed
wants to merge 4 commits into from

Conversation

JComins000
Copy link
Contributor

@JComins000 JComins000 commented Oct 31, 2024

Ticket

TESTENG-121

Description

infra for orval e2e

  • makefile changes to generate orval bindings at the same time as all the other bindings
  • package.json changes to account for multiple versions of ajv needed in determined

Test Plan

npm list ajv
[email protected] /Users/jcomins/code/determined/webui/react
├─┬ [email protected] -> ./packages/eslint
│ └─┬ [email protected]
│   ├─┬ @eslint/[email protected]
│   │ └── [email protected]
│   └── [email protected]
├─┬ [email protected]
│ ├─┬ @apidevtools/[email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected] deduped
│ │ └── [email protected] deduped
│ ├─┬ @orval/[email protected]
│ │ ├─┬ @ibm-cloud/[email protected]
│ │ │ ├─┬ @stoplight/[email protected]
│ │ │ │ └─┬ @stoplight/[email protected]
│ │ │ │   └── [email protected] deduped
│ │ │ ├─┬ @stoplight/[email protected]
│ │ │ │ ├─┬ @stoplight/[email protected]
│ │ │ │ │ └── [email protected] deduped
│ │ │ │ ├─┬ [email protected]
│ │ │ │ │ └── [email protected] deduped
│ │ │ │ ├─┬ [email protected]
│ │ │ │ │ └── [email protected] deduped
│ │ │ │ └── [email protected] deduped
│ │ │ └─┬ @stoplight/[email protected]
│ │ │   └── [email protected] deduped
│ │ └── [email protected] deduped
│ └── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│   └── [email protected]
└─┬ [email protected]
  └─┬ [email protected]
    └── [email protected] deduped
make -C bindings
cd ../webui/react && npm run bindings

> [email protected] bindings
> npm run bindings:clean && npm run bindings:build


> [email protected] bindings:clean
> rimraf ./generated/orval


> [email protected] bindings:build
> orval --config orval.config.ts

🍻 Start orval v7.2.0 - A swagger client generator for typescript
(node:70848) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
⚠️  SyntaxError: Swagger schema validation failed.
  #/paths/~1checkpoints~1{checkpoint_uuid}/get/responses/200/schema/type must be equal to one of the allowed values
  #/paths/~1checkpoints~1{checkpoint_uuid}/get/responses/200/schema/type must be array
  #/paths/~1checkpoints~1{checkpoint_uuid}/get/responses/200/schema/type must match a schema in anyOf
  #/paths/~1checkpoints~1{checkpoint_uuid}/get/responses/200/schema/type must be equal to one of the allowed values
  #/paths/~1checkpoints~1{checkpoint_uuid}/get/responses/200/schema must match exactly one schema in oneOf
  #/paths/~1checkpoints~1{checkpoint_uuid}/get/responses/200 must have required property '$ref'
  #/paths/~1checkpoints~1{checkpoint_uuid}/get/responses/200 must NOT have additional properties
  #/paths/~1checkpoints~1{checkpoint_uuid}/get/responses/200 must NOT have additional properties
  #/paths/~1checkpoints~1{checkpoint_uuid}/get/responses/200 must match exactly one schema in oneOf
  #/paths/~1experiments~1{experiment_id}~1file~1download/get/responses/200/schema/type must be equal to one of the allowed values
  #/paths/~1experiments~1{experiment_id}~1file~1download/get/responses/200/schema/type must be array
  #/paths/~1experiments~1{experiment_id}~1file~1download/get/responses/200/schema/type must match a schema in anyOf
  #/paths/~1experiments~1{experiment_id}~1file~1download/get/responses/200/schema/type must be equal to one of the allowed values
  #/paths/~1experiments~1{experiment_id}~1file~1download/get/responses/200/schema must match exactly one schema in oneOf
  #/paths/~1experiments~1{experiment_id}~1file~1download/get/responses/200 must have required property '$ref'
  #/paths/~1experiments~1{experiment_id}~1file~1download/get/responses/200 must NOT have additional properties
  #/paths/~1experiments~1{experiment_id}~1file~1download/get/responses/200 must NOT have additional properties
  #/paths/~1experiments~1{experiment_id}~1file~1download/get/responses/200 must match exactly one schema in oneOf
  #/paths/~1resources~1allocation~1aggregated/get/responses/200/schema/type must be equal to one of the allowed values
  #/paths/~1resources~1allocation~1aggregated/get/responses/200/schema/type must be array
  #/paths/~1resources~1allocation~1aggregated/get/responses/200/schema/type must match a schema in anyOf
  #/paths/~1resources~1allocation~1aggregated/get/responses/200/schema/type must be equal to one of the allowed values
  #/paths/~1resources~1allocation~1aggregated/get/responses/200/schema must match exactly one schema in oneOf
  #/paths/~1resources~1allocation~1aggregated/get/responses/200 must have required property '$ref'
  #/paths/~1resources~1allocation~1aggregated/get/responses/200 must NOT have additional properties
  #/paths/~1resources~1allocation~1aggregated/get/responses/200 must NOT have additional properties
  #/paths/~1resources~1allocation~1aggregated/get/responses/200 must match exactly one schema in oneOf
  #/paths/~1resources~1allocation~1allocations-csv/get/responses/200/schema/type must be equal to one of the allowed values
  #/paths/~1resources~1allocation~1allocations-csv/get/responses/200/schema/type must be array
  #/paths/~1resources~1allocation~1allocations-csv/get/responses/200/schema/type must match a schema in anyOf
  #/paths/~1resources~1allocation~1allocations-csv/get/responses/200/schema/type must be equal to one of the allowed values
  #/paths/~1resources~1allocation~1allocations-csv/get/responses/200/schema must match exactly one schema in oneOf
  #/paths/~1resources~1allocation~1allocations-csv/get/responses/200 must have required property '$ref'
  #/paths/~1resources~1allocation~1allocations-csv/get/responses/200 must NOT have additional properties
  #/paths/~1resources~1allocation~1allocations-csv/get/responses/200 must NOT have additional properties
  #/paths/~1resources~1allocation~1allocations-csv/get/responses/200 must match exactly one schema in oneOf
  #/paths/~1resources~1allocation~1raw/get/responses/200/schema/type must be equal to one of the allowed values
  #/paths/~1resources~1allocation~1raw/get/responses/200/schema/type must be array
  #/paths/~1resources~1allocation~1raw/get/responses/200/schema/type must match a schema in anyOf
  #/paths/~1resources~1allocation~1raw/get/responses/200/schema/type must be equal to one of the allowed values
  #/paths/~1resources~1allocation~1raw/get/responses/200/schema must match exactly one schema in oneOf
  #/paths/~1resources~1allocation~1raw/get/responses/200 must have required property '$ref'
  #/paths/~1resources~1allocation~1raw/get/responses/200 must NOT have additional properties
  #/paths/~1resources~1allocation~1raw/get/responses/200 must NOT have additional properties
  #/paths/~1resources~1allocation~1raw/get/responses/200 must match exactly one schema in oneOf

🎉 e2e - Your OpenAPI spec has been converted into ready to use orval!

Checklist

  • Changes have been manually QA'd
  • New features have been approved by the corresponding PM
  • User-facing API changes have the "User-facing API Change" label
  • Release notes have been added as a separate file under docs/release-notes/
    See Release Note for details.
  • Licenses have been included for new code which was copied and/or modified from any external code

@cla-bot cla-bot bot added the cla-signed label Oct 31, 2024
Copy link

netlify bot commented Oct 31, 2024

Deploy Preview for determined-ui failed.

Name Link
🔨 Latest commit d94ff7e
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/67250e8ec93a9a0008e60dc1

@JComins000 JComins000 force-pushed the jcom/TESTENG-121/orval-in-test branch from 51413a5 to 31adfa9 Compare October 31, 2024 20:42
@ashtonG
Copy link
Contributor

ashtonG commented Nov 1, 2024

you should be able to do this without needing a separate workspace for eslint by installing ajv version 8 directly, which should force that version to hoist over eslint's version 6.

that said, what's the upside of using orval over the app bindings, especially given the added dependencies and complexity in managing them?

@JComins000
Copy link
Contributor Author

@ashtonG i'll try #10189

@JComins000 JComins000 closed this Nov 1, 2024
@JComins000 JComins000 deleted the jcom/TESTENG-121/orval-in-test branch November 1, 2024 21:33
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.

2 participants