fix: update job status handling and improve link management in processes#43
fix: update job status handling and improve link management in processes#43ChristianBeilschmidt wants to merge 5 commits intomainfrom
Conversation
| 'finished': finished, | ||
| 'updated': updated, | ||
| 'progress': progress, | ||
| 'links': COALESCE(links, '[]'::jsonb) |
There was a problem hiding this comment.
Does this result from skipping empty in serialization?
There was a problem hiding this comment.
Yes, I think so.
There was a problem hiding this comment.
I was just wondering whether here is the best place to handle this vs. on creation/ingress or to remove skipping empty serialization, but I don't really have an informed preference.
60da0a7 to
fc51fd1
Compare
…point and job status links
| /// Helper function to add a path segment to a URL, returning an error if the URL cannot be modified. | ||
| /// Example usage: | ||
| /// `url_plus_segments(Url::parse("http://example.com/foo")?, &["bar", "123"])` would return `http://example.com/foo/bar/123`. | ||
| fn url_plus_segments(mut url: Url, segments_to_add: &[&str]) -> anyhow::Result<Url> { |
There was a problem hiding this comment.
Any reason not to use the join() member function of url?
| /// Helper function to replace a path segment in a URL, returning an error if the URL cannot be modified. | ||
| /// Example usage: | ||
| /// `url_replace_segments(Url::parse("http://example.com/foo/bar")?, 1, &["baz"])` would return `http://example.com/foo/baz`. | ||
| fn url_replace_segments( |
There was a problem hiding this comment.
For here, that composition is fine. Would it be possible to use the join function of url instead and/or add it directly to the implementation of Link?
| 'finished': finished, | ||
| 'updated': updated, | ||
| 'progress': progress, | ||
| 'links': COALESCE(links, '[]'::jsonb) |
There was a problem hiding this comment.
I was just wondering whether here is the best place to handle this vs. on creation/ingress or to remove skipping empty serialization, but I don't really have an informed preference.
CHANGES.mdorCHANGELOG.mdThe links returned from the processes endpoint were wrong, so I fixed them and added tests to verify it.