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

[KS-421] Improve logging from remote capabilities #14058

Merged
merged 2 commits into from
Aug 9, 2024

Conversation

bolekk
Copy link
Contributor

@bolekk bolekk commented Aug 7, 2024

Add validations and sanitizing

Copy link
Contributor

github-actions bot commented Aug 7, 2024

I see you updated files related to core. Please run pnpm changeset in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@bolekk bolekk force-pushed the chore/KS-421-logs-improvements branch from 89f7b8b to 24ae22b Compare August 7, 2024 03:22
@bolekk bolekk requested a review from a team August 7, 2024 03:22
@bolekk bolekk marked this pull request as ready for review August 7, 2024 03:22
@bolekk bolekk requested a review from a team as a code owner August 7, 2024 03:22
core/capabilities/remote/target/server.go Outdated Show resolved Hide resolved
@bolekk bolekk force-pushed the chore/KS-421-logs-improvements branch from 24ae22b to e613003 Compare August 9, 2024 01:09
@bolekk bolekk requested a review from a team August 9, 2024 01:10
@bolekk bolekk force-pushed the chore/KS-421-logs-improvements branch from e613003 to d5431dd Compare August 9, 2024 01:42
messageID := target.GetMessageID(msg)
messageID, err := target.GetMessageID(msg)
if err != nil {
panic(err)
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: t.Fatal instead?

return err == nil
}

// Trigger event IDs and message IDs can only contain printable characters and must be non-empty
Copy link
Collaborator

Choose a reason for hiding this comment

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

Out of curiosity, is there a reason why we can't have the same ID validation as above? Namely, could Trigger event IDs and message IDs also be 32-byte hex-encoded strings?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently trigger event IDs are human readable, e.g. "streams_123456890" and I think that makes it debug-friendly. As for Message IDs we could probably impose some extra restriction ...

@cedric-cordenier cedric-cordenier added this pull request to the merge queue Aug 9, 2024
Merged via the queue into develop with commit 95cb692 Aug 9, 2024
112 of 113 checks passed
@cedric-cordenier cedric-cordenier deleted the chore/KS-421-logs-improvements branch August 9, 2024 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants