[config:read-releases] Fetch exact branch #803
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Isn't it a good idea for us to add a new function like
|
I think probably we need to avoid using those convenience methods. |
This comment was marked as resolved.
This comment was marked as resolved.
@vfreex You're right we shouldn't rely on convenience methods. I remember your errata_tool rant :) , we should put that in art-docs for guide to api packages use. In this case if you see https://github.com/fastai/ghapi they have provided some convenience methods and others methods are generated from openapi spec. So I'd say let's use only the official methods (get_ref and get_tree are). I'll check out the contents endpoint, maybe it's better |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Build #5
|
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.
I left a minor comment, LGTM otherwise. Thanks for catching this!
repos.get_content works as expected with |
We're using ghapi's list_files method which calls get_branch
which fetches the first matched branch with given prefix (!!)
So in my case when I pointed doozer to my fork and said fetch me openshift-4.7,
it returned "openshift-4.7-cachito" branch.
This is pretty alarming behavior, so let's not use methods that depend on get_branch()
Test
(I had to delete the openshift-4.7-cachito branch to unblock my failing job, but
the original behavior should be reproducible)
doozer --data-path=https://github.com/thegreyd/ocp-build-data --group=openshift-4.14@disable_ptp config:read-releases --yaml