logstash-output-opensearch 2.0.0-java → 2.0.1-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 567e7fbd1e9d9e3ca660d5b40c2bfd12e6f7e9504e65f26beeef04834e5c636a
4
- data.tar.gz: d1d6c1bf7eb003d32cea988c5ed7bea367213fd8e344e987a9989bc414e22192
3
+ metadata.gz: e66800b300125b8b99d1425526e5f0f7661303b7a56dd25e6177a0780b9d5631
4
+ data.tar.gz: 77228ee0c56dca37f849023fa2159c52c4125b1dbf9fda6cf269ec489417d0d7
5
5
  SHA512:
6
- metadata.gz: 1c1ba6f915936dde9d654b5883645bd818cb46fad5c821ec4cf7c87cd250a5bf489957f6f4308aa29ed4e5b0f214b2ae1a4f9195d5d022835610ff8f6e21e3c3
7
- data.tar.gz: d585a0bafbe30f63411eaa9a733505a49990f86c092e2a6a0a36170d017ff3bc3cc088dc2cd11e77204d5d921867158c258146c6ce0cad10ee25622c703cd2a6
6
+ metadata.gz: 9ee5db1f3d9ed8275a3329538d2b82c8a30db156c375fed8d250874511a29da8fe020019fb4b106caf42c3d0ad9b7c8136aa3312d307b45047930dceae0eebd4
7
+ data.tar.gz: bfa35bf7dd1e5621cf04f7a5b8f9d79d4bdbda2529f1d7cd697a6723b3487cb507079acc89dee1e075309b80eccd72984bffc3c96bcb23a2cc7a1739d68da592
checksums.yaml.gz.sig CHANGED
Binary file
data/MAINTAINERS.md CHANGED
@@ -1,74 +1,14 @@
1
- - [Overview](#overview)
2
- - [Current Maintainers](#current-maintainers)
3
- - [Maintainer Responsibilities](#maintainer-responsibilities)
4
- - [Uphold Code of Conduct](#uphold-code-of-conduct)
5
- - [Prioritize Security](#prioritize-security)
6
- - [Review Pull Requests](#review-pull-requests)
7
- - [Triage Open Issues](#triage-open-issues)
8
- - [Be Responsive](#be-responsive)
9
- - [Maintain Overall Health of the Repo](#maintain-overall-health-of-the-repo)
10
- - [Use Semver](#use-semver)
11
- - [Release Frequently](#release-frequently)
12
- - [Promote Other Maintainers](#promote-other-maintainers)
13
-
14
1
  ## Overview
15
2
 
16
- This document explains who the maintainers are (see below), what they do in this repo, and how they should be doing it. If you're interested in contributing, see [CONTRIBUTING](CONTRIBUTING.md).
3
+ This document contains a list of maintainers in this repo. See [opensearch-project/.github/RESPONSIBILITIES.md](https://github.com/opensearch-project/.github/blob/main/RESPONSIBILITIES.md#maintainer-responsibilities) that explains what the role of maintainer means, what maintainers do in this and other repos, and how they should be doing it. If you're interested in contributing, and becoming a maintainer, see [CONTRIBUTING](CONTRIBUTING.md).
17
4
 
18
5
  ## Current Maintainers
19
6
 
20
- | Maintainer | GitHub ID | Affiliation |
21
- | ------------------------ | --------------------------------------- | ----------- |
22
- | Jack Mazanec | [jmazanec15](https://github.com/jmazanec15) | Amazon |
23
- | Vamshi Vijay Nakkirtha | [vamshin](https://github.com/vamshin) | Amazon |
24
- | Vijayan Balasubramanian | [VijayanB](https://github.com/VijayanB) | Amazon |
25
- | Deep Datta | [deepdatta](https://github.com/deepdatta) | Amazon |
26
- | David Venable | [dlvenable](https://github.com/dlvenable) | Amazon |
27
- | Shivani Shukla | [sshivanii](https://github.com/sshivanii) | Amazon |
28
-
29
- ## Maintainer Responsibilities
30
-
31
- Maintainers are active and visible members of the community, and have [maintain-level permissions on a repository](https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization). Use those privileges to serve the community and evolve code as follows.
32
-
33
- ### Uphold Code of Conduct
34
-
35
- Model the behavior set forward by the [Code of Conduct](CODE_OF_CONDUCT.md) and raise any violations to other maintainers and admins.
36
-
37
- ### Prioritize Security
38
-
39
- Security is your number one priority. Maintainer's Github keys must be password protected securely and any reported security vulnerabilities are addressed before features or bugs.
40
-
41
- Note that this repository is monitored and supported 24/7 by Amazon Security, see [Reporting a Vulnerability](SECURITY.md) for details.
42
-
43
- ### Review Pull Requests
44
-
45
- Review pull requests regularly, comment, suggest, reject, merge and close. Accept only high quality pull-requests. Provide code reviews and guidance on incomming pull requests. Don't let PRs be stale and do your best to be helpful to contributors.
46
-
47
- ### Triage Open Issues
48
-
49
- Manage labels, review issues regularly, and triage by labelling them.
50
-
51
- All repositories in this organization have a standard set of labels, including `bug`, `documentation`, `duplicate`, `enhancement`, `good first issue`, `help wanted`, `blocker`, `invalid`, `question`, `wontfix`, and `untriaged`, along with release labels, such as `v1.0.0`, `v1.1.0` and `v2.0.0`, and `backport`.
52
-
53
- Use labels to target an issue or a PR for a given release, add `help wanted` to good issues for new community members, and `blocker` for issues that scare you or need immediate attention. Request for more information from a submitter if an issue is not clear. Create new labels as needed by the project.
54
-
55
- ### Be Responsive
56
-
57
- Respond to enhancement requests, and forum posts. Allocate time to reviewing and commenting on issues and conversations as they come in.
58
-
59
- ### Maintain Overall Health of the Repo
60
-
61
- Keep the `main` branch at production quality at all times. Backport features as needed. Cut release branches and tags to enable future patches.
62
-
63
- ### Use Semver
64
-
65
- Use and enforce [semantic versioning](https://semver.org/) and do not let breaking changes be made outside of major releases.
66
-
67
- ### Release Frequently
68
-
69
- Make frequent project releases to the community.
70
-
71
- ### Promote Other Maintainers
72
-
73
- Assist, add, and remove [MAINTAINERS](MAINTAINERS.md). Exercise good judgement, and propose high quality contributors to become co-maintainers.
74
-
7
+ | Maintainer | GitHub ID | Affiliation |
8
+ | ----------------------- | ------------------------------------------- | ----------- |
9
+ | Jack Mazanec | [jmazanec15](https://github.com/jmazanec15) | Amazon |
10
+ | Vamshi Vijay Nakkirtha | [vamshin](https://github.com/vamshin) | Amazon |
11
+ | Vijayan Balasubramanian | [VijayanB](https://github.com/VijayanB) | Amazon |
12
+ | Deep Datta | [deepdatta](https://github.com/deepdatta) | Amazon |
13
+ | David Venable | [dlvenable](https://github.com/dlvenable) | Amazon |
14
+ | Shivani Shukla | [sshivanii](https://github.com/sshivanii) | Amazon |
data/README.md CHANGED
@@ -18,7 +18,7 @@ The logstash-output-opensearch plugin helps to ship events from Logstash to Open
18
18
  ## Project Resources
19
19
 
20
20
  * [Project Website](https://opensearch.org/)
21
- * [Detailed Documentation](https://opensearch.org/docs/latest/clients/logstash/ship-to-opensearch/#opensearch-output-plugin)
21
+ * [Detailed Documentation](https://opensearch.org/docs/latest/tools/logstash/ship-to-opensearch/)
22
22
  * [Logstash Overview](https://opensearch.org/docs/clients/logstash/index/)
23
23
  * [Developer Guide](DEVELOPER_GUIDE.md)
24
24
  * Need help? Try [Forums](https://discuss.opendistrocommunity.dev/)
data/RELEASING.md CHANGED
@@ -33,4 +33,8 @@ Repositories create consistent release labels, such as `v1.0.0`, `v1.1.0` and `v
33
33
 
34
34
  The release process is standard across repositories in this org and is run by a release manager volunteering from amongst [MAINTAINERS](MAINTAINERS.md).
35
35
 
36
- TODO
36
+ 1. Create a tag, e.g. 1.0.0, and push it to this GitHub repository.
37
+ 1. The [release-drafter.yml](.github/workflows/release-drafter.yml) will be automatically kicked off and a draft release will be created.
38
+ 1. This draft release triggers the [jenkins release workflow](https://build.ci.opensearch.org/job/logstash-ouput-opensearch-release) as a As a result of which the logstash-output-plugin is released on [rubygems.org](https://rubygems.org/gems/logstash-output-opensearch). Please note that the release workflow is triggered only if created release is in draft state.
39
+ 1. Once the above release workflow is successful, the drafted release on GitHub is published automatically.
40
+ 1. Increment "version" in [logstash-output-opensearch.gemspec](./logstash-output-opensearch.gemspec) to the next iteration, e.g. 1.0.1.
@@ -107,7 +107,6 @@ module LogStash; module Outputs; class OpenSearch;
107
107
 
108
108
  body_stream = StringIO.new
109
109
  if http_compression
110
- body_stream.set_encoding "BINARY"
111
110
  stream_writer = gzip_writer(body_stream)
112
111
  else
113
112
  stream_writer = body_stream
@@ -126,9 +125,24 @@ module LogStash; module Outputs; class OpenSearch;
126
125
  :payload_size => stream_writer.pos,
127
126
  :content_length => body_stream.size,
128
127
  :batch_offset => (index + 1 - batch_actions.size))
128
+
129
+ # Have to close gzip writer before reading from body_stream; otherwise stream doesn't end properly
130
+ # and will cause server side error
131
+ if http_compression
132
+ stream_writer.close
133
+ end
134
+
129
135
  bulk_responses << bulk_send(body_stream, batch_actions)
130
- body_stream.truncate(0) && body_stream.seek(0)
131
- stream_writer = gzip_writer(body_stream) if http_compression
136
+
137
+ if http_compression
138
+ # Get a new StringIO object and gzip writer
139
+ body_stream = StringIO.new
140
+ stream_writer = gzip_writer(body_stream)
141
+ else
142
+ # Clear existing StringIO object and reuse existing stream writer
143
+ body_stream.truncate(0) && body_stream.seek(0)
144
+ end
145
+
132
146
  batch_actions.clear
133
147
  end
134
148
  stream_writer.write(as_json)
@@ -149,6 +163,7 @@ module LogStash; module Outputs; class OpenSearch;
149
163
  fail(ArgumentError, "Cannot create gzip writer on IO with unread bytes") unless io.eof?
150
164
  fail(ArgumentError, "Cannot create gzip writer on non-empty IO") unless io.pos == 0
151
165
 
166
+ io.set_encoding "BINARY"
152
167
  Zlib::GzipWriter.new(io, Zlib::DEFAULT_COMPRESSION, Zlib::DEFAULT_STRATEGY)
153
168
  end
154
169
 
@@ -11,7 +11,7 @@ signing_key_path = "gem-private_key.pem"
11
11
 
12
12
  Gem::Specification.new do |s|
13
13
  s.name = 'logstash-output-opensearch'
14
- s.version = '2.0.0'
14
+ s.version = '2.0.1'
15
15
 
16
16
  s.licenses = ['Apache-2.0']
17
17
  s.summary = "Stores logs in OpenSearch"
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-opensearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
@@ -31,7 +31,7 @@ cert_chain:
31
31
  r+j7FLyKuk5DzIxiCp8QN5dU71BbGUmsHf/C5UV76WLPOFX/szeaHhPwpjR3sK7r
32
32
  5zLgCV1KP7cgDdCYMlmZGeSViU8NV+Yy8/ghrzGpqVw=
33
33
  -----END CERTIFICATE-----
34
- date: 2022-09-06 00:00:00.000000000 Z
34
+ date: 2023-02-02 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  requirement: !ruby/object:Gem::Requirement
@@ -56,23 +56,23 @@ dependencies:
56
56
  - !ruby/object:Gem::Dependency
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '0.0'
62
59
  - - ">="
63
60
  - !ruby/object:Gem::Version
64
61
  version: 0.0.17
62
+ - - "~>"
63
+ - !ruby/object:Gem::Version
64
+ version: '0.0'
65
65
  name: stud
66
66
  prerelease: false
67
67
  type: :runtime
68
68
  version_requirements: !ruby/object:Gem::Requirement
69
69
  requirements:
70
- - - "~>"
71
- - !ruby/object:Gem::Version
72
- version: '0.0'
73
70
  - - ">="
74
71
  - !ruby/object:Gem::Version
75
72
  version: 0.0.17
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.0'
76
76
  - !ruby/object:Gem::Dependency
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
@@ -124,23 +124,23 @@ dependencies:
124
124
  - !ruby/object:Gem::Dependency
125
125
  requirement: !ruby/object:Gem::Requirement
126
126
  requirements:
127
- - - "~>"
128
- - !ruby/object:Gem::Version
129
- version: '2'
130
127
  - - ">="
131
128
  - !ruby/object:Gem::Version
132
129
  version: 2.3.0
130
+ - - "~>"
131
+ - !ruby/object:Gem::Version
132
+ version: '2'
133
133
  name: json
134
134
  prerelease: false
135
135
  type: :runtime
136
136
  version_requirements: !ruby/object:Gem::Requirement
137
137
  requirements:
138
- - - "~>"
139
- - !ruby/object:Gem::Version
140
- version: '2'
141
138
  - - ">="
142
139
  - !ruby/object:Gem::Version
143
140
  version: 2.3.0
141
+ - - "~>"
142
+ - !ruby/object:Gem::Version
143
+ version: '2'
144
144
  - !ruby/object:Gem::Dependency
145
145
  requirement: !ruby/object:Gem::Requirement
146
146
  requirements:
@@ -244,12 +244,6 @@ files:
244
244
  - lib/logstash/outputs/opensearch/templates/ecs-disabled/2x_index.json
245
245
  - lib/logstash/outputs/opensearch/templates/ecs-disabled/7x.json
246
246
  - lib/logstash/outputs/opensearch/templates/ecs-disabled/7x_index.json
247
- - lib/logstash/outputs/opensearch/templates/ecs-v1/1x.json
248
- - lib/logstash/outputs/opensearch/templates/ecs-v1/1x_index.json
249
- - lib/logstash/outputs/opensearch/templates/ecs-v1/2x.json
250
- - lib/logstash/outputs/opensearch/templates/ecs-v1/2x_index.json
251
- - lib/logstash/outputs/opensearch/templates/ecs-v1/7x.json
252
- - lib/logstash/outputs/opensearch/templates/ecs-v1/7x_index.json
253
247
  - lib/logstash/outputs/opensearch/templates/ecs-v8/1x.json
254
248
  - lib/logstash/outputs/opensearch/templates/ecs-v8/1x_index.json
255
249
  - lib/logstash/outputs/opensearch/templates/ecs-v8/2x.json
@@ -313,8 +307,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
313
307
  - !ruby/object:Gem::Version
314
308
  version: '0'
315
309
  requirements: []
316
- rubyforge_project:
317
- rubygems_version: 2.7.10
310
+ rubygems_version: 3.3.25
318
311
  signing_key:
319
312
  specification_version: 4
320
313
  summary: Stores logs in OpenSearch
metadata.gz.sig CHANGED
Binary file