amol- commented on pull request #10650:
URL: https://github.com/apache/arrow/pull/10650#issuecomment-883261676


   > I'm unsure on how to push to a specific branch
   > 
https://github.com/pachadotdev/arrow/blob/patch-2/dev/archery/archery/crossbow/cli.py#L237-L257
   > 
   > my idea:
   > 
   > ```python
   > file_path = temp.name
   > # now commit and push the json contentsth
   > branch_name = 'json-report' + job_name + datetime.utcnow()
   > branch = self.create_branch(branch_name, file_path)
   > return branch
   > ```
   
   If you are adding that code in `save_report_data`, which I guess is what you 
are doing, there won't be any `self`. Because `save_report_data` is a function, 
not a method. If you don't see `self` as an argument of the function containing 
your code block, then there won't be any `self`.
   
   I guess that what you are looking for is `queue.create_branch` as `queue` is 
the object that should have the method.
   
   I wonder btw if what we want is really to create a new branch for each run. 
I personally thought we would have a unique `nightly-json-reports` branch and 
then we would commit all files there, so that you can just look at the most 
recent file in that branch or have the whole history. Given that we already 
have tons of different branches to trigger the CI ( 
https://github.com/ursacomputing/crossbow/branches has 30k branches ) I think 
it would be honestly very hard to understand anything if we add _more_ branches 
to it there.
   
   @jonkeane @kszucs  what do you think on this point?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to