Skip to content

Conversation

@terrancedejesus
Copy link
Contributor

@terrancedejesus terrancedejesus commented Jun 22, 2022

Issues

Summary

The integrations-pr command in devtools.py should be reviewed for the following:

  • elastic_package references where linting is called (bug)
@terrancedejesus terrancedejesus changed the title started solution for integrations-pr bug [Bug] Integrations-Pr Command (Elastic-Package Linting and Version Adjustments) Jun 22, 2022
@terrancedejesus terrancedejesus self-assigned this Jun 22, 2022
@terrancedejesus terrancedejesus added v8.4.0 bug Something isn't working enhancement New feature or request labels Jun 22, 2022
@terrancedejesus
Copy link
Contributor Author

Output from using this command on the latest release for 7.16.4.

Already on 'main' From github.com:elastic/integrations * branch main -> FETCH_HEAD Switched to a new branch 'detection-rules/7.16.4-a7411d05' 2022/08/16 13:26:16 WARN CommitHash is undefined, in both /Users/tdejesus/.elastic-package/version and the compiled binary, config may be out of date. 2022/08/16 13:26:16 INFO New version is available - v0.59.0. Download from: https://github.com/elastic/elastic-package/releases/tag/v0.59.0 Format the package Done Enumerating objects: 1262, done. Counting objects: 100% (1262/1262), done. Delta compression using up to 10 threads Compressing objects: 100% (638/638), done. Writing objects: 100% (640/640), 191.20 KiB | 7.35 MiB/s, done. Total 640 (delta 600), reused 1 (delta 0), pack-reused 0 remote: Resolving deltas: 100% (600/600), completed with 572 local objects. remote: remote: Create a pull request for 'detection-rules/7.16.4-a7411d05' on GitHub by visiting: remote: https://github.com/elastic/integrations/pull/new/detection-rules/7.16.4-a7411d05 remote: To github.com:elastic/integrations.git * [new branch] detection-rules/7.16.4-a7411d05 -> detection-rules/7.16.4-a7411d05 PR created: https://github.com/elastic/integrations/pull/4010 2022/08/16 13:26:47 WARN CommitHash is undefined, in both /Users/tdejesus/.elastic-package/version and the compiled binary, config may be out of date. 2022/08/16 13:26:47 INFO New version is available - v0.59.0. Download from: https://github.com/elastic/elastic-package/releases/tag/v0.59.0 Format the package Done 2022/08/16 13:26:47 WARN CommitHash is undefined, in both /Users/tdejesus/.elastic-package/version and the compiled binary, config may be out of date. 2022/08/16 13:26:47 INFO New version is available - v0.59.0. Download from: https://github.com/elastic/elastic-package/releases/tag/v0.59.0 Lint the package Done Enumerating objects: 9, done. Counting objects: 100% (9/9), done. Delta compression using up to 10 threads Compressing objects: 100% (5/5), done. Writing objects: 100% (5/5), 450 bytes | 450.00 KiB/s, done. Total 5 (delta 4), reused 0 (delta 0), pack-reused 0 remote: Resolving deltas: 100% (4/4), completed with 4 local objects. To github.com:elastic/integrations.git 644eef8b3..b43e2d784 detection-rules/7.16.4-a7411d05 -> detection-rules/7.16.4-a7411d05 
@terrancedejesus
Copy link
Contributor Author

For now, we can address the bug in the code that stops it from normal execution and then focus on the enhancements at another time. The following is being addressed in these code adjustments.

  • extra linting line caused errors with elastic-package go package
  • split the package version string from packages.yaml in case the -dev.0 is left in there. If it does not exist, the semantic version is still pulled correctly. Based on the step-by-step documentation, this value is changes to the release version and imported so as long as the process is followed as usual no errors should occur.

The following are enhancements we want to do:

  • Update integrations manifest and code to include security_detection_engine. This will be needed in the integrations manifest to reference what the latest version is based on the stack version. For example, if on 7.16, load integrations manifest, filter for key security_detection_engine and sort version, returning the latest. We can then include a click prompt, comparison logic and an error if the expected does not match the input.
@terrancedejesus terrancedejesus marked this pull request as ready for review August 16, 2022 18:09
Copy link
Contributor

@Mikaayenson Mikaayenson left a comment

Choose a reason for hiding this comment

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

LGTM

@botelastic botelastic bot added the python Internal python for the repository label Aug 16, 2022
@terrancedejesus terrancedejesus merged commit 5a04aaf into main Aug 24, 2022
@terrancedejesus terrancedejesus deleted the bug-integrations-pr-command branch August 24, 2022 18:01
protectionsmachine pushed a commit that referenced this pull request Aug 24, 2022
…justments) (#2054) * started solution for integrations-pr bug * Update devtools.py * Update detection_rules/devtools.py * Update detection_rules/devtools.py Co-authored-by: Mika Ayenson <Mikaayenson@users.noreply.github.com> (cherry picked from commit 5a04aaf)
protectionsmachine pushed a commit that referenced this pull request Aug 24, 2022
…justments) (#2054) * started solution for integrations-pr bug * Update devtools.py * Update detection_rules/devtools.py * Update detection_rules/devtools.py Co-authored-by: Mika Ayenson <Mikaayenson@users.noreply.github.com> (cherry picked from commit 5a04aaf)
protectionsmachine pushed a commit that referenced this pull request Aug 24, 2022
…justments) (#2054) * started solution for integrations-pr bug * Update devtools.py * Update detection_rules/devtools.py * Update detection_rules/devtools.py Co-authored-by: Mika Ayenson <Mikaayenson@users.noreply.github.com> (cherry picked from commit 5a04aaf)
protectionsmachine pushed a commit that referenced this pull request Aug 24, 2022
…justments) (#2054) * started solution for integrations-pr bug * Update devtools.py * Update detection_rules/devtools.py * Update detection_rules/devtools.py Co-authored-by: Mika Ayenson <Mikaayenson@users.noreply.github.com> (cherry picked from commit 5a04aaf)
protectionsmachine pushed a commit that referenced this pull request Aug 24, 2022
…justments) (#2054) * started solution for integrations-pr bug * Update devtools.py * Update detection_rules/devtools.py * Update detection_rules/devtools.py Co-authored-by: Mika Ayenson <Mikaayenson@users.noreply.github.com> (cherry picked from commit 5a04aaf)
protectionsmachine pushed a commit that referenced this pull request Aug 24, 2022
…justments) (#2054) * started solution for integrations-pr bug * Update devtools.py * Update detection_rules/devtools.py * Update detection_rules/devtools.py Co-authored-by: Mika Ayenson <Mikaayenson@users.noreply.github.com> (cherry picked from commit 5a04aaf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport: auto bug Something isn't working enhancement New feature or request python Internal python for the repository v8.4.0

4 participants