Pull request review commentsequelize/sequelize

refactor(cls): remove cls support

 Sequelize v6 is the next major release after v4 ### Support for Node 8 and up  Sequelize v6 will only support Node 8 and up++### Removal of CLS++CLS allowed implicit passing of the `transaction` property to query options inside of a transaction.+This feature was removed for 3 reasons.++- It required hooking the promise implementation which is not sustainable for the future of sequelize.+- It's generally unsafe due to it's implicit nature.+- It wasn't always reliable when mixed promise implementations were used.++Check all your usage of the `.transaction` method and make you sure explicitly pass the `transaction` object for each subsequent query.

"make you sure" > "make sure you"?

SimonSchick

comment created time in 4 days

push eventmirkojotic/sequelize

Mirko Jotic

commit sha 392699122a88e63829856458209e005264da3adf

fix(types): add using & operator index interface (#10813)

view details

Chocobozzz

commit sha 032d9968a5126cce5093619b716cd25d3a2e3d99

fix(types): scope typing (#10803)

view details

Sushant

commit sha 5fa6e2c2d4399535d12865f10736cc954b36058e

docs: change invalid mention of inferNew

view details

push time in 4 days

push eventmirkojotic/sequelize

Mirko Jotic

commit sha 1053988c3a034855de870f41f690cb0f174f758a

feat(types): model.get overloading reordering

view details

push time in 4 days

push eventmirkojotic/sequelize

Mirko Jotic

commit sha 7531e735ec5bb972e53b33f48845ff9c5a0b2cec

feat(types): model.get overloading reordering

view details

push time in 4 days

push eventmirkojotic/sequelize

Mirko Jotic

commit sha c44c72ae23b6add02f2dfd7390431491a934aeec

fix(instance): isSoftDelete true after creating (#10799)

view details

Tony Brix

commit sha d1645f23a3e75964edfb723fc1ff4c24988a07ac

fix(mssql): describeTable for VARCHAR(MAX) (#10795)

view details

Mirko Jotic

commit sha e3d6795ddc19f78a26d4d98a1a633161fe1182ab

feat(types): adding Literal type to Operators (#10796)

view details

Mirko Jotic

commit sha 392699122a88e63829856458209e005264da3adf

fix(types): add using & operator index interface (#10813)

view details

Chocobozzz

commit sha 032d9968a5126cce5093619b716cd25d3a2e3d99

fix(types): scope typing (#10803)

view details

Sushant

commit sha 5fa6e2c2d4399535d12865f10736cc954b36058e

docs: change invalid mention of inferNew

view details

Mirko Jotic

commit sha 5f33f45fa5a8df1ac93cd60968f97deb5c2d14c1

Merge branch 'master' into types-model-get-key-type

view details

push time in 4 days

PR opened sequelize/sequelize

feat(types): add using & operator index interface

Pull Request check-list

Please make sure to review and check all of these items:

  • [x] Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [x] Have you added new tests to prevent regressions?
  • [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [x] Did you follow the commit message conventions explained in CONTRIBUTING.md?

<!-- NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open. -->

Description of change

Solves #10811 <!-- Please provide a description of the change here. --> Adding missing fields to ModelIndexesOptions

+25 -1

0 comment

2 changed files

pr created time in 5 days

create barnchmirkojotic/sequelize

branch : types-gin-index

created branch time in 5 days

push eventmirkojotic/sequelize

Mirko Jotic

commit sha 909c7acb9944c0c4c91c0eba46970632234517da

feat(typings): formating

view details

push time in 6 days

PR opened sequelize/sequelize

feat(types): add Paranoid to Includeable

Pull Request check-list

Please make sure to review and check all of these items:

  • [x] Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [x] Have you added new tests to prevent regressions?
  • [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [x] Did you follow the commit message conventions explained in CONTRIBUTING.md?

Description of change

Solves #10787 <!-- Please provide a description of the change here. -->

Adding Paranoid to Includeable and adding a type test.

+9 -1

0 comment

2 changed files

pr created time in 6 days

create barnchmirkojotic/sequelize

branch : types-add-paranoid-to-includeable

created branch time in 6 days

push eventmirkojotic/sequelize

Mirko Jotic

commit sha 638b13b243037e42131c8d2ea4aa765e3373bbd0

feat(typings): model.count with group by (#10763)

view details

Philipp

commit sha 2f6e01b5a73fc8ec60880ff749a5f37458bd3410

fix(typings): extend FindOptions with QueryOptions (#10766)

view details

Mirko Jotic

commit sha 2c18e084509469c7e8b9fdbabcb4c713312c216d

feat(sync): allow altering comments (#10758)

view details

Mirko Jotic

commit sha 380738b8b23e7c764ecc0440e7b0a3214a871512

docs(scopes): attributes key merging (#10776)

view details

Mirko Jotic

commit sha f4a46dc1f2d91f4a29fc054450c2784f5aba85bd

fix(typings): add OptimisticLockError type (#10777)

view details

Jonathan Hoyt

commit sha 720f7ec91c6f4eaecdbcf768c9d4bfdf9d14c257

feat(mysql): indexHints support (#10756)

view details

Sushant

commit sha 93e64a9a6f4bef0e606e993271ed963fa0f530a9

docs: index hints

view details

DC

commit sha 4cc7dc8a4d9b85dc7dfef5064175a3cdc09c0fa8

fix(model): handle virtual attributes in includes (#10785)

view details

Mirko Jotic

commit sha c44c72ae23b6add02f2dfd7390431491a934aeec

fix(instance): isSoftDelete true after creating (#10799)

view details

Tony Brix

commit sha d1645f23a3e75964edfb723fc1ff4c24988a07ac

fix(mssql): describeTable for VARCHAR(MAX) (#10795)

view details

Mirko Jotic

commit sha e3d6795ddc19f78a26d4d98a1a633161fe1182ab

feat(types): adding Literal type to Operators (#10796)

view details

push time in 6 days

Pull request review commentsequelize/sequelize

feat(types): model.get overloading reordering

 class MyModel extends Model { }  const assoc: Association = MyModel.associations.other;++const Instance: MyModel = new MyModel({ int: 10 });+const int: IntegerDataType = Instance.get('int');

Should be good now.

mirkojotic

comment created time in 7 days

push eventmirkojotic/sequelize

Mirko Jotic

commit sha 8872f9e6f7ee91e3fd74c35d2a2166133d81cfeb

fix(typings): using number type

view details

push time in 7 days

pull request commentsequelize/sequelize

Pass useUTC dialect option to mssql/Tedious

I'm glad you've found the solution @molaux and thanks for the contribution! A side note Sequelize comes with docker container definitions with all the databases you might need for integration testing. I don't have mssql locally either but fortunately docker works well. The CI failures are unrelated to your change, I believe.

On to the change, this might need to a documentation change and maybe a default value (also documented). @sushantdhiman

molaux

comment created time in 7 days

pull request commentsequelize/sequelize

fix(describeTable): MAX string length for mssql

Hi @UziTech I would make a new test case in this file and make a condition to check if the dialect is mssql like so. Just define one field with MAX length, perform a describeTable and check it is correct. Let me know if you need anything :wink:

UziTech

comment created time in 7 days

PR opened sequelize/sequelize

fix(instance): isSoftDelete true after creating

Pull Request check-list

Please make sure to review and check all of these items:

  • [x] Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [x] Have you added new tests to prevent regressions?
  • [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [x] Did you follow the commit message conventions explained in CONTRIBUTING.md?

<!-- NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open. -->

Description of change

Solves #10714 <!-- Please provide a description of the change here. --> Handling deleted_at being undefined if not defaulted when model is created.

+7 -1

0 comment

2 changed files

pr created time in 7 days

create barnchmirkojotic/sequelize

branch : fix-is-soft-delete-erroneous

created branch time in 7 days

issue commentsequelize/sequelize

[BUG] sequelize.sync ({alter:true}) not altering tables.

@sushantdhiman is adding this feature to mariaDB something possible and something we want to pursue?

iwaduarte

comment created time in 7 days

PR opened sequelize/sequelize

feat(types): model.get overloading reordering

Pull Request check-list

Please make sure to review and check all of these items:

  • [x] Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [x] Have you added new tests to prevent regressions?
  • [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [x] Did you follow the commit message conventions explained in CONTRIBUTING.md?

<!-- NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open. -->

Description of change

Solves #10782 <!-- Please provide a description of the change here. --> Adding a test and reordering overloading

+6 -2

0 comment

2 changed files

pr created time in 7 days

create barnchmirkojotic/sequelize

branch : types-model-get-key-type

created branch time in 7 days

issue commentsequelize/sequelize

Typescript Literal for WhereOperators

@SimonSchick sorry I didn't see there is already a PR open for this. You can close mine if it doesn't prove useful.

mtryba

comment created time in 7 days

PR opened sequelize/sequelize

feat(types): adding Literal type to Operators

Pull Request check-list

Please make sure to review and check all of these items:

  • [x] Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [x] Have you added new tests to prevent regressions?
  • [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [x] Did you follow the commit message conventions explained in CONTRIBUTING.md?

Description of change

Solves #10789 <!-- Please provide a description of the change here. --> Adding Literal as an option for most of Operators

+42 -16

0 comment

2 changed files

pr created time in 7 days

create barnchmirkojotic/sequelize

branch : adding-literal-type-to-operators

created branch time in 7 days

issue commentsequelize/sequelize

Typescript Literal for WhereOperators

@SimonSchick any specific reason why this wasn't included in type definition. If not I can add it.

mtryba

comment created time in 8 days

delete branch mirkojotic/sequelize

delete branch : scope-overwrite-attributes

delete time in 8 days

PR opened sequelize/sequelize

feat(types): adding OptimisticLockError type

<!-- Thanks for wanting to fix something on Sequelize - we already love you! Please fill in the template below. If unsure about something, just do as best as you're able.

If your PR only contains changes to documentation, you may skip the template below. -->

Pull Request check-list

Please make sure to review and check all of these items:

  • [x] Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [x] Have you added new tests to prevent regressions?
  • [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [x] Did you follow the commit message conventions explained in CONTRIBUTING.md?

<!-- NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open. -->

Description of change

Solves #10775 <!-- Please provide a description of the change here. --> Adding type of OptimisticLockError and a test.

+20 -0

0 comment

2 changed files

pr created time in 9 days

create barnchmirkojotic/sequelize

branch : optimistic-lock-error-ts

created branch time in 9 days

issue commentsequelize/sequelize

Aggregate functions returning wrong results

@farnazj I'm sorry you're having issues with it but I don't think this is an issue in sequelize. In the example I've posted above, everything returns correctly so aggregation is working fine. The problem in the query your code produces (imho) is that you are grouping by 'PostAssessments.id` which will result in the response you are getting. This is the query

SELECT 
`Post`.`id`, `Post`.`title`, `Post`.`createdAt`, `Post`.`updatedAt`, 
MIN(`PostAssessments`.`postCredibility`) AS `minValidity`, 
MAX(`PostAssessments`.`postCredibility`) AS `maxValidity`, 
COUNT(`PostAssessments`.`id`) AS `count`
FROM `Posts` AS `Post` 
INNER JOIN `Assessments` AS `PostAssessments` 
ON `Post`.`id` = `PostAssessments`.`PostId` 
GROUP BY `Post`.`id`, `PostAssessments`.`id` 
ORDER BY `Post`.`updatedAt` DESC, `PostAssessments`.`updatedAt` DESC;

That might be something to look into, other than that I can't help you further.

farnazj

comment created time in 9 days

PR opened sequelize/sequelize

feat(docs): attributes key merging

<!-- Thanks for wanting to fix something on Sequelize - we already love you! Please fill in the template below. If unsure about something, just do as best as you're able.

If your PR only contains changes to documentation, you may skip the template below. -->

Pull Request check-list

Please make sure to review and check all of these items:

  • [x] Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [x] Have you added new tests to prevent regressions?
  • [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [x] Did you follow the commit message conventions explained in CONTRIBUTING.md?

<!-- NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open. -->

Description of change

Solves #10742 <!-- Please provide a description of the change here. --> Trying to clarify that options.attributes.exclude is always going to be preserved no matter how many scopes are applied.

@sushantdhiman if I wasn't clear enough let me know and I'll fix it up.

+2 -0

0 comment

1 changed file

pr created time in 9 days

create barnchmirkojotic/sequelize

branch : scope-documentation-change

created branch time in 9 days

issue commentsequelize/sequelize

Aggregate functions returning wrong results

@farnazj I don't think this is an issue in sequelize.

Assessment.findAll({
              attributes: [
                [Sequelize.fn('MIN', Sequelize.col('postCredibility')), `minValidity`],
                [Sequelize.fn('MAX', Sequelize.col('postCredibility')), `maxValidity`],
                [Sequelize.fn('COUNT', Sequelize.col('postCredibility')), `count`]
              ],
              include: [
                Post
              ],
              group: ['Post.id'],
              raw: true,
              logging: console.log
            })

I turned stuff around a bit and I think I got the result you were looking for.

farnazj

comment created time in 9 days

PR closed sequelize/sequelize

fix(scope): overwrite attributes if multiple scopes chained

<!-- Thanks for wanting to fix something on Sequelize - we already love you! Please fill in the template below. If unsure about something, just do as best as you're able.

If your PR only contains changes to documentation, you may skip the template below. -->

Pull Request check-list

Please make sure to review and check all of these items:

  • [ ] Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [x] Have you added new tests to prevent regressions?
  • [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [x] Did you follow the commit message conventions explained in CONTRIBUTING.md?

<!-- NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open. -->

Description of change

Hopefully solves #10742 As per documentation if multiple scopes are used, later should overwrite the previous scope. For some reason ( and I might be missing the real why ) they were being unioned with (_.union). So please let me know if this is useless. <!-- Please provide a description of the change here. -->

+43 -1

3 comments

2 changed files

mirkojotic

pr closed time in 9 days

pull request commentsequelize/sequelize

fix(scope): overwrite attributes if multiple scopes chained

Gladly

mirkojotic

comment created time in 9 days

Pull request review commentsequelize/sequelize

feat(comments): allow altering comments

 describe(Support.getTestDialectTeaser('QueryInterface'), () => {             expect(describedTable.level_id.allowNull).to.be.equal(true);           });         });-        ++        it('should change the comment of column', function() {+          return this.queryInterface.describeTable({+            tableName: 'users'+          }).then( describedTable => {

Should be good now.

mirkojotic

comment created time in 10 days

push eventmirkojotic/sequelize

Mirko Jotic

commit sha 0f74b03e93ff47c5a45b9bd5db539ced63058cfb

feat(comments): formatting fix

view details

push time in 10 days

pull request commentsequelize/sequelize

fix(scope): overwrite attributes if multiple scopes chained

I'm aware the tests are failing this is more of a sanity check / WIP PR. I just wanted to make sure this approach is sound. Tests are expecting this UNION even though documentation says otherwise. So either one or the other should change (my point of view).

mirkojotic

comment created time in 10 days

PR opened sequelize/sequelize

fix(scope): overwrite attributes if multiple scopes chained

<!-- Thanks for wanting to fix something on Sequelize - we already love you! Please fill in the template below. If unsure about something, just do as best as you're able.

If your PR only contains changes to documentation, you may skip the template below. -->

Pull Request check-list

Please make sure to review and check all of these items:

  • [x] Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [x] Have you added new tests to prevent regressions?
  • [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [x] Did you follow the commit message conventions explained in CONTRIBUTING.md?

<!-- NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open. -->

Description of change

Hopefully solves #10742 As per documentation if multiple scopes are used, later should overwrite the previous scope. For some reason ( and I might be missing the real why ) they were being unioned with (_.union). So please let me know if this is useless. <!-- Please provide a description of the change here. -->

+43 -1

0 comment

2 changed files

pr created time in 10 days

create barnchmirkojotic/sequelize

branch : scope-overwrite-attributes

created branch time in 10 days

issue commentsequelize/sequelize

(mysql) BIGINT gets stored with incorrect precision after upgrading to v5

I've dag around quite a bit to understand what's happening here and couldn't find an obvious reason why this would be happening. I've managed to reproduce the issue in our tests with:

    it('bigint precision off when using int instead of string', function() {
      const User = this.User;
      const aNumberI = 190067261967433730;
      return User.create({ aNumber: aNumberI }).then(user => {
        expect(user.aNumber).to.equal(aNumberI); // user.aNumber is still an int here
        return User.findAll().then(_user => {
          expect(parseInt(_user.aNumber, 10)).to.equal(aNumberI); // _user.aNumber is a string here, but also instead of 190067261967433730 it's "190067261967433728"
        })
      });
    });

Simple workaround is to use a string instead of an int when creating an object, but I understand this is not a solution. Odd thing is that it doesn't fail when using 481267216386621440 int.

jozsefsallai

comment created time in 10 days

push eventmirkojotic/sequelize

Mirko Jotic

commit sha b896ba4dbbc90811c53fc2dce4351d0daaed8455

fix(query-generator): fix addColumn create comment (#10117)

view details

Simon Schick

commit sha c1ac54331f55b77f9fd11646715fa83282ab5c69

refactor: reduce code complexity (#10120)

view details

Igor Ovsiannikov

commit sha f66948242228aeb8cff355f0f13636afeda6de85

docs: typo in associations.md (#10157)

view details

Sushant

commit sha 4cc48a0aaabf3aeb495b956038ca5fbbb2587fef

docs(transaction): default isolation level #10111

view details

Sushant

commit sha 9ba5f3c200c5470cf9d4f123af09b9be9aba5636

fix(sqlite): simplify connection error handling

view details

Takashi Sasaki

commit sha ce9287fecfc787f5e5e5e115213c2d13d65908c1

fix(association): enable eager load with include all(#9928) (#10173)

view details

Simon Schick

commit sha 6b1ff3b1320fed5a636a1040eaaaed1d1830b980

refactor: optimize memoize use, misc cases (#10122)

view details

Sushant

commit sha 946fb72970d15a5a8b8567a720c3fe0b7518954a

fix(sync): throw when no models defined (#10175)

view details

Diogo Simões

commit sha f2cafcc4b4a2b7500ff672ebdf527f338ee20bb4

docs(migrations): added advanced skeleton example (#10190)

view details

Vladlen

commit sha ed1d28b8a7cf5c4be7fe4b32c2d7b27943b2c9c1

docs(migrations): Simplify CLI Call (#10201)

view details

javiertury

commit sha 89b8d47cc7a9b56937e81efc9e7259a12420f2b7

docs: explain custom/new data types (#10170)

view details

Sushant

commit sha 61a9b268b15b8ef4882bf45ddcc0cf5c10f7991e

docs(bulk-create): update support information about ignoreDuplicates

view details

Tommy van der Vorst

commit sha e4218a2335ba64033cb3db77daa07131ae2cf133

fix(model): prevent version number from being incremented as string (#10217)

view details

diego dupin

commit sha c6d733383dd9b877988784f28f23d47e256125f8

feat(dialect): mariadb (#10192)

view details

farisn

commit sha 2c6b6e5fb407952ab7a51536ec0ac4a06ca33443

docs(model.init): `attribute.column.validate` option (#10237)

view details

Pedro Augusto de Paula Barbosa

commit sha 227da63043e7355f126b82dbedc5fc699487ff95

docs: fix favicon (#10242)

view details

Simon Schick

commit sha 2874c54915b2594225e939809ca9f8200b94f454

chore(lint): enforce consistent spacing (#10193)

view details

Sushant

commit sha 850a47912c668c33992ef29d2373947042c0452f

docs(migrations): improve dialect options docs

view details

Sushant

commit sha 48edc85f49217c5f4078b202de179f9163aeceaa

docs: changelog for 5.0.0-beta.15

view details

Sushant

commit sha cd21f7ed172ffbb7840ebda3fba0b94d2e3f605e

5.0.0-beta.15

view details

push time in 10 days

push eventmirkojotic/sequelize

Mirko Jotic

commit sha 28e55362e364998d83e02ad47786900bf5131ff8

feat(typings): adding tests for count overload

view details

push time in 10 days

push eventmirkojotic/sequelize

Mirko Jotic

commit sha 9de8bd2fe1a00589d46ee44bd0e48841eca5ee72

feat(typings): adding count.ts test

view details

push time in 10 days

pull request commentsequelize/sequelize

feat(typings): model.count with group by

No problem, can you point me to an example. Not sure how testing of type definitions is done.

On Sat, Apr 13, 2019, 08:49 Simon Schick notifications@github.com wrote:

@SimonSchick requested changes on this pull request.

Needs test.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sequelize/sequelize/pull/10763#pullrequestreview-226351876, or mute the thread https://github.com/notifications/unsubscribe-auth/AKKKcPZf0BvO5-2K2-IVfFYXv57gaiDpks5vgdI-gaJpZM4cskEo .

mirkojotic

comment created time in 11 days

PR opened sequelize/sequelize

feat(typings): model.count with group by

<!-- Thanks for wanting to fix something on Sequelize - we already love you! Please fill in the template below. If unsure about something, just do as best as you're able.

If your PR only contains changes to documentation, you may skip the template below. -->

Pull Request check-list

Please make sure to review and check all of these items:

  • [x] Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [x] Have you added new tests to prevent regressions?
  • [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [x] Did you follow the commit message conventions explained in CONTRIBUTING.md?

<!-- NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open. --> Solves #10757 hopefully :)

I'm not well versed in typescript but if there are changes to make I'm up for it. As always if it's not useful please ignore.

Description of change

<!-- Please provide a description of the change here. -->

+17 -0

0 comment

1 changed file

pr created time in 12 days

create barnchmirkojotic/sequelize

branch : typings-model-count-group-by

created branch time in 12 days

create barnchmirkojotic/sequelize

branch : model-count-typings-group-by

created branch time in 12 days

push eventmirkojotic/sequelize

Mirko Jotic

commit sha e877f99a45f879ad6421611b9b8d9f5b25953356

feat(comments): allow altering comments - reduce nesting in test - formating

view details

push time in 12 days

Pull request review commentsequelize/sequelize

feat(comments): allow altering comments

 class PostgresQueryGenerator extends AbstractQueryGenerator {      for (const key in attributes) {       const attribute = attributes[key];-      result[attribute.field || key] = this.attributeToSQL(attribute, options);+      result[attribute.field || key] = this.attributeToSQL(attribute, Object.assign({ key }, options || {}));

To create a comment SQL statement in pg, it was necessary to have table name and column the comment is referring to. That line just adds the column name to options.

mirkojotic

comment created time in 13 days

push eventmirkojotic/sequelize

Mirko Jotic

commit sha 777b7ad205f8579d1bfd16ed6f071252a49940fa

feat(comments): allow altering comments - remediating test failiures

view details

push time in 13 days

push eventmirkojotic/sequelize

Mirko Jotic

commit sha 30ea3531dcfdd28a04ed4f56c7e5c81e0cc93afc

feat(comments): allow altering comments - createTable event makes it's own create comment queries so it had to be excluded from attributeToSQL for now.

view details

push time in 13 days

PR opened sequelize/sequelize

feat(comments): allow altering comments

<!-- Thanks for wanting to fix something on Sequelize - we already love you! Please fill in the template below. If unsure about something, just do as best as you're able.

If your PR only contains changes to documentation, you may skip the template below. -->

Pull Request check-list

Please make sure to review and check all of these items:

  • [x] Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • [x] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • [x] Have you added new tests to prevent regressions?
  • [ ] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [x] Did you follow the commit message conventions explained in CONTRIBUTING.md?

<!-- NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open. -->

Description of change

<!-- Please provide a description of the change here. --> Solves #10720 Adds ability to use changeColumn to alter comments. It wasn't implemented initially. Works for all dialects except sqlite.

+30 -12

0 comment

4 changed files

pr created time in 13 days

create barnchmirkojotic/sequelize

branch : allow-alter-comments

created branch time in 13 days

issue commentsequelize/sequelize

Comment ALTER Query Error

Hi @knighthell we introduced comments not too long ago and I think the scope of it at the time was to only allow for comments when table was created (so no alter functionality) and I think the docs reflect this (if not I'll make a PR to docs first and make sure it's clear) . However I'm willing to implement this so I'll be taking a look.

knighthell

comment created time in 14 days

issue commentelastic/elasticsearch

[Test] Convert Pipeline agg integration tests into AggregatorTestCase

@polyfractal no problem 😉

I wouldn't mind taking a stab at it. I might open a WIP PR if I get stuck.

Just to confirm AggregatorTestCase is modeled after the actual internal implementation. So I need to follow that closely and add the a list of sibling aggs as argument to searchAndReduce?

polyfractal

comment created time in a month

issue commentelastic/

[Test] Convert Pipeline agg integration tests into AggregatorTestCase

Hi @plyfractal, I was looking to convert a couple of other IT to ATC but I might have a few questions. Remaining ITs include a lot of bucket aggs and sibling aggs. Can you point me to an example on how I would assemble such aggregation. A small example: Currently with the IT tests there are a lot of client.addAggregation(...) which adds a sibling aggregation if I'm not wrong. The new api exposes agg.subAggregation(...) and I haven't found a comparable solution. It's obviously my lack of understanding but I wasn't able to mimic the old way. I've tried several approaches including a list of aggregations passed to the reducer with some success but not 100%. That approach was inspired with one of the tests you've started to convert but it was somewhat different than what I was trying to do. And after I've gone through that I was wondering if i made a wrong turn somewhere 😅

polyfractal

comment created time in a month

issue commentelastic/

[Test] Convert Pipeline agg integration tests into AggregatorTestCase

Hi @plyfractal, I was looking to convert a couple of other IT to ATC but I might have a few questions. Remaining ITs include a lot of bucket aggs and sibling aggs. Can you point me to an example on how I would assemble such aggregation. A small example: Currently with the IT tests there are a lot of client.addAggregation(...) which adds a sibling aggregation if I'm not wrong. The new api exposes agg.subAggregation(...) and I haven't found a comparable solution. It's obviously my lack of understanding but I wasn't able to mimic the old way. I've tried several approaches including a list of aggregations passed to the reducer with some success but not 100%. That approach was inspired with one of the tests you've started to convert but it was somewhat different than what I was trying to do. And after I've gone through that I was wondering if i made a wrong turn somewhere 😅

polyfractal

comment created time in a month

pull request commentapache/incubator-druid

Select query failing if miliseconds used as time for indexing

@gianm let me know if it needs more work

mirkojotic

comment created time in 2 months

push eventmirkojotic/incubator-druid

Mirko Jotic

commit sha 656957d2c859586d39e9eb3773445cd7c23bd2e7

Handle only milisec timestamps and ISO8601 strings

view details

push time in 2 months

pull request commentelastic/elasticsearch

Converting Derivative Pipeline Agg integration test into AggregatorTestsCase.

@polyfractal awesome! Happy to hear it!

I'll get to work on some other ones if it makes sense.

mirkojotic

comment created time in 2 months

Pull request review commentapache/incubator-druid

Select query failing if miliseconds used as time for indexing

 public static DateTime utc(long instant)    public static DateTime of(String instant)   {-    return new DateTime(instant, ISOChronology.getInstanceUTC());+    try {+      Integer seconds = Integer.valueOf(instant);

As I wrote it last night I realized it's doing too much.

I'll work on it today.

mirkojotic

comment created time in 2 months

push eventmirkojotic/incubator-druid

Mirko Jotic

commit sha 013f3c814d9707d58d9868d4a917b176730df2ba

DateTime#of has to support "2011-01-01T00:00:00" - in addition to seconds and milisecs, this method currently supports even a date string.

view details

push time in 2 months

push eventmirkojotic/incubator-druid

Mirko Jotic

commit sha 4ba8575513e04ff32b516e659e8076d9fee6a1cf

Using constant values in tests - Try converting to Integer and then multiply by 1000L to achieve milis. - If not successful try converting to Long or rethrow original exception.

view details

push time in 2 months

pull request commentapache/incubator-druid

Select query failing if miliseconds used as time for indexing

@gianm Yes. Will be working on it tomorrow.

mirkojotic

comment created time in 2 months

pull request commentelastic/elasticsearch

Converting Derivative Pipeline Agg integration test into AggregatorTestsCase.

Hurray! I'll be watching for comments.

Thank you both for being patient!

mirkojotic

comment created time in 2 months

push eventmirkojotic/elasticsearch

Paul Sanwald

commit sha 0d56955d39e9e5e3e66aaf8ea63a13f10606bf7e

mute test, as this one is failing also per #35450 (#38132)

view details

Armin Braun

commit sha 0a604e3b2496777168bb541815a8526e463ee15f

Fix Two Races that Lead to Stuck Snapshots (#37686) * Fixes two broken spots: 1. Master failover while deleting a snapshot that has no shards will get stuck if the new master finds the 0-shard snapshot in `INIT` when deleting 2. Aborted shards that were never seen in `INIT` state by the `SnapshotsShardService` will not be notified as failed, leading to the snapshot staying in `ABORTED` state and never getting deleted with one or more shards stuck in `ABORTED` state * Tried to make fixes as short as possible so we can backport to `6.x` with the least amount of risk * Significantly extended test infrastructure to reproduce the above two issues * Two new test runs: 1. Reproducing the effects of node disconnects/restarts in isolation 2. Reproducing the effects of disconnects/restarts in parallel with shard relocations and deletes * Relates #32265 * Closes #32348

view details

Tim Vernum

commit sha 6fcbd07420f1f779a58fa5d49b834964896a2ac1

Remove heuristics that enable security on trial licenses (#38075) In 6.3 trial licenses were changed to default to security disabled, and ee added some heuristics to detect when security should be automatically be enabled if `xpack.security.enabled` was not set. This change removes those heuristics, and requires that security be explicitly enabled (via the `xpack.security.enabled` setting) for trial licenses. Relates: #38009

view details

Przemyslaw Gomulka

commit sha 275857857099f711276e4399f276cf1e95912613

Trim the JSON source in indexing slow logs (#38081) The '{' as a first character in log line is causing problems for beats when parsing plaintext logs. This can happen if the submitted document has an additional '\n' at the beginning and we are not reformatting. Trimming the source part of a SlogLog solves that and keeps the logs readable. closes #38080

view details

Adrien Grand

commit sha d83c748417da334010d0659ed2f5b2c9052fb7d7

Fix test bug in DynamicMappingsIT. (#37906) Closes #37898

view details

Yannick Welsch

commit sha 859e2f5bc8739e3a3afa8e2f94c78906b5f5a4d0

Adapt timeouts in UpdateMappingIntegrationIT Relates to #37263 and possibly #36916

view details

Alexander Reelsen

commit sha c02cd3e2fdc703ade351f43f5e733279b324e9fb

Fix java time epoch date formatters (#37829) The self written epoch date formatters were not properly able to format an Instant to a string due to a misconfiguration. This fix also removes a until now existing runtime behaviour under java 8 regarding the names of the aggregation buckets, which are now the same as before and have been under java 11.

view details

David Turner

commit sha 23f00e367673bec2637deb52d95e9c6bee3d4963

Relax fault detector in some disruption tests (#38101) Today we use `AbstractDisruptionTestCase` to test the behaviour of things like master elections in the presence of cluster disruptions. These tests have rather enthusiastic fault detection settings, detecting a fault if a single ping fails, with a one-second timeout. Furthermore there are some tests that assert the identity of the master remains unchanged during some disruption, and these assertions fail rather often thanks to the overly sensitive fault detector. However in a number of these tests the fault detector need not be this sensitive. This commit moves some such tests into their own test suite and uses more sensible fault-detection settings to avoid the kind of master instability that is causing CI failures. Closes #37699

view details

Jim Ferenczi

commit sha b7308aa03cdf87d12a0ff781b2bbb7b6222fcdad

Don't load global ordinals with the `map` execution_hint (#37833) The terms aggregator loads the global ordinals to retrieve the cardinality of the field to aggregate on. This information is then used to select the strategy to use for the aggregation (breadth_first or depth_first). However this should be avoided if the execution_hint is explicitly set to map since this mode doesn't really need the global ordinals. Since we still need the cardinality of the field this change picks the maximum cardinality in the segments as an estimation of the total cardinality to select the strategy to use (breadth_first or depth_first). This estimation is only used if the execution hint is set to map, otherwise the global ordinals are still used to retrieve the accurate cardinality. Closes #37705

view details

Alpar Torok

commit sha d417997aca4a6e91e6bc0f0c8141af0e29b7255a

Fix eclipse config for ssl-config (#38096)

view details

Alexander Reelsen

commit sha 6c5a7387af086381da34db6103fc711dd8350b14

Replace joda time in ingest-common module (#38088) This commit fully replaces any remaining joda time time classes with java time implementations. Relates #27330

view details

Tanguy Leroux

commit sha 0e6a7c20a1730156756fad33d5f3297958a39db8

Fix FullClusterRestartIT.testHistoryUUIDIsAdded (#38098) This test failed once because the index wasn't fully ready (ie, engine opened). This commit changes the test so that it waits for the index to be green before checking the history UUID. Closes #34452

view details

Andrey Ershov

commit sha bfd618cf8324ef3d1f67f304286bf468eb84ad8e

Universal cluster bootstrap method for tests with autoMinMasterNodes=false (#38038) Currently, there are a few tests that use autoMinMasterNodes=false and hence override addExtraClusterBootstrapSettings, mostly this is 10-30 lines of codes that are copy-pasted from class to class. This PR introduces `InternalTestCluster.setBootstrapMasterNodeIndex` which is suitable for all classes and copy-paste could be removed. Removing code is always a good thing!

view details

Jim Ferenczi

commit sha 57b1d245e8e9e766cb708088dd78fbc691557dfc

Remove AtomiFieldData#getLegacyFieldValues (#38087) This function is unused now that we format the docvalue fields with the default formatter on the field (#30831)

view details

Jim Ferenczi

commit sha 6fa93ca49387d5f3ae3208ed64623a0c319d570e

Forbid negative field boosts in analyzed queries (#37930) This change forbids negative field boost in the `query_string`, `simple_query_string` and `multi_match` queries. Negative boosts are not allowed in Lucene 8 (scores must be positive). The backport of this change to 6x will turn the error into a deprecation warning in order to raise the awareness of this breaking change in 7.0. Closes #33309

view details

Luca Cavanna

commit sha e18cac3659a82b60884564ec78d7c36b6eb0817a

Add finalReduce flag to SearchRequest (#38104) With #37000 we made sure that fnial reduction is automatically disabled whenever a localClusterAlias is provided with a SearchRequest. While working on #37838, we found a scenario where we do need to set a localClusterAlias yet we would like to perform a final reduction in the remote cluster: when searching on a single remote cluster. Relates to #32125 This commit adds support for a separate finalReduce flag to SearchRequest and makes use of it in TransportSearchAction in case we are searching against a single remote cluster. This also makes sure that num_reduce_phases is correct when searching against a single remote cluster: it makes little sense to return `num_reduce_phases` set to `2`, which looks especially weird in case the search was performed against a single remote shard. We should perform one reduction phase only in this case and `num_reduce_phases` should reflect that. * line length

view details

Yannick Welsch

commit sha ce469cfda57dcdfac8e21a62d1057df7b360534d

Fix testCorruptedIndex (#38161) Folks at the Lucene project do not seem to be interested in classifying corruptions and distinguishing them from file-system exceptions (see https://issues.apache.org/jira/browse/LUCENE-8525), so we'll just cop out as well. Closes #34322

view details

Tanguy Leroux

commit sha 029e4b6278c91670a509bd9ce35f0081e51513cd

Clear send behavior rule in CloseWhileRelocatingShardsIT (#38159) The current CloseWhileRelocatingShardsIT test adds some "send behavior" rule to a target node's mocked transport service in order to detect when shard relocating are started. These rules are never cleared and prevent the test to complete normally after the rebalance is re-enabled again. This commit changes the test so that rules are cleared and most verifications are done before the rebalance is reenabled again. Closes #38090

view details

Adrien Grand

commit sha 2229e7231e1ddb139b52cc9d3cd770aeebe64474

Enable bw tests for #37871 and #38032. (#38167) Mixed-version clusters tests had been disabled initially since they wouldn't work until the functionality would be backported.

view details

Alexander Reelsen

commit sha 979e5576e5fcabec7cde63cca845dcd43b06584d

Add tests for fractional epoch parsing (#38162) Fractional epoch parsing is supported, the tests we used were edge cases that did not make sense. This adds tests to properly check for this.

view details

push time in 2 months

pull request commentelastic/elasticsearch

Converting Derivative Pipeline Agg integration test into AggregatorTestsCase.

Well, some progress has been made 😊

@andyb-elastic I didn't even think that there's something wrong with the tests, is definitely my environment. I'll try out your suggestion.

I got another issue in CI 2 that I don't understand.

mirkojotic

comment created time in 2 months

push eventmirkojotic/elasticsearch

Paul Sanwald

commit sha 0d56955d39e9e5e3e66aaf8ea63a13f10606bf7e

mute test, as this one is failing also per #35450 (#38132)

view details

Armin Braun

commit sha 0a604e3b2496777168bb541815a8526e463ee15f

Fix Two Races that Lead to Stuck Snapshots (#37686) * Fixes two broken spots: 1. Master failover while deleting a snapshot that has no shards will get stuck if the new master finds the 0-shard snapshot in `INIT` when deleting 2. Aborted shards that were never seen in `INIT` state by the `SnapshotsShardService` will not be notified as failed, leading to the snapshot staying in `ABORTED` state and never getting deleted with one or more shards stuck in `ABORTED` state * Tried to make fixes as short as possible so we can backport to `6.x` with the least amount of risk * Significantly extended test infrastructure to reproduce the above two issues * Two new test runs: 1. Reproducing the effects of node disconnects/restarts in isolation 2. Reproducing the effects of disconnects/restarts in parallel with shard relocations and deletes * Relates #32265 * Closes #32348

view details

Tim Vernum

commit sha 6fcbd07420f1f779a58fa5d49b834964896a2ac1

Remove heuristics that enable security on trial licenses (#38075) In 6.3 trial licenses were changed to default to security disabled, and ee added some heuristics to detect when security should be automatically be enabled if `xpack.security.enabled` was not set. This change removes those heuristics, and requires that security be explicitly enabled (via the `xpack.security.enabled` setting) for trial licenses. Relates: #38009

view details

Przemyslaw Gomulka

commit sha 275857857099f711276e4399f276cf1e95912613

Trim the JSON source in indexing slow logs (#38081) The '{' as a first character in log line is causing problems for beats when parsing plaintext logs. This can happen if the submitted document has an additional '\n' at the beginning and we are not reformatting. Trimming the source part of a SlogLog solves that and keeps the logs readable. closes #38080

view details

Adrien Grand

commit sha d83c748417da334010d0659ed2f5b2c9052fb7d7

Fix test bug in DynamicMappingsIT. (#37906) Closes #37898

view details

Yannick Welsch

commit sha 859e2f5bc8739e3a3afa8e2f94c78906b5f5a4d0

Adapt timeouts in UpdateMappingIntegrationIT Relates to #37263 and possibly #36916

view details

Alexander Reelsen

commit sha c02cd3e2fdc703ade351f43f5e733279b324e9fb

Fix java time epoch date formatters (#37829) The self written epoch date formatters were not properly able to format an Instant to a string due to a misconfiguration. This fix also removes a until now existing runtime behaviour under java 8 regarding the names of the aggregation buckets, which are now the same as before and have been under java 11.

view details

David Turner

commit sha 23f00e367673bec2637deb52d95e9c6bee3d4963

Relax fault detector in some disruption tests (#38101) Today we use `AbstractDisruptionTestCase` to test the behaviour of things like master elections in the presence of cluster disruptions. These tests have rather enthusiastic fault detection settings, detecting a fault if a single ping fails, with a one-second timeout. Furthermore there are some tests that assert the identity of the master remains unchanged during some disruption, and these assertions fail rather often thanks to the overly sensitive fault detector. However in a number of these tests the fault detector need not be this sensitive. This commit moves some such tests into their own test suite and uses more sensible fault-detection settings to avoid the kind of master instability that is causing CI failures. Closes #37699

view details

Jim Ferenczi

commit sha b7308aa03cdf87d12a0ff781b2bbb7b6222fcdad

Don't load global ordinals with the `map` execution_hint (#37833) The terms aggregator loads the global ordinals to retrieve the cardinality of the field to aggregate on. This information is then used to select the strategy to use for the aggregation (breadth_first or depth_first). However this should be avoided if the execution_hint is explicitly set to map since this mode doesn't really need the global ordinals. Since we still need the cardinality of the field this change picks the maximum cardinality in the segments as an estimation of the total cardinality to select the strategy to use (breadth_first or depth_first). This estimation is only used if the execution hint is set to map, otherwise the global ordinals are still used to retrieve the accurate cardinality. Closes #37705

view details

Alpar Torok

commit sha d417997aca4a6e91e6bc0f0c8141af0e29b7255a

Fix eclipse config for ssl-config (#38096)

view details

Alexander Reelsen

commit sha 6c5a7387af086381da34db6103fc711dd8350b14

Replace joda time in ingest-common module (#38088) This commit fully replaces any remaining joda time time classes with java time implementations. Relates #27330

view details

Tanguy Leroux

commit sha 0e6a7c20a1730156756fad33d5f3297958a39db8

Fix FullClusterRestartIT.testHistoryUUIDIsAdded (#38098) This test failed once because the index wasn't fully ready (ie, engine opened). This commit changes the test so that it waits for the index to be green before checking the history UUID. Closes #34452

view details

Andrey Ershov

commit sha bfd618cf8324ef3d1f67f304286bf468eb84ad8e

Universal cluster bootstrap method for tests with autoMinMasterNodes=false (#38038) Currently, there are a few tests that use autoMinMasterNodes=false and hence override addExtraClusterBootstrapSettings, mostly this is 10-30 lines of codes that are copy-pasted from class to class. This PR introduces `InternalTestCluster.setBootstrapMasterNodeIndex` which is suitable for all classes and copy-paste could be removed. Removing code is always a good thing!

view details

Jim Ferenczi

commit sha 57b1d245e8e9e766cb708088dd78fbc691557dfc

Remove AtomiFieldData#getLegacyFieldValues (#38087) This function is unused now that we format the docvalue fields with the default formatter on the field (#30831)

view details

Jim Ferenczi

commit sha 6fa93ca49387d5f3ae3208ed64623a0c319d570e

Forbid negative field boosts in analyzed queries (#37930) This change forbids negative field boost in the `query_string`, `simple_query_string` and `multi_match` queries. Negative boosts are not allowed in Lucene 8 (scores must be positive). The backport of this change to 6x will turn the error into a deprecation warning in order to raise the awareness of this breaking change in 7.0. Closes #33309

view details

Luca Cavanna

commit sha e18cac3659a82b60884564ec78d7c36b6eb0817a

Add finalReduce flag to SearchRequest (#38104) With #37000 we made sure that fnial reduction is automatically disabled whenever a localClusterAlias is provided with a SearchRequest. While working on #37838, we found a scenario where we do need to set a localClusterAlias yet we would like to perform a final reduction in the remote cluster: when searching on a single remote cluster. Relates to #32125 This commit adds support for a separate finalReduce flag to SearchRequest and makes use of it in TransportSearchAction in case we are searching against a single remote cluster. This also makes sure that num_reduce_phases is correct when searching against a single remote cluster: it makes little sense to return `num_reduce_phases` set to `2`, which looks especially weird in case the search was performed against a single remote shard. We should perform one reduction phase only in this case and `num_reduce_phases` should reflect that. * line length

view details

Yannick Welsch

commit sha ce469cfda57dcdfac8e21a62d1057df7b360534d

Fix testCorruptedIndex (#38161) Folks at the Lucene project do not seem to be interested in classifying corruptions and distinguishing them from file-system exceptions (see https://issues.apache.org/jira/browse/LUCENE-8525), so we'll just cop out as well. Closes #34322

view details

Tanguy Leroux

commit sha 029e4b6278c91670a509bd9ce35f0081e51513cd

Clear send behavior rule in CloseWhileRelocatingShardsIT (#38159) The current CloseWhileRelocatingShardsIT test adds some "send behavior" rule to a target node's mocked transport service in order to detect when shard relocating are started. These rules are never cleared and prevent the test to complete normally after the rebalance is re-enabled again. This commit changes the test so that rules are cleared and most verifications are done before the rebalance is reenabled again. Closes #38090

view details

Adrien Grand

commit sha 2229e7231e1ddb139b52cc9d3cd770aeebe64474

Enable bw tests for #37871 and #38032. (#38167) Mixed-version clusters tests had been disabled initially since they wouldn't work until the functionality would be backported.

view details

Alexander Reelsen

commit sha 979e5576e5fcabec7cde63cca845dcd43b06584d

Add tests for fractional epoch parsing (#38162) Fractional epoch parsing is supported, the tests we used were edge cases that did not make sense. This adds tests to properly check for this.

view details

push time in 2 months

pull request commentelastic/elasticsearch

Converting Derivative Pipeline Agg integration test into AggregatorTestsCase.

@andyb-elastic I did a quick fetch of upstream, merge into feature branch. Hope that's what you meant.

Since you asked @polyfractal this is one of the errors I'm getting. There is around 30 and all very similar NoClassDefFoundError.

Suite: org.elasticsearch.test.VersionUtilsTests
ERROR   0.00s J1 | VersionUtilsTests (suite) <<< FAILURES!
   > Throwable #1: java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.test.ESTestCase
   >    at java.base/java.lang.Class.forName0(Native Method)
   >    at java.base/java.lang.Class.forName(Class.java:398)
Completed [24/36] on J1 in 0.03s, 0 tests, 1 error <<< FAILURES!

Anyhow It might be ready for another CI run.

mirkojotic

comment created time in 2 months

pull request commentelastic/elasticsearch

Converting Derivative Pipeline Agg integration test into AggregatorTestsCase.

Well it failed again. I looked at Jenkins console of the first CI and couldn't discern what went wrong. I'm willing to work on it whatever it is so any help with figuring out the cause is appreciated.

mirkojotic

comment created time in 2 months

pull request commentelastic/elasticsearch

Converting Derivative Pipeline Agg integration test into AggregatorTestsCase.

@polyfractal I've fixed the style issues and gradle checkStyle is successful. So I think it's ready for another CI run.

One problem I had is that gradle check isn't really running well for me and it never was. It doesn't finish successfully and I'm not sure why. I made a docker container where I have jdk 11 and gradle 5.2.1 and still no luck.

mirkojotic

comment created time in 2 months

push eventmirkojotic/elasticsearch

Mirko Jotic

commit sha 36ca5b4c8ecef5923171dfd02857b6227a218c29

Fixing style issues

view details

push time in 2 months

pull request commentelastic/elasticsearch

Converting Derivative Pipeline Agg integration test into AggregatorTestsCase.

I have code style issues. I completely overlooked that. I'm sorry.

I'll make sure that's fixed and let you know.

mirkojotic

comment created time in 2 months

pull request commentelastic/elasticsearch

Converting Derivative Pipeline Agg integration test into AggregatorTestsCase.

Great. In that case I believe it is.

mirkojotic

comment created time in 2 months

pull request commentelastic/elasticsearch

Converting Derivative Pipeline Agg integration test into AggregatorTestsCase.

Sounds good. Let me know if you want me to look into the history of it.

And my current solution just skips indexing that field if it's null. Which is only twice.

mirkojotic

comment created time in 2 months

pull request commentelastic/elasticsearch

Converting Derivative Pipeline Agg integration test into AggregatorTestsCase.

No problem. It wasn't a difficult process as I followed what you did for the initial one 😊

I think you can do document.add(new NumericDocValuesField("value", null)); to add it, the Document will accept a Long (which allows it being null).

This is what I tried first and it would throw a NPE. But let me go back and re-check it and report back.

mirkojotic

comment created time in 2 months

PR opened elastic/elasticsearch

Converting Derivative Pipeline Agg integration test into AggregatorTestsCase.

This is a WIP PR for this conversion as a part of #36015

I tried not modifying any tests but just change the underlying setup. That being said I did hit a couple of snags.

testPartiallyUnmapped method seems to be using two indices. I wasn't sure how to handle that so I'm open to any suggestions.

In testAvgMovavgDerivNPE I tried using NumericDocValuesField for "value" field but since it's sometimes null it would throw an NPE. Again any advice is welcome :)

Anywhere in the file where number of hits is referenced I would loop over buckets and get doc count. Not sure if proper approach.

If I made some more errors or if something can be improved I'm always open to suggestions or direction.

@polyfractal

+764 -0

0 comment

1 changed file

pr created time in 2 months

push eventmirkojotic/elasticsearch

Jason Tedor

commit sha bdb1e0e04e29054b0ca5a2d108914c7deed4c86e

Make node field in JoinRequest private (#36405) This commit moves the node field in the JoinRequest object to be a private field, adding a dedicated accessor. This is a minor breaking change in that it is no longer possible for all callers to overwrite this field, but that is a feature.

view details

Tim Brooks

commit sha e63d52af63ed66bbc8400935efc4c359f84b5a08

Move page size constants to PageCacheRecycler (#36524) `PageCacheRecycler` is the class that creates and holds pages of arrays for various uses. `BigArrays` is just one user of these pages. This commit moves the constants that define the page sizes for the recycler to be on the recycler class.

view details

Tim Brooks

commit sha 3a56bb0924cd46cc55839c1aa7c4679f72e70c9e

Do not zero out pages for bytes output stream (#36523) Currently, the `BytesStreamOutput` always zeros out the underlying byte pages when they are acquired. This should not be necessary as the stream overwrites the underlying bytes as serialization occurs.

view details

Simon Willnauer

commit sha ff5dd14753c2588f3be1ac16e3adb4fe38c3f590

Fix test failures related to file corruption (#36530) * Fix CorruptFileIT to also take last DV generation into account We currently only prune old .liv generations. With soft_deletes it's important to also prune DV generations. * Fix CorruptionUtils to skip the footer bytes after the checksum is read. Today we read a broken checksum since we also checksum the 8 footer bytes that include the checksum algorithm and the footer magic. Closes #36526

view details

Tanguy Leroux

commit sha dbcafbefc9c4adf8013dd0a3d552926e86b8e23a

Merge branch 'master' into close-index-api-refactoring

view details

Armin Braun

commit sha 02d0f163a4017a58f945fffef91183d7b2fec496

MINOR: Cleanup Dead Code in Snapshots Package (#36528)

view details

Tim Brooks

commit sha 7f612d5dd86223f5c0cb0b7c9ff6385c5075af59

Always compress based on the settings (#36522) Currently TransportRequestOptions allows specific requests to request compression. This commit removes this and always compresses based on the settings. Additionally, it removes TransportResponseOptions as they are unused. This closes #36399.

view details

Julie Tibshirani

commit sha 33152f648fce649b774fdb659bc47a7134755c60

Fix some inconsistencies in the types deprecation code. (#36517) * Make sure to test conversion for both typed and typeless HLRC requests. * Update a few more statements to deprecatedAndMaybeLog. * Make sure Rest*SearchTemplateActionTests extend RestActionTestCase.

view details

Jason Tedor

commit sha 4a8cd45cca3fb485ef916f7ee5d65f190976cf01

Avoid blocking non-reproducible randomness in test (#36561) The security documentation test uses SecureRandom#getStrongInstance. This defaults to securerandom.strongAlgorithms=NativePRNGBlocking:SUN,DRBG:SUN which means a blocking implementation that reads from /dev/random. This means that this test can stall if the entropy on the machine is exhausted. Anyway, it also means that the randomness is non-reproducible, a thing that we try to avoid in tests. This commit switches to a boring randomness source to avoid the blocking, and to keep the test reproducible.

view details

Alan Woodward

commit sha 9ac73596431cb8fabcd26855c0c1861a435f5f34

Update lucene to snapshot-7e4555a2fd (#36563) Includes the following: * Reversion of doc-values changes in LUCENE-8374; we are interested in seeing if this has an effect on benchmarks for node-stats and index-stats * More improvements to docvalues updates

view details

Julie Tibshirani

commit sha 71a39d10be8b33d63dcb12088ebf2ae81124dd6d

Make sure that BWC tests run successfully, even with types deprecation messages. (#36511)

view details

Gordon Brown

commit sha 6a824322fc5f5b96fdd211be94690ad7fdff33ff

Improve error message for deleting in-use policy (#36457) The error message used when attempting to delete a lifecycle policy that is in use previously only included one index which was using the policy. It now includes all indices using that policy.

view details

Tal Levy

commit sha 9c1cdea8391e78f3d8ced72c4164bc28f4f593bc

[cleanup] remove deprecated references to dataWithClusterFiles (#36574) data files under the cluster name subdirectory has been deprecated and was meant to be removed in 6.0. This commit removes some leftover referrences to these paths.

view details

Mayya Sharipova

commit sha b5d532f9e3d184d4bb895835a4d4fef2fb4ee0e8

Vector field (#33022) 1. Dense vector PUT dindex { "mappings": { "_doc": { "properties": { "my_vector": { "type": "dense_vector" }, "my_text" : { "type" : "keyword" } } } } } PUT dinex/_doc/1 { "my_text" : "text1", "my_vector" : [ 0.5, 10, 6 ] } 2. Sparse vector PUT sindex { "mappings": { "_doc": { "properties": { "my_vector": { "type": "sparse_vector" }, "my_text" : { "type" : "keyword" } } } } } PUT sindex/_doc/1 { "my_text" : "text1", "my_vector" : {"1": 0.5, "99": -0.5, "5": 1} }

view details

Mayya Sharipova

commit sha d40037c91e9487f1b8ccd7f2957c4b489b8f43cf

Deprecate uses of _type as a field name in queries (#36503)

view details

Tal Levy

commit sha cd1bec3a06df97a5ec7c135f475d0059dc1bee64

[refactor] add Environment in BootstrapContext (#36573) There are certain BootstrapCheck checks that may need access environment-specific values. Watcher's EncryptSensitiveDataBootstrapCheck passes in the node's environment via a constructor to bypass the shortcoming in BootstrapContext. This commit pulls in the node's environment into BootstrapContext. Another case is found in #36519, where it is useful to check the state of the data-path. Since PathUtils.get and Paths.get are forbidden APIs, we rely on the environment to retrieve references to things like node data paths. This means that the BootstrapContext will have the same Settings used in the Environment, which currently differs from the Node's settings.

view details

Boaz Leskes

commit sha f6b5d7e01387c09a449f67e2678cf852f58770b1

Add sequence numbers based optimistic concurrency control support to Engine (#36467) This commit add support to engine operations for resolving and verifying the sequence number and primary term of the last modification to a document before performing an operation. This is infrastructure to move our (optimistic concurrency control)[http://en.wikipedia.org/wiki/Optimistic_concurrency_control] API to use sequence numbers instead of internal versioning. Relates #36148 Relates #10708

view details

Tim Vernum

commit sha c650be72cfc311c29ac4f3743a42491e2571b998

[TEST] Prevent duplicate key in XContent test (#36581) It was possible to generate a response that would output duplicate keys Closes: #36473

view details

Armin Braun

commit sha 34d7cc13c1e9337348ca05b828202a6ccd3fbb3e

SETTINGS: Correctly Identify Noop Updates (#36560) * We should compare the target value with the to be applied value before interpreting the update as a change * This speeds up the test failing in #36496 considerably by preventing state updates on noop setting updates

view details

David Roberts

commit sha 13cb0fb98b12ca3e058382186f8175ab1db84717

Periodically try to reassign unassigned persistent tasks (#36069) Previously persistent task assignment was checked in the following situations: - Persistent tasks are changed - A node joins or leaves the cluster - The routing table is changed - Custom metadata in the cluster state is changed - A new master node is elected However, there could be situations when a persistent task that could not be assigned to a node could become assignable due to some other change, such as memory usage on the nodes. This change adds a timed recheck of persistent task assignment to account for such situations. The timer is suspended while checks triggered by cluster state changes are in-flight to avoid adding burden to an already busy cluster. Closes #35792

view details

push time in 3 months

issue commentapache/incubator-druid

FileRequestLogger fails when used with FilteredRequestLogger

@jon-wei I tried to reproduce this but I couldn't

    ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);

    String HOST = "localhost";
    ObjectMapper objectMapper = new ObjectMapper();
    DateTime dateTime = DateTimes.nowUtc();
    File logDir = new File("/tmp/druid-logs");
    String nativeQueryLogString = dateTime + "\t" + HOST + "\t" + "native";

    FileRequestLogger delegate = new FileRequestLogger(objectMapper, scheduler, logDir, "yyyy-MM-dd'.log'");
    FilteredRequestLoggerProvider.FilteredRequestLogger logger = new FilteredRequestLoggerProvider.FilteredRequestLogger(
            delegate,
            1000,
            900
    );
    try {
      logger.start();
    } catch (Exception e) {
      e.printStackTrace();
    }

    RequestLogLine requestLogLine = RequestLogLine.forSql(
            nativeQueryLogString,
            new HashMap<>(),
            dateTime,
            HOST,
            new QueryStats(ImmutableMap.of("sqlQuery/time", 1000))
    );

    logger.logSqlQuery(requestLogLine);

Is there something I'm missing? It writes to log file I've specified.

jon-wei

comment created time in 3 months

push eventmirkojotic/incubator-druid

Mirko Jotic

commit sha ff2d8774c2216120c6972245108e46a5006e19d6

Address comment: throw original exception.

view details

push time in 3 months

Pull request review commentapache/incubator-druid

Select query failing if miliseconds used as time for indexing

 public static DateTime utc(long instant)    public static DateTime of(String instant)   {-    return new DateTime(instant, ISOChronology.getInstanceUTC());+    try {+      return new DateTime(instant, ISOChronology.getInstanceUTC());+    }+    catch (IllegalArgumentException ex) {+      return new DateTime(Long.valueOf(instant), ISOChronology.getInstanceUTC());

An oversight on my part. I'll make the change. Thanks

mirkojotic

comment created time in 3 months

issue commentelastic/elasticsearch

[Test] Convert Pipeline agg integration tests into AggregatorTestCase

Hey @polyfractal I'm interested in taking this one on. Can you give me some more details around this task - maybe a file or two ;)

polyfractal

comment created time in 3 months

push eventmirkojotic/incubator-druid

Mirko Jotic

commit sha fe9f9af67154399866e25d31846b94fe1637cf8b

Formating correction.

view details

push time in 3 months

PR opened apache/incubator-druid

Select query failing if miliseconds used as time for indexing

If milliseconds were passed to DateTime#of as string joda would throw an Illegal Argument Exception because it expects milliseconds to be in form of a Long type. I've added a couple of tests to make sure it is working for seconds and milliseconds.

Let me know if I need to change anything.

Solves #1332

+18 -1

0 comment

2 changed files

pr created time in 3 months

push eventmirkojotic/incubator-druid

Mirko Jotic

commit sha bcb2f23e9a77e4ea29ad32e23a823e512dd0c915

[#1332] Fix - select failing if milis used for idx.

view details

push time in 3 months

fork mirkojotic/incubator-druid

Apache Druid (Incubating) - Column oriented distributed data store ideal for powering interactive applications

http://druid.io

fork in 3 months

more