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

Add fast deployment #339

Closed
wants to merge 2 commits into from
Closed

Add fast deployment #339

wants to merge 2 commits into from

Conversation

Flova
Copy link
Member

@Flova Flova commented Feb 7, 2024

Summary

Related issues

Checklist

  • Run colcon build
  • Write documentation
  • Create issues for future work
  • Test on your machine
  • Test on the robot
  • This PR is on our Software project board

@Flova Flova marked this pull request as draft February 7, 2024 15:06
Copy link
Contributor

@texhnolyze texhnolyze left a comment

Choose a reason for hiding this comment

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

Hey sorry, I missed that the PR is still a draft.
Feel free to disregard stuff, that is not applicable anymore.

"-f",
"--fast",
action="store_true",
help="Don't build/compile on the target machines, instead synchronize the complete install directory from the local machine.",
Copy link
Contributor

Choose a reason for hiding this comment

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

I would write build/install, as we are syncing both as far as I've seen.

@@ -99,6 +100,12 @@ def _parse_arguments(self) -> argparse.Namespace:
)

# Optional arguments
parser.add_argument(
Copy link
Contributor

Choose a reason for hiding this comment

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

I personally would suggest renaming or even skipping the -f shorthand, because in a lot of tools -f stands for force and breaks with general CLI tooling convention.

Also, as long as we are not using the -f flag for multiple combined speedup options, I would suggest defining a dest with a clear variable name, as with the other arguments.

E.g. sync_build_alternative or just skip_build or something of the sort.

@@ -140,6 +147,12 @@ def _parse_arguments(self) -> argparse.Namespace:
args.build = args.only_build
args.launch = args.only_launch

if args.fast:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's generally fine, but now you could theroretically pass both --build and --fast and get a potentially confusing outcome for the user, as changed files on the robot are also cleaned and no build is happening.

self._remote_workspace = remote_workspace
self._package = package
self._pre_clean = pre_clean
self._fast = fast
Copy link
Contributor

Choose a reason for hiding this comment

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

I think fast is especially wrong in a Sync class, seeing as the non fast sync includes less files and should actually be faster.

"'--include=+ install'",
"'--include=+ install/**'",
"'--include=+ src'",
"'--include=+ src/**'",
Copy link
Contributor

Choose a reason for hiding this comment

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

Could including all src/** subfolders lead to later build/execution issues, when things are copied that are not part of our sync includes?

@jaagut
Copy link
Member

jaagut commented May 2, 2024

We don't want to finish this, as the feature "fast deployement" my introduce errors and we can only use this in a few situations. Current methods work sufficiently. We don't need to introduce this additional dirty complexity.

@jaagut jaagut closed this May 2, 2024
@jaagut jaagut deleted the feature/fast_deploy branch May 2, 2024 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants