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

Upgrade the exporter to support OpenSearch 2.9.0 #203

Closed
wants to merge 1 commit into from

Conversation

vinylen
Copy link
Contributor

@vinylen vinylen commented Jul 25, 2023

Description

Simple version change to support OpenSearch 2.9.0


  • All my commits include DCO.
    DCO stands for Developer Certificate of Origin and it is your declaration that your contribution is correctly attributed and licensed. Please read more about how to attach DCO to your commits here (spoiler alert: in most cases it is as simple as using -s option when doing git commit).
    Please be aware that commits without DCO will cause failure of PR CI workflow and can not be merged.

Signed-off-by: Victor <victor.nilsson@etraveligroup.com>
@lukas-vlcek
Copy link
Collaborator

@vinylen Did you have a chance to check what is wrong with the upgrade? I will be back in office on Monday so I will have a look but does it pass on your end?

./gradlew clean build

@vinylen
Copy link
Contributor Author

vinylen commented Jul 28, 2023

@lukas-vlcek I'm sorry i'm no Java developer so i don't really understand what is going wrong. I ran a local nix-shell with gradle + openjdk and got this output when running the command ./gradlew clean build:

Welcome to Gradle 8.1.1!

Here are the highlights of this release:
 - Stable configuration cache
 - Experimental Kotlin DSL assignment syntax
 - Building with Java 20

For more details see https://docs.gradle.org/8.1.1/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

> Configure project :
Identifing version of OpenSearch based on plugin version
- OpenSearch version: 2.9.0
- Prometheus exporter plugin version: 2.9.0.0
=======================================
OpenSearch Build Hamster says Hello!
  Gradle Version        : 8.1.1
  OS Info               : Linux 6.4.4-200.fc38.x86_64 (amd64)
  JDK Version           : 19 (N/A JDK)
  JAVA_HOME             : /nix/store/2gbq413gml7igp533v3397vbrzd24xyb-openjdk-19.0.2+7/lib/openjdk
  Random Testing Seed   : C1E18E185A24E72D
  In FIPS 140 mode      : false
=======================================

> Task :clean UP-TO-DATE
> Task :generateNotice

> Task :compileJava
/var/home/vicnil/repos/personal/prometheus-exporter-plugin-for-opensearch/src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java:642: error: cannot find symbol
            catalog.setNodeGauge(nodeInfo, "ingest_total_count", is.getTotalStats().getIngestCount());
                                                                                   ^
  symbol:   method getIngestCount()
  location: class OperationStats
/var/home/vicnil/repos/personal/prometheus-exporter-plugin-for-opensearch/src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java:643: error: cannot find symbol
            catalog.setNodeGauge(nodeInfo, "ingest_total_time_seconds", is.getTotalStats().getIngestTimeInMillis() / 1000.0);
                                                                                          ^
  symbol:   method getIngestTimeInMillis()
  location: class OperationStats
/var/home/vicnil/repos/personal/prometheus-exporter-plugin-for-opensearch/src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java:644: error: cannot find symbol
            catalog.setNodeGauge(nodeInfo, "ingest_total_current", is.getTotalStats().getIngestCurrent());
                                                                                     ^
  symbol:   method getIngestCurrent()
  location: class OperationStats
/var/home/vicnil/repos/personal/prometheus-exporter-plugin-for-opensearch/src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java:645: error: cannot find symbol
            catalog.setNodeGauge(nodeInfo, "ingest_total_failed_count", is.getTotalStats().getIngestFailedCount());
                                                                                          ^
  symbol:   method getIngestFailedCount()
  location: class OperationStats
/var/home/vicnil/repos/personal/prometheus-exporter-plugin-for-opensearch/src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java:649: error: cannot find symbol
                catalog.setNodeGauge(nodeInfo, "ingest_pipeline_total_count", st.getStats().getIngestCount(), pipeline);
                                                                                           ^
  symbol:   method getIngestCount()
  location: class OperationStats
/var/home/vicnil/repos/personal/prometheus-exporter-plugin-for-opensearch/src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java:650: error: cannot find symbol
                catalog.setNodeGauge(nodeInfo, "ingest_pipeline_total_time_seconds", st.getStats().getIngestTimeInMillis() / 1000.0, pipeline);
                                                                                                  ^
  symbol:   method getIngestTimeInMillis()
  location: class OperationStats
/var/home/vicnil/repos/personal/prometheus-exporter-plugin-for-opensearch/src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java:651: error: cannot find symbol
                catalog.setNodeGauge(nodeInfo, "ingest_pipeline_total_current", st.getStats().getIngestCurrent(), pipeline);
                                                                                             ^
  symbol:   method getIngestCurrent()
  location: class OperationStats
/var/home/vicnil/repos/personal/prometheus-exporter-plugin-for-opensearch/src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java:652: error: cannot find symbol
                catalog.setNodeGauge(nodeInfo, "ingest_pipeline_total_failed_count", st.getStats().getIngestFailedCount(), pipeline);
                                                                                                  ^
  symbol:   method getIngestFailedCount()
  location: class OperationStats
/var/home/vicnil/repos/personal/prometheus-exporter-plugin-for-opensearch/src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java:658: error: cannot find symbol
                        catalog.setNodeGauge(nodeInfo, "ingest_pipeline_processor_total_count", ps.getStats().getIngestCount(), pipeline, processor);
                                                                                                             ^
  symbol:   method getIngestCount()
  location: class OperationStats
/var/home/vicnil/repos/personal/prometheus-exporter-plugin-for-opensearch/src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java:659: error: cannot find symbol
                        catalog.setNodeGauge(nodeInfo, "ingest_pipeline_processor_total_time_seconds", ps.getStats().getIngestTimeInMillis() / 1000.0, pipeline, processor);
                                                                                                                    ^
  symbol:   method getIngestTimeInMillis()
  location: class OperationStats
/var/home/vicnil/repos/personal/prometheus-exporter-plugin-for-opensearch/src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java:660: error: cannot find symbol
                        catalog.setNodeGauge(nodeInfo, "ingest_pipeline_processor_total_current", ps.getStats().getIngestCurrent(), pipeline, processor);
                                                                                                               ^
  symbol:   method getIngestCurrent()
  location: class OperationStats
/var/home/vicnil/repos/personal/prometheus-exporter-plugin-for-opensearch/src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java:661: error: cannot find symbol
                        catalog.setNodeGauge(nodeInfo, "ingest_pipeline_processor_total_failed_count", ps.getStats().getIngestFailedCount(), pipeline, processor);
                                                                                                                    ^
  symbol:   method getIngestFailedCount()
  location: class OperationStats
/var/home/vicnil/repos/personal/prometheus-exporter-plugin-for-opensearch/src/main/java/org/compuscene/metrics/prometheus/PrometheusSettings.java:167: error: cannot find symbol
        return Strings.splitStringByCommaToArray(this.selectedIndices);
                      ^
  symbol:   method splitStringByCommaToArray(String)
  location: class Strings
13 errors

> Task :compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/8.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 31s
3 actionable tasks: 2 executed, 1 up-to-date

@lukas-vlcek
Copy link
Collaborator

There are some breaking changes in OpenSearch 2.9.0. I will be pushing new commits to this PR to fix it.

@lukas-vlcek
Copy link
Collaborator

@vinylen Can you please give me privs so that I can add commits to your PR?

git push vinylen remotes/vinylen/2.9.0 
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
To github.com:vinylen/prometheus-exporter-plugin-for-opensearch.git
 ! [remote rejected] vinylen/2.9.0 -> vinylen/2.9.0 (permission denied)
error: failed to push some refs to 'github.com:vinylen/prometheus-exporter-plugin-for-opensearch.git'

Or I will have to open a new PR on my side (though I will use your upgrade commit I still prefer pushing to your PR).

@vinylen
Copy link
Contributor Author

vinylen commented Jul 31, 2023

@lukas-vlcek I'm sorry, I'm away on vacation and I don't have my laptop with me. I tried to find something to change in GitHub mobile but I can't find anything.

Looks like you might have to add your own PR, if you do, you are free to close this PR.

Sorry for the inconvenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants