Skip to content

Conversation

@timroes
Copy link
Contributor

@timroes timroes commented Jul 20, 2018

Due to elastic/elasticsearch#32207 our functional tests started failing on master.

This PR changes the scripted field, that was failing to do the appropriate check if an actual value is present in the document.

@timroes timroes added bug Fixes for quality problems that affect the customer experience :Management v7.0.0 labels Jul 20, 2018
Copy link
Contributor

@bmcconaghy bmcconaghy left a comment

Choose a reason for hiding this comment

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

LGTM

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

lgtm
code review

Throwing an error for missing fields is a huge change that is going to cause a lot of upgrade pain for customers. Any reason why ES made this change?

@nreese
Copy link
Contributor

nreese commented Jul 20, 2018

Looks like the new script does not compile. Needs to be changed to

        if (doc['machine.ram'].size() == 0) {
          return -1;
        } else {
          return doc['machine.ram'].value / (1024 * 1024 * 1024);
        }

I removed the / and there was a extra tick after "1024)"

const script = `if (doc[\'machine.ram\'].size() == 0) {
return -1;
} else {
return doc[\'machine.ram\'].value / (1024 * 1024 * 1024)';
Copy link
Contributor

Choose a reason for hiding this comment

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

There is an extra ' at the end of this line that is invalid

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

LGTM thanks for hopping on this so quickly everyone.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@cjcenizal
Copy link
Contributor

Retest

@cjcenizal
Copy link
Contributor

The CI failed on X-Pack:

15:11:17    │ proc  [ftr]          └- ✖ fail: "security app Management Security navigation Can navigate to edit user section"
15:11:17    │ proc  [ftr]          │        tryForTime timeout: NoSuchElement: An element could not be located on the page using the given search parameters.

image

@nreese
Copy link
Contributor

nreese commented Jul 20, 2018

Retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@cjcenizal
Copy link
Contributor

We made it!

@nreese nreese merged commit 0dbaf65 into elastic:master Jul 20, 2018
nreese pushed a commit to nreese/kibana that referenced this pull request Jul 20, 2018
* Change painless scripted field

* Remove wrong char

* Remove invalid escape chars
@nreese nreese added the v6.4.0 label Jul 20, 2018
nreese added a commit that referenced this pull request Jul 20, 2018
* Change painless scripted field

* Remove wrong char

* Remove invalid escape chars
@timroes timroes deleted the fix-es-change branch July 23, 2018 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Fixes for quality problems that affect the customer experience v6.4.0 v7.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants