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

Rename config to policy and dataset to datastream #280

Merged

Conversation

mtojek
Copy link
Contributor

@mtojek mtojek commented Sep 29, 2020

What does this PR do?

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all datasets collect metrics or logs.

Author's Checklist

  • Rename config template to policy template
  • Rename dataset to data_stream
  • Bump up release versions of integrations
  • Make sure there are no "hacked" dependencies.

How to test this PR locally

mage clean
mage build
cd testing/environments
docker-compose -f snapshot.yml build package-registry
docker-compose -f snapshot.yml up --force-recreate package-registry

package-registry should be exposed under http://localhost:8080 .

Related issues

Screenshots

@mtojek mtojek self-assigned this Sep 29, 2020
@mtojek mtojek added the enhancement New feature or request label Sep 29, 2020
@elasticmachine
Copy link

elasticmachine commented Sep 29, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #280 updated]

  • Start Time: 2020-10-01T15:40:57.797+0000

  • Duration: 4 min 34 sec

@mtojek mtojek requested a review from jen-huang September 29, 2020 10:31
@jen-huang
Copy link
Contributor

Hi @mtojek, thanks for helping me get my registry running with this branch. I found that the package info endpoint doesn't contain policy_templates or data_streams properties for any of the packages I checked (doesn't contain config_templates or datasets either). Example: http://localhost:8080/package/system/0.7.0/

Are you seeing the same?

@ycombinator
Copy link
Contributor

@jen-huang I might be off here but is the registry you are running built with this PR's changes in it: elastic/package-registry#641?

@mtojek
Copy link
Contributor Author

mtojek commented Sep 29, 2020

@jen-huang , confirmed (I see the same results).

It looks that you need to checkout the PR @ycombinator posted above (elastic/package-registry#641), then:

docker build . -t docker.elastic.co/package-registry/package-registry:wip

In testing/environments, you need to update the reference to the Docker image:

FROM docker.elastic.co/package-registry/package-registry:wip

COPY testing/environments/package-registry.config.yml /package-registry/config.yml
COPY build/integrations /packages/integrations

and finally:

docker-compose -f snapshot.yml build package-registry
docker-compose -f snapshot.yml up --force-recreate package-registry

@jen-huang
Copy link
Contributor

Thanks both!! I am seeing the correct package info now. Will continue with my testing.

@jen-huang
Copy link
Contributor

Another issue found: I think elastic/package-registry#641 is missing datasets.name->data_streams.datasets property renaming from the package spec changes.

Example from system package info:

  "data_streams": [
    {
      "type": "logs",
-      "name": "system.auth",
+      "dataset": "system.auth",
      "title": "System auth logs",
      "release": "experimental",
      "ingest_pipeline": "default",
      ...
    },
    ...
  ]

@jen-huang
Copy link
Contributor

I was able to monkey patch my local package-registry to return data_stream.dataset property. Things are looking promising.

Copy link
Contributor

@jen-huang jen-huang left a comment

Choose a reason for hiding this comment

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

Didn't review actual code but tested this with elastic/kibana#78699 and it works well 👍

Copy link

@jonathan-buttner jonathan-buttner left a comment

Choose a reason for hiding this comment

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

I looked over the changes and they look good 👍

@mtojek mtojek merged commit 3c88555 into elastic:master Oct 2, 2020
eyalkraft pushed a commit to build-security/integrations that referenced this pull request Mar 30, 2022
* Rename config_templates to policy_templates

* Setup dependencies

* Rename dataset folder to data_stream

* Bump up versions

* Rename dataset to dataStream in source

* Rename config template to policy template

* Hack dependency on mtojek fork

* Fix: docs

* Fix: docs

* Fix: mage check

* Missed renamings

* Update dep on package-registry

* Fix: mage check

* Fix: remove hacked dependencies

* Switch back to master

* Bump up version on Linux package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants