OCCRA
Go to Post You are given a goal with some simple restrictions. That's it. No one really cares how you get it done, just the fact that you get it done. - Max Lobovsky [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 10-18-2018, 12:38 PM
AlexD744 AlexD744 is offline
Registered User
FRC #0744 (744 Shark Attack & 7239 Hell Robotics)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Ft. Lauderdale, FL
Posts: 710
AlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond repute
Git at competitions

Hi CD,

I was wondering what most teams do with regard to using git at competition. If there are several programmers working on different things, on different computers, what are your best practices for merging changes at competition?

Often, we've had the driver tweaking small things in queue for a match, while programmers in the pit or stands are working on getting a new feature or autonomous ready to go. And merging these before has always involved a flash drive and many backup copy zipfiles being made.

Obviously, there's no internet access, so the standard git workflow doesn't seem workable to me. Any pro-tips and tricks to make using git easy and seamless at competitions?

Thanks!
Reply With Quote
  #2   Spotlight this post!  
Unread 10-18-2018, 12:53 PM
KJaget's Avatar
KJaget KJaget is offline
Zebravision Labs
AKA: Kevin
FRC #0900
Team Role: Mentor
 
Join Date: Dec 2014
Rookie Year: 2015
Location: Raleigh, NC
Posts: 157
KJaget has a reputation beyond reputeKJaget has a reputation beyond reputeKJaget has a reputation beyond reputeKJaget has a reputation beyond reputeKJaget has a reputation beyond reputeKJaget has a reputation beyond reputeKJaget has a reputation beyond reputeKJaget has a reputation beyond reputeKJaget has a reputation beyond reputeKJaget has a reputation beyond reputeKJaget has a reputation beyond repute
Re: Git at competitions

We have sshd set up on all of our dev laptops (that I know of, anyway). This lets programmers pull code from each other either via the robot network or direct connected to each other's laptopts. After the comp, rebase to github and push changes.

https://git-scm.com/docs/git-pull

Code:
The following syntaxes may be used with them:

    ssh://[user@]host.xz[:port]/path/to/repo.git/
For extra credit, use this syntax to pull code onto a coprocessor while connected to the field network.
Reply With Quote
  #3   Spotlight this post!  
Unread 10-18-2018, 12:58 PM
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #6367 (), FRC #7240 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,397
virtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond repute
Re: Git at competitions

You can use git with a flash drive.
__________________
Maintainer of RobotPy (Python for FRC) & WPILib Contributor
Creator of pyfrc (Robot Simulator + utilities for Python), pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript), and lots more...

Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #4   Spotlight this post!  
Unread 10-18-2018, 01:07 PM
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is online now
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 2,369
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Git at competitions

We typically won't push to the remote repo until we're back to the hotel.
Reply With Quote
  #5   Spotlight this post!  
Unread 10-18-2018, 01:20 PM
krieck's Avatar
krieck krieck is offline
Registered User
AKA: Keith
FRC #2846 (Firebears)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Minnesota
Posts: 63
krieck is an unknown quantity at this point
Re: Git at competitions

We have run git off a flash drive at competitions, but it wasn't worth the effort.

Lately, our rule at competitions is that there is only one programmer laptop in the pit. Multiple programmers can be discussing on changes, but they need to collaborate and enter everything on that one computer.

After the competition, they push changes up to github.
Reply With Quote
  #6   Spotlight this post!  
Unread 10-18-2018, 01:24 PM
Prateek M's Avatar
Prateek M Prateek M is offline
Kotlin Master Race
FRC #5190 (Green Hope Falcons)
Team Role: Programmer
 
Join Date: May 2018
Rookie Year: 2018
Location: Cary, North Carolina
Posts: 41
Prateek M is on a distinguished road
Re: Git at competitions

Quote:
Originally Posted by krieck View Post
We have run git off a flash drive at competitions, but it wasn't worth the effort.

Lately, our rule at competitions is that there is only one programmer laptop in the pit. Multiple programmers can be discussing on changes, but they need to collaborate and enter everything on that one computer.

After the competition, they push changes up to github.
This is what we do. We all collaborate and make changes on one laptop (which also ends up being the DS Laptop). We then commit and push the changes to GitHub after the competition ends.
Reply With Quote
  #7   Spotlight this post!  
Unread 10-18-2018, 03:10 PM
connor.worley connor.worley is offline
Registered User
FRC #5499
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Berkeley
Posts: 763
connor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond repute
Re: Git at competitions

Anyone tried using the roborio as a git remote?
__________________
Team 5499 (2015-present)
Past Teams: Team 973 (2016-2017) / Team 254 (2014-2015) / Team 1538 (2011-2014)
日本語副専攻です!話しましょう!
I work for Yelp on the Core Services team.
Reply With Quote
  #8   Spotlight this post!  
Unread 10-18-2018, 03:22 PM
Jaci's Avatar
Jaci Jaci is offline
http://imjac.in/ta/name
AKA: Jaci R Brunning
FRC #5333 (Can't C#) #5663 (Ground Control) | (OpenRIO, FRC West Aus)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Perth, Western Australia
Posts: 628
Jaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond repute
Re: Git at competitions

Quote:
Originally Posted by connor.worley View Post
Anyone tried using the roborio as a git remote?
You shouldn't. It will require you to either:
A) Compile code on the robot
B) Include compiled artifacts in your git history

Neither A nor B are good things

It may be good for storing a backup of your sources, but at that point you're better off using a flash drive as a remote, since most flash drives are larger than the RoboRIO's measly flash storage.
__________________

Curtin FRC (5333+5663) : Head Mentor
WPILib : Developer

Website | Github
jaci.brunning@gmail.com
Reply With Quote
  #9   Spotlight this post!  
Unread 10-18-2018, 03:51 PM
connor.worley connor.worley is offline
Registered User
FRC #5499
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Berkeley
Posts: 763
connor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond repute
Re: Git at competitions

Quote:
Originally Posted by Jaci View Post
You shouldn't. It will require you to either:
A) Compile code on the robot
B) Include compiled artifacts in your git history

Neither A nor B are good things

It may be good for storing a backup of your sources, but at that point you're better off using a flash drive as a remote, since most flash drives are larger than the RoboRIO's measly flash storage.

You could push source over git and artifacts out of band (and require the former to succeed before trying the latter), but at that point a flash drive is probably easier.
__________________
Team 5499 (2015-present)
Past Teams: Team 973 (2016-2017) / Team 254 (2014-2015) / Team 1538 (2011-2014)
日本語副専攻です!話しましょう!
I work for Yelp on the Core Services team.
Reply With Quote
  #10   Spotlight this post!  
Unread 10-18-2018, 04:04 PM
Jon Stratis's Avatar
Jon Stratis Jon Stratis is offline
Mentor, LRI, MN RPC
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 5,131
Jon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond repute
Re: Git at competitions

Quote:
Originally Posted by Prateek M View Post
This is what we do. We all collaborate and make changes on one laptop (which also ends up being the DS Laptop). We then commit and push the changes to GitHub after the competition ends.
Same here. Keeping everything to a single laptop makes the world so much simpler. We also have enough "jobs" for people to do at competition that we can rarely have more than 2 programmers sitting around.

However, we try to avoid using the driver station laptop for programming at competition. That way the programmer can keep working on something while we are in a match or at the practice field, if needed.
__________________
LRI: North Star 2012-2016; Lake Superior 2013-2014; MN State Tournament 2013-2014, 2016-2018; Iowa 2017; Northern Lights 2018; Great Northern 2018-2019
Division LRI: Galileo 2016; Tesla 2017; Archimedes 2018
2015: North Star Regional Volunteer of the Year
2016: Lake Superior WFFA
Reply With Quote
  #11   Spotlight this post!  
Unread 10-18-2018, 04:06 PM
gerthworm's Avatar
gerthworm gerthworm is offline
Making the 1's and 0's
FRC #1736 (Robot Casserole)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Peoria, IL
Posts: 714
gerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond repute
Re: Git at competitions

Yes. We set up an extra server on each laptop that's being used for dev at the competition ("git remote add flashdrive F:\2018_repo"), then push/pull from flashdrive.

During the competition, that single golden flash drive gets to be the blessed repository with the official "most recent" code. GitHub becomes the backup. At hotel we will sometimes sync to the interwebs for backup purposes.

After competition, we sync one final time, and restore GitHub.com as the golden repository.

It should be noted: I personally thing the single-laptop is still not a bad idea. Despite Git's distributed nature, it is still good to have a constant notion of which version of the repo represents the most up-to-date "golden" copy that should actually get used on the field. Whether this is on a laptop, flash drive, etc. shouldn't matter.

Last edited by gerthworm : 10-18-2018 at 04:08 PM.
Reply With Quote
  #12   Spotlight this post!  
Unread 10-18-2018, 06:59 PM
bobbysq bobbysq is online now
Registered User
FRC #4646 (Team ASAP)
Team Role: Alumni
 
Join Date: Apr 2016
Rookie Year: 2015
Location: Des Moines, IA
Posts: 953
bobbysq has a reputation beyond reputebobbysq has a reputation beyond reputebobbysq has a reputation beyond reputebobbysq has a reputation beyond reputebobbysq has a reputation beyond reputebobbysq has a reputation beyond reputebobbysq has a reputation beyond reputebobbysq has a reputation beyond reputebobbysq has a reputation beyond reputebobbysq has a reputation beyond reputebobbysq has a reputation beyond repute
Re: Git at competitions

If cloud storage is really needed for some reason, it would be possible to have someone do a USB tether to a laptop for internet access. My team just uses one laptop at competition though.
Reply With Quote
  #13   Spotlight this post!  
Unread 10-19-2018, 12:01 AM
gixxy's Avatar
gixxy gixxy is offline
Programming Mentor
AKA: Gustave Michel III
FRC #3468 (MAGNATech)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Ruston, LA
Posts: 243
gixxy is on a distinguished road
Re: Git at competitions

Both teams I have worked with have basically just kept to one laptop during competition, and haven't had real reason to need more. So syncing git repos wasn't an issue.

Though my solution if I believed it would become necessary would probably be to setup a Raspberry Pi with a Network Switch to use as a local git server and allow developers to connect to it to push/pull code when needed. Then sync that with Github when we got to an Internet Connection.

Another option that we have used when is a USB Cellular modem to connect to Github to pull the code down.

Also you could in theory combine the two and have the Pi Sync to GitHub over a Cellular Modem if there are any with compatible drivers.
__________________
Programmer - A creature known for converting Caffeine into Code.
Studying Computer Science @ Louisiana Tech University
Associate Consultant @ Fenway Group

2012-13: 3946 - Head of Programming, Electrical and Web
2014 - 2018 - 3946 - Programming Mentor
2014, 2018 - Present - 3468 - Programming Mentor
Reply With Quote
  #14   Spotlight this post!  
Unread 10-19-2018, 01:52 AM
calcmogul's Avatar
calcmogul calcmogul is offline
WPILib Developer
AKA: Tyler Veness
FRC #3512 (Spartatroniks)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Hawthorne, CA
Posts: 109
calcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud ofcalcmogul has much to be proud of
Re: Git at competitions

Although the internet connections are slower and more expensive at competition (USB phone tethering), my team's workflow is the same at competitions as it is at home. Everyone works on feature branches and pushes their patches to our Gerrit instance in "the cloud" at their own convenience. We do this when another student needs the patchset or a student wants a remote mentor (usually me) to review and provide a second set of eyes for catching and fixing bugs (I'm usually watching the matches anyway). For extended questions and comments, we use Slack. I guess you could say we don't let a lack of wifi interrupt our testing and review procedures.

We have at most two laptops going at a time where the second is usually working on something experimental and lets us hot-swap if needed. If we need to bring other laptops in to replace those, the option is there because we sync our code to Gerrit regularly. By the time competition season rolls around, my students are pretty good at maintaining, manipulating, and navigating commit history, so we can be confident that what goes on the robot during matches has been tested and works. In my experience, emphasizing the graph theory representation of Git while teaching really helps students master the tool for when they need it most: in the heat of combat robot repairs.

In short, by taking advantage of Git's distributed nature in review as well as production, we are more adaptable at competition. Lack of wifi at venues hasn't been a real concern.
Reply With Quote
  #15   Spotlight this post!  
Unread 10-22-2018, 12:38 PM
GreyingJay GreyingJay is offline
we'll fix it in the pit
FRC #2706 (Merge Robotics)
Team Role: Mentor
 
Join Date: Mar 2015
Rookie Year: 2015
Location: Ottawa, Canada
Posts: 1,268
GreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond reputeGreyingJay has a reputation beyond repute
Re: Git at competitions

Ideally, in theory, very few code changes are required at competition because most of your code was written, tested, and working, before you showed up. (One day... one day...)

We also do the one-laptop model. We haven't formalized this, it just seems to be the way it happens, but it is easiest this way to ensure we don't lose any important bug fixes or changes.

Everyone who works on robot code uses a standard git flow model where they test in their own branch and then do pull requests to master. At a competition we'll take the latest in master (after making sure we're happy with it, of course) and create a new branch representing any code changes made at the competition. One software student will be in the pits doing any changes from one laptop, and push code to the robot. At night at the hotel we'll sync back to GitHub. When we come back from competition the code changes are merged back to master.

The software laptop has typically been the personal laptop of our most senior software student, though we may try to allocate an official team one so that multiple people could use it in theory. This will be different from the driver station laptops (we have at least 2 so there's always a spare).
__________________

"If I'm going to mentor someone, I'm going to be involved in their life as a positive force." -Mechvet
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 04:23 PM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi