-
Notifications
You must be signed in to change notification settings - Fork 43
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
Update Bintray Package Info #2
Conversation
5d50683
to
aa34b23
Compare
I really like the idea of this new plugin as Bintray still does not fill metadata automatically, but we will have to wait to make a decision on how plugins will be managed for installation, versioning and activation and what will be the long-term purpose of repository. Please, keep the PR open and I will try to discuss it with the team. Many thanks!!! |
We have added Travis and AppVeyor CI to this repo and an example test for the Thanks! |
aa34b23
to
e5ffaee
Compare
@jgsogo the bintray hook is updated! Since it requires bintray api and interface validation I would prefer to create a fake package to validate all steps: https://bintray.com/conan-community/test-distribution/foo%3Abar You will need to set TIL: If you need to get an environment variable when running tox, just use |
Ops!
I need to support installer packages too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes related to the renaming from plugins to hooks.
Having a look at this PR I have some doubts about the test suite. Do you think it is ok to call Conan CLI or shall we just test the hook function with mocked arguments? In the beginning, I thought that it would be ok to use Conan CLI, this way we can test our hooks against different versions of Conan itself (it is what I did with the
Each approach has pros and cons:
In any case, I think that we should mock the calls to external services, we can store sample json responses (also failing ones) and our test suite won't rely on Bintray status. What do you think about this dissertation? |
I really appreciate your feedback! I thought in both ideas before. I've Conan API used for many scripts and Bincrafters' projects, but as you said, it will be changed often. I like the second option, add mocks, sounds more "clean", but I don't know how to make it correctly. This hook needs to make requests to Bintray, change all metadata and check the results. If we are trying to make an integration test, so we couldn't not change the client side I think, we should be able to mock bintray side only. However, we would need to create fake answers based on Bintray and Conan REST API, but it sounds like creating a framework just to check a small piece of code. Maybe, instead to run requests directly, we could use some part of Conan base code (Uploader class, just a guess), with an well known mock supported from Conan tests. |
Talking about second option: testing just the hook function with mocked arguments
There are still integration tests:
|
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
@jgsogo I made some changes following your points. Thanks for the example, it helped me to understand how to mock requests 👍 Okay, the new test calls the hook directly, and all Bintray's answers are mocked up. I've tried to follow Bintray status code and messages -- All commands were executed to check Bintray's response. |
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks very good, just a couple of comments... and it is on my side to refactor the test suite ^^
@jgsogo I've updated the unit tests, but as hooks doesn't have |
43a84d1
to
570b4d0
Compare
…re/update-bintray
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
- Topics read from Bintray are not sorted Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Up! Should we wait for #16 before to merge this PR? |
Hi @uilianries, we really want to start promoting hooks and this one can be very interesting. Although I think that testing will follow the approach in #17 (more or less like it is now) maybe it is better to split this PR into two: the hook itself (to be merged as soon as possible), and the testing part (so we can comment about it). Also, please add a little documentation in the Thanks |
Understood, I gonna do it today 😸 |
Signed-off-by: Uilian Ries <uilianries@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Waiting for CI
Thanks Javi! |
@jgsogo All green! |
Waiting for @danimtb to merge it. |
Hi!
This PR is about a plugin to update Bintray package page.
For each new package created, we need to fill manually Bintray page, but all needed data could be extract from the recipe.
Related issue: bincrafters/community#476