Skip to content

[Bug] Integrations-Pr Command (Elastic-Package Linting and Version Adjustments) #2008

@terrancedejesus

Description

@terrancedejesus

Describe the bug
The integrations-pr command in development tools needs to be adjusted.

  1. Remove multiple elastic-package formatting and linting commands. This bug exists in this code as a result of linting changes done within the Elastic Package repository.
 # replace the changelog entry with the actual PR link changelog_entries[0]["changes"][0]["link"] = pr.html_url save_changelog() # format the yml file with elastic-package elastic_pkg("format") elastic_pkg("lint") # Push the updated changelog to the PR branch git("add", pkg_directory) git("commit", "-m", f"Add changelog entry for {package_version}") git("push") 
  1. References made to packages.yml for the integration version should include a prompt for what the version should be and if not supplied, the CDN should be referenced for what the value should be.
 # elastic/integrations registry_data: categories: ["security"] conditions: kibana.version: "^8.3.0" description: Prebuilt detection rules for Elastic Security format_version: 1.0.0 icons: - size: 16x16 src: /img/security-logo-color-64px.svg type: image/svg+xml license: basic name: security_detection_engine owner: github: elastic/protections release: ga title: Prebuilt Security Detection Rules type: integration version: 1.3.0-dev.0 

To Reproduce
Run the following command from detection rules.

python -m detection_rules dev integrations-pr <integrations-repo-path> --assign <gh-user> 

Expected behavior
An integrations PR should be created with the new integrations artifact. An example PR is below but the bug is preventing this by raising an exception error. In addition, the integrations-pr command should reference the production CDN for the security_detection_engine package and adjust versions.

Example Reference: https://epr.elastic.co/package/security_detection_engine/1.0.2/

Metadata

Metadata

Labels

bugSomething isn't workingpythonInternal python for the repository

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions