question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[enhancement] Allow user defined description when creating an artifact version

See original GitHub issue

This proposal is an alternative solution to the problems described in #1462 and #1534 .

In brief, the 1024 limit at the DB layer of the description field for artifact versions combined with extracting the description from an uploaded OpenAPI/AsyncAPI document effectively limit the “info.description” field in the actual document. This was resolved in ad6ad31cee6e9ea4ea749f10136d37165a5e8033 by truncating the description.

While this allows for creating the artifact version, to make the description useful in the Registry UI, the client must follow up with an update metadata call to change the version and/or artifact description to something usefully rendered in the UI.

In addition to truncating long descriptions extracted from the artifact, I think it would be good to allow the client to optionally define the version description in POST /groups/{groupId}/artifacts/{artifactId}/versions and POST /groups/{groupId}/artifacts. This could happen via an X-Registry-Version-Description header, consistent with the other header-based optional inputs.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:18 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
EricWittmanncommented, Jul 6, 2021

Thanks for the request @kilahm - I don’t see any reason not to implement optional user-provided descriptions when uploading a new version. What about the other meta-data fields users can edit, like name and tags? Thoughts on allowing header-based values for those as well?

1reaction
EricWittmanncommented, Jul 9, 2021

Thank you everyone for the excellent discussion on this issue!

It sounds like the consensus is still to use separated headers. I think I agree with this, because one goal we should have is to make the most likely use-case as simple as possible. So to that end, here is a proposal:

  • X-Registry-Name : ASCII-only value of the name (subject to maxlength limitations as defined by our DDL)
  • X-Registry-Description : ASCII-only value of the description (subject to maxlength limitations as defined by our DDL)
  • X-Registry-Labels : ASCII-only value of the labels (formatted according to OAI rules for array encoding as suggested by @kilahm )
  • X-Registry-Properties : ASCII-only value of the properties (formatted according to OAI rules for object encoding as suggested by @kilahm )

In addition to these headers, I suggest we support the following:

  • X-Registry-Name-Encoded : Same as X-Registry-Name but base64 encoded
  • X-Registry-Description-Encoded : Same as X-Registry-Description but base64 encoded
  • X-Registry-Labels-Encoded : Same as X-Registry-Labels but base64 encoded
  • X-Registry-Properties-Encoded : Same as X-Registry-Properties but base64 encoded

Non-encoded headers take precedence over encoded headers if both exist.

Thoughts?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create an artifact version - ServiceNow Docs
Create multiple versions of the architectural artifacts and send for approval. There can be only one approved version for each artifact.
Read more >
Manage Artifacts and Artifact Packages - TechDocs
Go to. Artifacts · Select the. Application · Select. Create the package manually · Specify the. Name · Click. Artifact Version · (Optional)...
Read more >
create-provisioning-artifact — AWS CLI 1.27.27 Command ...
Creates a provisioning artifact (also known as a version) for the specified product. You cannot create a provisioning artifact for a product that...
Read more >
Job artifacts - GitLab Docs
Create job artifacts · Use CI/CD variables to define the artifacts name · Exclude files from job artifacts · Add untracked files to...
Read more >
Copy Artifact - Jenkins Plugins
Click the help icon on each field to learn the details, such as selecting Maven or multiconfiguration projects or using build parameters. You ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found