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

[7.17] (backport elastic-agent#680) Fix transpiler to allow : in dynamic variables. #32407

Merged
merged 2 commits into from
Jul 27, 2022

Conversation

michel-laterman
Copy link
Contributor

Backport elastic/elastic-agent#680

Fix transpiler regex to allow ':' characters in dynamic variables so
that users can input "${dynamic.lookup|'fallback.here'}".

@michel-laterman michel-laterman added bug backport Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels Jul 19, 2022
@michel-laterman michel-laterman requested a review from a team as a code owner July 19, 2022 17:48
@michel-laterman michel-laterman requested review from AndersonQ and blakerouse and removed request for a team July 19, 2022 17:48
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jul 19, 2022
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 19, 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-07-26T20:10:33.596+0000

  • Duration: 114 min 47 sec

Test stats 🧪

Test Results
Failed 0
Passed 6138
Skipped 393
Total 6531

💚 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!)

@AndersonQ
Copy link
Member

@michel-laterman I believe it'd be better for the same reviewers of the original PR (elastic/elastic-agent#680) to review this backport.

@@ -15,7 +15,7 @@ import (
"github.com/elastic/beats/v7/libbeat/common"
)

var varsRegex = regexp.MustCompile(`\${([\p{L}\d\s\\\-_|.'"]*)}`)
var varsRegex = regexp.MustCompile(`\${([\p{L}\d\s\\\-_|.'":]*)}`)
Copy link
Contributor

Choose a reason for hiding this comment

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

Small comment here, this mean the following variable declaration would be valid:

${dynami:c.lookup|'fallback.here'}

dynami:c.lookup seems weird to me, but again... this is still a valid key reference in YAML if you quote the key value.

'test:ok': hello

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah! yaml? 😕

Copy link
Contributor

Choose a reason for hiding this comment

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

I had yaml with a passion, not sure it was better than xml ;)

@mergify
Copy link
Contributor

mergify bot commented Jul 25, 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 backport-agent-680 upstream/backport-agent-680
git merge upstream/7.17
git push upstream backport-agent-680

@AndersonQ AndersonQ removed their request for review July 26, 2022 16:24
@michel-laterman
Copy link
Contributor Author

@michel-laterman michel-laterman merged commit 2cf7076 into elastic:7.17 Jul 27, 2022
@michel-laterman michel-laterman deleted the backport-agent-680 branch July 27, 2022 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport bug Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants