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

allow for json/ndjson content type with charset #32767

Merged
merged 6 commits into from
Aug 25, 2022
Merged

allow for json/ndjson content type with charset #32767

merged 6 commits into from
Aug 25, 2022

Conversation

aspacca
Copy link
Contributor

@aspacca aspacca commented Aug 23, 2022

Enhancement

What does this PR do?

Why is it important?

see: https:/elastic/enhancements/issues/16194

Checklist

  • My code follows the style guidelines of this project
    - [ ] I have commented my code, particularly in hard-to-understand areas
    - [ ] I have made corresponding changes to the documentation
    - [ ] I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Closes https:/elastic/enhancements/issues/16194

Use cases

Screenshots

Logs

@aspacca aspacca requested a review from a team August 23, 2022 02:00
@aspacca aspacca requested a review from a team as a code owner August 23, 2022 02:00
@aspacca aspacca self-assigned this Aug 23, 2022
@aspacca aspacca requested review from fearful-symmetry and leehinman and removed request for a team August 23, 2022 02:00
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 23, 2022
@aspacca aspacca added the Team:Cloud-Monitoring Label for the Cloud Monitoring team label Aug 23, 2022
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Aug 23, 2022
@mergify
Copy link
Contributor

mergify bot commented Aug 23, 2022

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @aspacca? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@aspacca aspacca added the backport-v8.4.0 Automated backport with mergify label Aug 23, 2022
@elasticmachine
Copy link
Collaborator

elasticmachine commented Aug 23, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-08-25T01:51:44.795+0000

  • Duration: 133 min 19 sec

Test stats 🧪

Test Results
Failed 0
Passed 4403
Skipped 338
Total 4741

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@@ -328,11 +325,19 @@ func uploadS3TestFiles(t *testing.T, region, bucket string, filenames ...string)
t.Fatalf("Failed to open file %q, %v", filename, err)
}

contentType := ""
if strings.HasSuffix(filename, "ndjson") || strings.HasSuffix(filename, "ndjson.gz") {
contentType = "let-CI-fail-" + contentTypeNDJSON + "; charset=UTF-8"
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the reason for this let-CI-fail?

Copy link
Contributor Author

@aspacca aspacca Aug 23, 2022

Choose a reason for hiding this comment

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

I wanted to asses that the integration tests were run in CI, forcing a failure

they don't: CI is green anyway

(having let-CI-fail- as suffix https:/elastic/beats/pull/32767/files#diff-f345fd6a1f5ea9523117d4ead2e5f1d13fb82eb1c65a089fd34fcdd514916a96R156 will be false)

@mergify
Copy link
Contributor

mergify bot commented Aug 23, 2022

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b enhancements-16194 upstream/enhancements-16194
git merge upstream/main
git push upstream enhancements-16194

Copy link
Contributor

@kaiyan-sheng kaiyan-sheng left a comment

Choose a reason for hiding this comment

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

LGTM

@kaiyan-sheng
Copy link
Contributor

Do we also need to backport it to 7.17?

@aspacca
Copy link
Contributor Author

aspacca commented Aug 25, 2022

Do we also need to backport it to 7.17?

I didn't backport to 7.17 since it's a different code base now (aws sdk v2 upgrade)

I will create a new PR for that, thanks for reminding me

@aspacca
Copy link
Contributor Author

aspacca commented Aug 25, 2022

I didn't backport to 7.17 since it's a different code base now (aws sdk v2 upgrade)

it seems the lines affected didn't change, so I will add the backport label here

@aspacca aspacca added the backport-7.17 Automated backport to the 7.17 branch with mergify label Aug 25, 2022
@aspacca aspacca merged commit b40349c into elastic:main Aug 25, 2022
mergify bot pushed a commit that referenced this pull request Aug 25, 2022
* allow for json/ndjson content type with charset

* add '; charset=UTF-8' in integration tests

* changelog

* assessing CI

* revert correct behaviour

(cherry picked from commit b40349c)

# Conflicts:
#	x-pack/filebeat/input/awss3/input_integration_test.go
mergify bot pushed a commit that referenced this pull request Aug 25, 2022
* allow for json/ndjson content type with charset

* add '; charset=UTF-8' in integration tests

* changelog

* assessing CI

* revert correct behaviour

(cherry picked from commit b40349c)
aspacca pushed a commit that referenced this pull request Aug 25, 2022
…et (#32834)

* allow for json/ndjson content type with charset (#32767)

* allow for json/ndjson content type with charset

* add '; charset=UTF-8' in integration tests

* changelog

* assessing CI

* revert correct behaviour

(cherry picked from commit b40349c)

# Conflicts:
#	x-pack/filebeat/input/awss3/input_integration_test.go

* fix backport conflicts

Co-authored-by: Andrea Spacca <[email protected]>
aspacca pushed a commit that referenced this pull request Aug 25, 2022
#32835)

* allow for json/ndjson content type with charset (#32767)

* allow for json/ndjson content type with charset

* add '; charset=UTF-8' in integration tests

* changelog

* assessing CI

* revert correct behaviour

(cherry picked from commit b40349c)

* fix backport conflicts

Co-authored-by: Andrea Spacca <[email protected]>
v1v added a commit to v1v/beats that referenced this pull request Sep 1, 2022
…ackaging

* upstream/main: (109 commits)
  Add cap_net_raw requirements to heartbeat docs (elastic#32816)
  apply a quick hotfix for having main working properly (elastic#32934)
  action: checks for x-pack/libbeat and libbeat (elastic#32754)
  Update to Go 1.18 in go.mod. (elastic#32940)
  [heartbeat] disable browser code on windows via build tags (elastic#32939)
  action: checks for heartbeat and x-pack/heartbeat (elastic#32749)
  Make event acknowledgment asynchronous in shipper output (elastic#32785)
  [Automation] Update elastic stack version to 8.5.0-fedc3e60 for testing (elastic#32930)
  Preallocate memory to reduce GC load (elastic#32905)
  [Automation] Update elastic stack version to 8.5.0-440e0896 for testing (elastic#32919)
  Skip broken ceph tests. (elastic#32912)
  Use non-deprecated docker image for testing jolokia (elastic#32885)
  update ironbank image product name (elastic#32867)
  ci: pre-commit stage within Jenkins (elastic#32839)
  Fix a couple of bugs in the logic for how AWS metric periods are calculated (elastic#32724)
  [Filebeat] [httpjson] Add support for single string containing multiple relation-types in getRFC5988Link (elastic#32811)
  [Heartbeat] Update HB k8s template to use <Mi> metric (elastic#32801)
  action: checks for metricbeat and x-pack/metricbeat (elastic#32748)
  action: checks for filebeat and x-pack/filebeat (elastic#32746)
  allow for json/ndjson content type with charset (elastic#32767)
  ...
chrisberkhout pushed a commit that referenced this pull request Jun 1, 2023
* allow for json/ndjson content type with charset

* add '; charset=UTF-8' in integration tests

* changelog

* assessing CI

* revert correct behaviour
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-7.17 Automated backport to the 7.17 branch with mergify backport-v8.4.0 Automated backport with mergify Team:Cloud-Monitoring Label for the Cloud Monitoring team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants