Skip to content

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 6, 2022

Bumps ajv from 6.12.6 to 8.11.0.

Release notes

Sourced from ajv's releases.

v8.11.0

Use root schemaEnv when resolving references in oneOf (#1901, @​asprouse)

Only use equal function in generated code when it is used (#1922, @​bhvngt)

v8.10.0

uriResolver option (@​zekth, #1862)

v8.9.0

Option code.esm to generate ESM exports for standalone validation functions (@​rehanvdm, #1861) Support discriminator keyword with $ref in oneOf subschemas (@​dfeufel, #1815)

v8.8.2

Use full RegExp string (with flags) as cache key, related to ajv-validator/ajv-keywords#220

v8.8.1

Fix minContains: 0 (#1819)

v8.8.0

Fix browser bundles in cdnjs regExp option allowing to specify alternative RegExp engine, e.g. re2 (@​efebarlas)

v8.7.1

Publish Ajv bundle for JSON Schema 2020-12 to cdnjs.com

v8.7.0

Update JSON Schema Test Suite. Change minContains: 0 now correctly allows empty array.

v8.6.3

Fix $ref resolution for schemas without $id (@​rbuckton, #1725) Support standalone module import from ESM modules without using .default property (@​bhvngt, #1757) Update code for breaking TS change - error in catch has type unknown (#1760)

v8.6.2

Fix JTD serialiser (#1691)

v8.6.1

Fix "not" keyword preventing validation of "allOf" and some other keywords (#1668)

v8.6.0

Track evaluated properties with patternProperties that have always valid schemas (e.g., true) (@​P0lip, #1626) Option int32range to disable number range checking for int32 and uint32 type in JTD schemas

v8.5.0

Optimize validation code for const keyword with scalar values (@​SoAsEr, #1561) Add option schemaId to support ajv-draft-04 - Ajv for JSON Schema drat-04.

v8.4.0

JSON Type Definition schema options:

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Jun 6, 2022
@dependabot dependabot bot requested a review from a team June 6, 2022 00:01
@github-actions github-actions bot added the agent-nodejs Make available for APM Agents project planning. label Jun 6, 2022
@ghost
Copy link

ghost commented Jun 6, 2022

💔 Build Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-06-06T15:27:12.051+0000

  • Duration: 25 min 17 sec

Steps errors 67

Expand to view the steps failures

Show only the first 10 steps failures

Run Tests
  • Took 9 min 37 sec . View more details here
  • Description: .ci/scripts/test.sh -b "release" -t "" "8"
Run Tests
  • Took 7 min 34 sec . View more details here
  • Description: .ci/scripts/test.sh -b "release" -t "" "8"
Archive the artifacts
  • Took 0 min 1 sec . View more details here
  • Description: [2022-06-06T15:51:37.306Z] Archiving artifacts hudson.AbortException: script returned exit code 1
Run Tests
  • Took 9 min 54 sec . View more details here
  • Description: .ci/scripts/test.sh -b "release" -t "" "8.6"
Run Tests
  • Took 7 min 57 sec . View more details here
  • Description: .ci/scripts/test.sh -b "release" -t "" "8.6"
Archive the artifacts
  • Took 0 min 0 sec . View more details here
  • Description: [2022-06-06T15:52:25.196Z] Archiving artifacts hudson.AbortException: script returned exit code 1
Run Tests
  • Took 8 min 22 sec . View more details here
  • Description: .ci/scripts/test.sh -b "release" -t "" "8.6"
Run Tests
  • Took 6 min 29 sec . View more details here
  • Description: .ci/scripts/test.sh -b "release" -t "" "8.6"
Archive the artifacts
  • Took 0 min 1 sec . View more details here
  • Description: [2022-06-06T15:51:41.294Z] Archiving artifacts hudson.AbortException: script returned exit code 1
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: githubApiCall: The REST API call https://api.github.com/orgs/elastic/members/dependabot[bot] return the message : java.lang.Exception: httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/dependabot[bot] : httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/dependabot[bot] : Code: 404Error: {"message":"User does not exist or is not a member of the organization","documentation_url":"https://docs.github.com/rest/reference/orgs#check-organization-membership-for-a-user"}

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • run module tests for <modules> : Run TAV tests for one or more modules, where <modules> can be either a comma separated list of modules (e.g. memcached,redis) or the string literal ALL to test all modules

  • run benchmark tests : Run the benchmark test only.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.12.6 to 8.11.0.
- [Release notes](https://github.com/ajv-validator/ajv/releases)
- [Commits](ajv-validator/ajv@v6.12.6...v8.11.0)

---
updated-dependencies:
- dependency-name: ajv
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/ajv-8.11.0 branch from d3b8986 to 5410f2a Compare June 6, 2022 15:26
@trentm
Copy link
Member

trentm commented Jun 6, 2022

For now, I believe we should not switch to ajv@8 because it technically drops support for node v8, which we still test with. While we only use ajv for transaction/span/error/metadata schema validation in a small part of the test suite, we should use it for more.

BTW the "ajv@8` because it technically drops support for node v8" is inferred from the https://github.com/ajv-validator/ajv/blob/master/README.md#features

  • supports browsers and Node.js 10.x - current

which changed from:

  • supports browsers and Node.js 0.10-14.x

for ajv@8 (commit e88b8f0fea6ab9f1aee966f1db2074755eb1196a).

The GitHub Actions workflow also only tests with node 12, 14, and 16 as of the more recent commit commit 43d6164d46c1afbb1f40829f5208a66507af810c.

That said, the tests using ajv do currently pass with [email protected] and [email protected].

patch

If/when we update to ajv@8 there are some changes necessary. The migration guide (https://github.com/ajv-validator/ajv/blob/master/docs/v6-to-v8-migration.md) alludes to the changes.

Here is a patch to get the test passing with ajv@8:

diff --git a/test/integration/api-schema/_utils.js b/test/integration/api-schema/_utils.js
index aa8a1c57..cd99db2d 100644
--- a/test/integration/api-schema/_utils.js
+++ b/test/integration/api-schema/_utils.js
@@ -6,7 +6,7 @@ const { join } = require('path')
 const Ajv = require('ajv')
 const thunky = require('thunky')
 
-const ajv = new Ajv({ allErrors: true })
+const ajv = new Ajv({ allErrors: true, allowUnionTypes: true, strict: true })
 const schemaDir = join(__dirname, 'apm-server-schema')
 
 exports.metadataValidator = thunky(function (cb) {
diff --git a/test/integration/api-schema/basic.test.js b/test/integration/api-schema/basic.test.js
index d415ea83..da1601c1 100644
--- a/test/integration/api-schema/basic.test.js
+++ b/test/integration/api-schema/basic.test.js
@@ -24,7 +24,7 @@ const next = afterAll(function (err, validators) {
   test('metadata schema failure', function (t) {
     t.strictEqual(validateMetadata({}), false)
     validateFieldMessages(t, validateMetadata.errors, [
-      { message: 'should have required property \'service\'' }
+      { message: 'must have required property \'service\'' }
     ])
     t.end()
   })
@@ -32,11 +32,11 @@ const next = afterAll(function (err, validators) {
   test('transaction schema failure', function (t) {
     t.strictEqual(validateTransaction({}), false)
     validateFieldMessages(t, validateTransaction.errors, [
-      { message: 'should have required property \'duration\'' },
-      { message: 'should have required property \'id\'' },
-      { message: 'should have required property \'span_count\'' },
-      { message: 'should have required property \'trace_id\'' },
-      { message: 'should have required property \'type\'' }
+      { message: 'must have required property \'duration\'' },
+      { message: 'must have required property \'id\'' },
+      { message: 'must have required property \'span_count\'' },
+      { message: 'must have required property \'trace_id\'' },
+      { message: 'must have required property \'type\'' }
     ])
     t.end()
   })
@@ -44,15 +44,15 @@ const next = afterAll(function (err, validators) {
   test('span schema failure', function (t) {
     t.strictEqual(validateSpan({}), false)
     validateFieldMessages(t, validateSpan.errors, [
-      { message: 'should have required property \'duration\'' },
-      { message: 'should have required property \'id\'' },
-      { message: 'should have required property \'name\'' },
-      { message: 'should have required property \'parent_id\'' },
-      { message: 'should have required property \'trace_id\'' },
-      { message: 'should have required property \'type\'' },
-      { message: 'should have required property \'start\'' },
-      { message: 'should have required property \'timestamp\'' },
-      { message: 'should match some schema in anyOf' }
+      { message: 'must have required property \'duration\'' },
+      { message: 'must have required property \'id\'' },
+      { message: 'must have required property \'name\'' },
+      { message: 'must have required property \'parent_id\'' },
+      { message: 'must have required property \'trace_id\'' },
+      { message: 'must have required property \'type\'' },
+      { message: 'must have required property \'start\'' },
+      { message: 'must have required property \'timestamp\'' },
+      { message: 'must match a schema in anyOf' }
     ])
     t.end()
   })
@@ -60,37 +60,37 @@ const next = afterAll(function (err, validators) {
   test('error schema failure', function (t) {
     t.strictEqual(validateError({}), false)
     validateFieldMessages(t, validateError.errors, [
-      { message: 'should have required property \'id\'' },
-      { message: 'should have required property \'exception\'' },
-      { message: 'should have required property \'log\'' },
-      { message: 'should match some schema in anyOf' }
+      { message: 'must have required property \'id\'' },
+      { message: 'must have required property \'exception\'' },
+      { message: 'must have required property \'log\'' },
+      { message: 'must match a schema in anyOf' }
     ])
 
     t.strictEqual(validateError({ id: 'foo', exception: {} }), false)
     validateFieldMessages(t, validateError.errors, [
       {
-        dataPath: '.exception',
+        instancePath: '/exception',
         params: { missingProperty: 'message' },
-        message: 'should have required property \'message\''
+        message: 'must have required property \'message\''
       },
       {
-        dataPath: '.exception',
+        instancePath: '/exception',
         params: { missingProperty: 'type' },
-        message: 'should have required property \'type\''
+        message: 'must have required property \'type\''
       },
       {
-        dataPath: '.exception',
+        instancePath: '/exception',
         params: {},
-        message: 'should match some schema in anyOf'
+        message: 'must match a schema in anyOf'
       }
     ])
 
     t.strictEqual(validateError({ id: 'foo', log: {} }), false)
     validateFieldMessages(t, validateError.errors, [
       {
-        dataPath: '.log',
+        instancePath: '/log',
         params: { missingProperty: 'message' },
-        message: 'should have required property \'message\''
+        message: 'must have required property \'message\''
       }
     ])
     t.end()

@trentm
Copy link
Member

trentm commented Jun 6, 2022

@dependabot ignore this major version

@trentm trentm closed this Jun 6, 2022
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Jun 6, 2022

OK, I won't notify you about version 8.x.x again, unless you re-open this PR or update to a 8.x.x release yourself.

@dependabot dependabot bot deleted the dependabot/npm_and_yarn/ajv-8.11.0 branch June 6, 2022 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-nodejs Make available for APM Agents project planning. dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant