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

[filebeat][httpjson] Set url as a pointer to ensure access to all methods #28695

Merged
merged 3 commits into from
Oct 28, 2021

Conversation

marc-gr
Copy link
Contributor

@marc-gr marc-gr commented Oct 28, 2021

What does this PR do?

Change how url is stored in the request context, from value to pointer.

Why is it important?

In templates methods with a pointer receiver are not available if the variable is passed by value, making access to .url.Query and others impossible.

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.

@marc-gr marc-gr added bug Team:Security-External Integrations backport-v7.15.0 Automated backport with mergify backport-v7.16.0 Automated backport with mergify labels Oct 28, 2021
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 28, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Oct 28, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Oct 28, 2021

💚 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: 2021-10-28T12:32:42.431+0000

  • Duration: 97 min 14 sec

  • Commit: 49a5573

Test stats 🧪

Test Results
Failed 0
Passed 7910
Skipped 1201
Total 9111

💚 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.

@marc-gr marc-gr merged commit 47dba85 into elastic:master Oct 28, 2021
@marc-gr marc-gr deleted the fix-httpjson-tpl-ctx branch October 28, 2021 14:11
mergify bot pushed a commit that referenced this pull request Oct 28, 2021
…hods (#28695)

* Set url as a pointer to ensure access to all methods

* Add changelog line

* Fix text

(cherry picked from commit 47dba85)
mergify bot pushed a commit that referenced this pull request Oct 28, 2021
…hods (#28695)

* Set url as a pointer to ensure access to all methods

* Add changelog line

* Fix text

(cherry picked from commit 47dba85)
marc-gr added a commit that referenced this pull request Oct 29, 2021
…hods (#28695) (#28699)

* Set url as a pointer to ensure access to all methods

* Add changelog line

* Fix text

(cherry picked from commit 47dba85)

Co-authored-by: Marc Guasch <[email protected]>
marc-gr added a commit that referenced this pull request Oct 29, 2021
…hods (#28695) (#28698)

* Set url as a pointer to ensure access to all methods

* Add changelog line

* Fix text

(cherry picked from commit 47dba85)

Co-authored-by: Marc Guasch <[email protected]>
Icedroid pushed a commit to Icedroid/beats that referenced this pull request Nov 1, 2021
…hods (elastic#28695)

* Set url as a pointer to ensure access to all methods

* Add changelog line

* Fix text
@marc-gr marc-gr added backport-v8.0.0 Automated backport with mergify backport-v8.1.0 Automated backport with mergify backport-v8.2.0 Automated backport with mergify labels Feb 22, 2022
@marc-gr
Copy link
Contributor Author

marc-gr commented Feb 22, 2022

@Mergifyio refresh

@mergify
Copy link
Contributor

mergify bot commented Feb 22, 2022

refresh

✅ Pull request refreshed

@marc-gr
Copy link
Contributor Author

marc-gr commented Feb 22, 2022

@Mergifyio backport 8.0 8.1

@mergify
Copy link
Contributor

mergify bot commented Feb 22, 2022

backport 8.0 8.1

❌ No backport have been created

  • Backport to branch 8.0 failed: Git reported the following error:
fatal: couldn't find remote ref master

  • Backport to branch 8.1 failed: Git reported the following error:
fatal: couldn't find remote ref master

@marc-gr marc-gr added the v8.0.1 label Feb 24, 2022
marc-gr added a commit to marc-gr/beats that referenced this pull request Feb 24, 2022
…hods (elastic#28695)

* Set url as a pointer to ensure access to all methods

* Add changelog line

* Fix text

(cherry picked from commit 47dba85)
marc-gr added a commit to marc-gr/beats that referenced this pull request Feb 24, 2022
…hods (elastic#28695)

* Set url as a pointer to ensure access to all methods

* Add changelog line

* Fix text

(cherry picked from commit 47dba85)
@marc-gr marc-gr added the v8.1.0 label Feb 24, 2022
marc-gr added a commit that referenced this pull request Feb 24, 2022
…hods (#28695) (#30574)

* Set url as a pointer to ensure access to all methods

* Add changelog line

* Fix text

(cherry picked from commit 47dba85)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.15.0 Automated backport with mergify backport-v7.16.0 Automated backport with mergify backport-v8.0.0 Automated backport with mergify backport-v8.1.0 Automated backport with mergify backport-v8.2.0 Automated backport with mergify bug v8.0.1 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants