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

Add {mediaType,tags} to data.{liveLogs,persistentLogs} #267

Merged
merged 1 commit into from Sep 16, 2021

Conversation

magnusbaeck
Copy link
Member

Applicable Issues

Fixes #166

Description of the Change

All events that contain log locations (ActF, ActS, TCF, TCS, TSF, TSS) get new mediaType and tags member in data.liveLogs or data.persistentLogs that contains more information about the log.

Alternate Designs

None.

Benefits

These new members allows event producers to describe the log locations in a more structured manner by including tags and the media type of the log payload. This can e.g. be used to distinguish between different representations of the same log (say, HTML and plain text) or identify logs from a particular tool.

Possible Drawbacks

None.

Sign-off

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.

Signed-off-by: Magnus Bäck <magnus.back@axis.com>

These new members for log location objects allows event producers to
describe the log locations in a more structured manner by including
tags and the media type of the log payload. This can e.g. be used to
distinguish between different representations of the same log (say,
HTML and plain text) or identify logs from a particular tool.

The schemas don't contain a regular expression for the media type member
and accept any string. This could be seen as a drawback, but media types
are pretty complicated beasts so instead of risking a regexp bug that
blocks legitimate media types we're lax about these strings, similar to
how ArtC's data.identity doesn't try to include a regular expression for
matching all package URLs.
@e-backmark-ericsson
Copy link
Member

Looks sound. Need to spend some more time reviewing it though.

@t-persson
Copy link
Contributor

One question on this: Do we count an HTML file as a log or an artifact?
If it's the latter, then we might not want to add "mediaType" to "*Logs" fields and instead recommend users to send ArtifactCreated?

@magnusbaeck
Copy link
Member Author

If the text/html payload represents the activity's log then I think it's a log rather than an artifact.

One could consider the mediaType member redundant since, at least for HTTP URIs, one can make a HEAD request to determine the media type of a resource. If one interprets the "no redundant data" rule strictly we shouldn't include the media type, but since HEAD requests aren't available for all URI schemes I think it's reasonable to keep that member.

@magnusbaeck magnusbaeck merged commit 9291d55 into eiffel-community:master Sep 16, 2021
@magnusbaeck magnusbaeck deleted the logtags branch September 16, 2021 13:56
e-backmark-ericsson pushed a commit to e-backmark-ericsson/eiffel that referenced this pull request Apr 13, 2022
…ity#267)

These new members for log location objects allows event producers to
describe the log locations in a more structured manner by including
tags and the media type of the log payload. This can e.g. be used to
distinguish between different representations of the same log (say,
HTML and plain text) or identify logs from a particular tool.

The schemas don't contain a regular expression for the media type member
and accept any string. This could be seen as a drawback, but media types
are pretty complicated beasts so instead of risking a regexp bug that
blocks legitimate media types we're lax about these strings, similar to
how ArtC's data.identity doesn't try to include a regular expression for
matching all package URLs.
@magnusbaeck magnusbaeck added the protocol All protocol changes label Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
protocol All protocol changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Insufficient describing data(metadata/tags) for persistentLogs/liveLogs
4 participants