-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Enhancements for ppm publish
#119
Comments
Oh, I forgot one: there's no test coverage for this method because it makes requests to an external URL. We should either
Option 1 is probably easier, but maybe option 2 makes sense for other reasons that I'm unaware of. |
(Sorry I haven't reviewed the PR content) But to comment only on your ideas about better testing. I'd be much more inclined to go with option 1. Otherwise allowing customization of this could prove beneficial if we ever do move further on the conversation of more forge support (Although I have a feeling that'd involve way more due to API differences between services) but who knows could still maybe be a step in the right direction. |
@savetheclocktower Some ideas, I've recently been looking at this library for us in It hooks into the NodeJS built-in HTTP handlers to mock responses to any URL. If I recall correctly, So this may be something we could look at to implement mocking of GitHub endpoints right now, with zero other changes. If you'd like I can first go about testing this over in the backend repo to hopefully encounter any of the pitfalls that we may find. |
Sure, let me know what you find. Seems promising. |
Unclear to me how many of these issues/pieces of feedback might be different now with the large refactor of how Just noting it in case it is relevant, leaving the breadcrumb trail, so to speak... |
Have you checked for existing feature requests?
Summary
I found a few issues with the
publish
task, mainly around the part where we check GitHub to see whether it knows about the new tag:waitForTagToBeAvailable
method assumes that the tag will eventually show up. It doesn't try to handle situations where the API returns errors — for example, because of an exceeded rate limit.waitForTagToBeAvailable
used the same token that PPM uses in calls to the PPM API, that limit could be raised at least tenfold. It's worth doing.waitForTagToBeAvailable
doesn't have any error processing of its own. It doesn't envision thatwaitForTagToBeAvailable
can fail in any way. If we can't be sure the tag is present, we shouldn't proceed with publishing.What benefits does this feature provide?
Better error handling for
ppm publish
.Any alternatives?
Probably.
Other examples:
No response
The text was updated successfully, but these errors were encountered: