question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[REMOVE] Remove from scripts the deprecated methods of JodaCompatibleZonedDateTime

See original GitHub issue

Is your feature request related to a problem? Please describe.

There are number of deprecated methods in JodaCompatibleZonedDateTime which are still available in scripts. Those should be removed since in some cases they pose significant performance overhead (due to deprecation warnings).

Describe the solution you’d like Remove from scripts the deprecated methods from JodaCompatibleZonedDateTime.

Describe alternatives you’ve considered

Leave the methods there.

Additional context

See please https://github.com/opensearch-project/OpenSearch/issues/3156 and https://github.com/opensearch-project/OpenSearch/issues/3345

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kavillacommented, May 19, 2022

Absolutely, first of all, there are deprecation warnings in logs:

Yeah, unfortunately for end users that purely use OpenSearch Dashboards to build these scripts wouldn’t be able to see these messages unless they look at their logs as you stated which might not be likely. And do we know if these warning messages are enabled by default in a release (production) environment? And if it has gotten removed then when 3.0 comes then might wonder why their painless scripts no longer work.

I think we we can flag the original PR with “needs-documentation” it will create an issue in the documentation website repo to add these details. I think we need painless scripts logs in general and we can include the this was removed in 3.0 sections or will be removed in 3.0

cc: @ahopp, @saratvemulapalli

0reactions
kavillacommented, May 20, 2022

With https://github.com/opensearch-project/OpenSearch-Dashboards/pull/1607, I have updated the stuff we utilized for sample data and tests so I have removed the bug label and re-added the enhancement to ensure end-users don’t get left with just an error message.

Right now, we don’t have a lot of control of the actual values within scripted fields and I wouldn’t recommend changing this value. However, based on the above mention PR’d this is an example of the kind of impact end-users will have to do if they utilized scripted fields (which is a huge feature in the application) and they are using deprecated methods that were removed.

Since this is a breaking change on the OpenSearch side, and the deprecation message has been obfuscated by OpenSearch Dashboards not outputting it to the screen. Users would have had to check their logs to see they should have been using a different method, which isn’t likely if everything is working properly.

I would prefer we give in application notification about the removal of deprecated methods in Painless Scripts and provide a link to some view that’s like if using x then use y or something like that which is why I tagged @opensearch-project/opensearch-ux to see if they could provide some help with this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[FEATURE] Remove deprecated methods from ... - GitHub
Is your feature request related to a problem? Please describe. Remove deprecated methods from JodaCompatibleZonedDateTime which are called by scripts.
Read more >
How To replace depricated Joda dateformats using toString ...
Elastic Search Painless scripts returns a warning that a date format using date.toString('HH') will be Deprecated. Following warning: ...
Read more >
Deprecated List (server 6.5.3 API) - Javadoc.io
Deprecated API. Contents ... org.elasticsearch.script. ... this method will be removed in a future version; use ShapeParser.parse instead.
Read more >
Elasticsearch version 7.0.0 | Elasticsearch Guide [7.17] | Elastic
Remove deprecated AnalysisPlugin#requriesAnalysisSettings method #32037 (issue: #32025). Features/Java High Level REST Client. Drop deprecated methods from ...
Read more >
Deprecated List (server 7.14.0 API)
Methods. Method. Description. org.apache.lucene.queries.BlendedTermQuery. ... Types are deprecated and are in the process of being removed.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found