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

Handle Stream reference dependencies for entity sharing #17891

Conversation

ryan-carroll-graylog
Copy link
Contributor

Description

A new stream_title Entity type was added in #17089 to allow creating Content Packs that reference Streams by title instead of ID.

The Entity sharing code uses the Content Pack dependency resolution code to warn users if they are sharing an entity that has dependencies that should also be shared. This was causing errors due to stream_title being an unrecognized GRN type.

Since we really want the actual Stream dependency in this context anyway, this update maps STREAM_REF_V1 dependencies to their STREAM_V1 ModelTypes in the share dependency resolver.

Motivation and Context

Closes: #17882

How Has This Been Tested?

Locally in development environment, sharing stream scoped entities.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@ryan-carroll-graylog ryan-carroll-graylog linked an issue Jan 10, 2024 that may be closed by this pull request
Copy link
Contributor

@kingzacko1 kingzacko1 left a comment

Choose a reason for hiding this comment

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

LGTM

@ryan-carroll-graylog ryan-carroll-graylog merged commit 00064c8 into master Jan 12, 2024
5 checks passed
@ryan-carroll-graylog ryan-carroll-graylog deleted the 17882-sharing-a-stream-scoped-entity-fails-with-error branch January 12, 2024 12:25
ryan-carroll-graylog added a commit that referenced this pull request Jan 12, 2024
* Add `stream_title` type to GRNRegistry

* Replace stream_title dependencies with the acutal stream

* Add unit test

* Add changelog entry
ryan-carroll-graylog added a commit that referenced this pull request Jan 12, 2024
)

* Add `stream_title` type to GRNRegistry

* Replace stream_title dependencies with the acutal stream

* Add unit test

* Add changelog entry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sharing a Stream Scoped Entity fails with error
3 participants