-
Notifications
You must be signed in to change notification settings - Fork 9
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 selection conditions for packages with modified source trees #25
Comments
In this usage example I am wondering why
I am not convinced "audit" is the right term for this functionality. Nothing is being reviewed here. It is more like watching for changes in the file system. I don't have a good proposal atm though.
Do you have a use case for
I would solely base that on concrete use cases - what do users want to achieve and what options would be necessary to achieve that?
I would think it would be sufficient to to the most general approach: skip files/directories starting with a dot, and maybe ignore files listed in a global gitignore configuration. That shouldn't need a dependency. Let's figure that out on demand though - moving a package into a separate repo is straight forward anytime.
That sounds reasonable to me. The use case in mind would be that you can repeatedly call the |
One more though: the following scenario should work imo: If since a previous audit |
@ruffsl Have you had a chance to make any progress towards this feature idea? |
Afraid not yet, had get through my thesis proposal before winter break, and am now tasked with winter conference deadlines. Are there other interested parties in having this work space level caching? Perhaps we could pitch this feature idea to the rest of the tooling working group? |
Hey @dirk-thomas , @tylerjw , @mikepurvis , @mm318 ! I started a working proof a concept: #44 Could use some help to get it over the finish line and clean up. |
Since I don't use this tool anymore I won't be able to invest time. |
I know this is probably not super helpful but I have two solutions for this. Locally I created this and use it: https://github.com/tylerjw/moveit_ci_tools And then for CI I have been using this: |
@tylerjw woah, clever. Looks like this relies on git specifically to check for file diffs. My draft PRs are more generic, but I like the git method too for its native support for |
@dirk-thomas and @tylerjw , I've roughly prototyped a new working colcon extension for caching invocations of verbs. |
As discussed in colcon/colcon-core#213 , I think it would be useful to add a selection argument to filter packages by those were it's source code has changed with respect to what was used in the previous workspace build. This could be achieved by augmenting the verbs to audit the source folder of a package when specified, and later comparing the source tree with the previous audit file when determining selecting conditions. It could also be version control aware to ignore specific files/folders.
An example workflow could be as follows:
So far, I'm thinking of adding two arguments, one that can be used with existing verbs to audit the source and store the audit file to the package build folder for later use. The second would be used to filter packages by investigating deltas between the audit file and current package's source tree.
Before starting a PR, I'd like to iterate on a few things:
Terminology
I've used the term
audit
as similar defined in https://github.com/jessek/hashdeep CLI, but perhaps this argument should be made more specific? e.g.--audit-packages
?For the filter argument, given the
AND
logic of all conditions, I see there is a pattern for having an inclusive and exclusive conditions for settingselected = False
assignment. E.g.packages_select_test_failures
vs.packages_skip_test_passed
. In a similar style, perhaps we could use the names:packages_select_audit_changed
packages_skip_audit_changed
or
packages_select_audit_changed
packages_skip_audit_unchanged
I guess it was intentional by design not to make select/skip_test purly symmetric, as
packages_skip_test_passed
includes both failed and untested packages, whilepackages_select_test_failures
only includes failed packages. What would be the appropriate dualism here?Extension
Taking a look at the
colcon-package-selection
extensions, I think adding the feature here might be most appropriate for code reuse. However, if we wanted to add dependencies like gitpython to be version control aware for ignoring files, should we then seek to break this out into its own extension?Persisting Audits
When the build verb is specified to audit, should the audit file only be over-written to the build folder upon a successful build? I was thinking if the audit file was always updated, regardless of the success of the build, then what would be the cleanest order of commands to rebuild packages matching
(audit-changed OR build-not-passed)
?What does it mean to the filter aurments when the audit file does not exist? Should unchanged only be interpreted by the existence of a colcon_audit that matches the audit at runtime, similar to how a package build is only considered as
passed
if thecolcon_build.rc
exists and only contains0
? This might be a consideration for the asymmetric duality in select/skip arguments.The text was updated successfully, but these errors were encountered: