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

Multi-level self-nesting support #1458

Closed
ebeahan opened this issue Jun 14, 2021 · 1 comment · Fixed by #1459
Closed

Multi-level self-nesting support #1458

ebeahan opened this issue Jun 14, 2021 · 1 comment · Fixed by #1459
Assignees
Labels
enhancement New feature or request

Comments

@ebeahan
Copy link
Member

ebeahan commented Jun 14, 2021

Problem

In ECS a self-nesting is when one field set is nested inside itself using a different name:

Two examples:

  • process.parent.* self-nests the process field set renamed as parent
  • user.target.* self-nests the user.* field set renamed as target (same applies to user.changes and user.effective)

In a very specific case, you may want to self nest the same field set twice:

  1. Reuse process.* as process.target.*
  2. Reuse process again but underneath process.target.* to create process.target.parent.*

The current ECS tooling allows specifying this in the reusable.expected section, but it will not produce the desired result:

- name: process
  reusable:
    expected:
      - at: process
        as: target
      # collect the parent of the target process at process.target.parent
      - at: process.target
        as: parent

Solution

Implement logic into the self-nesting phase of .finalize to account for when the at attribute is not the top-level field set but an existing self-nesting.

@ebeahan ebeahan added the enhancement New feature or request label Jun 14, 2021
@ebeahan ebeahan self-assigned this Jun 14, 2021
@ebeahan
Copy link
Member Author

ebeahan commented Jun 14, 2021

Addressing will make the proposed reuse of process.target.* and process.target.parent.* for RFC 0016 possible.

cc @rw-access

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 a pull request may close this issue.

1 participant