Generate an integrations package from a release#983
Generate an integrations package from a release#983brokensound77 merged 14 commits intoelastic:mainfrom
Conversation
| UUID_PATTERN = r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}' | ||
|
|
||
| _version = r'\d+\.\d+(\.\d+[\w-]*)*' | ||
| CONDITION_VERSION_PATTERN = rf'^\^{_version}$' |
There was a problem hiding this comment.
i think we'll loosen this up as we go. might move from ^ to ~ or something.
no changes needed here, just an fyi
There was a problem hiding this comment.
good to know - can always expand it here
| update_version_lock=False, registry_data: dict = None, verbose=True): | ||
| """Initialize a package.""" | ||
| self.rules: List[Rule] = [r.copy() for r in rules] | ||
| self.rules = [r.copy() for r in rules] |
There was a problem hiding this comment.
Looks like type inspection has figured it out. I think we could annotate the Rule.copy method to explicitly mention a return type of Rule, but PyCharm at least is pretty smart
|
|
||
| assert self.registry_data | ||
|
|
||
| manifest = RegistryPackageManifest.from_dict(self.registry_data) |
There was a problem hiding this comment.
I think it would make more sense to give this class an already assembled RegistryPackageManifest, but we can do this later with a restructur
10c6cbe to
4117d74
Compare
threat-punter
left a comment
There was a problem hiding this comment.
Nice one, @brokensound77. I left one comment for your review. LGTM!
rw-access
left a comment
There was a problem hiding this comment.
remove "and dependencies (e.g. ML jobs)" from the readme_text and this LGTM!
Issues
related to elastic/package-storage#843
Summary
This generates a package in the format expected by
package-storagefor use with the integrations process. The package is generated along with the other artifacts fromPackagingand can be built withmake releaseordev build-release.To see this with WIP changelog code along with more comprehensive changes, refer to this diff.
To see the package built with this PR, refer to the checks