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

Handle corner case in getLatest artifact, which cascades to Poller #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brewkode
Copy link
Contributor

In our setup, we've noticed that getObjectMetadata request (after doing a getLatest) fails with 404. One possible code path that leads to this is getLatest returning Revisions.base(), which is problematic, since, we consider it to be a valid revision and try to do a metadata fetch. Added a fix to handle it with some logging enabled on the plug-in side.

…rialPoller

In our setup, we've noticed that objectMetadata request after doing a getLatest fails with 404. One possible code path that leads to this is getLatest returning Revisions.base(), which is problematic, since, we consider it to be a valid revision and try to do a metadata fetch. Added a fix to handle it with logging enabled.
@brewkode
Copy link
Contributor Author

@ashwanthkumar @manojlds Please take a look at this and share your feedback

|}
""".stripMargin))
val resultMap = new GsonBuilder().create.fromJson[AnyRef](result.responseBody(), classOf[Any])
assert(result.responseCode() == 200)
Copy link
Contributor Author

@brewkode brewkode Jan 19, 2018

Choose a reason for hiding this comment

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

I can't understand this. I send a INTERNAL_ERROR when handling this particular request from the Plugin side via createResponse(DefaultGoPluginApiResponse.INTERNAL_ERROR, revision.toMap()) . However, the response that's received still has 200 status. I checked other tests which asserts some failures, which returns INTERNAL_ERROR, they also have assertions expecting a 200 response code. Perhaps, is this how, plugin api response is expected?

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.

1 participant