Make usrc.py support Git tags

Description

There are multiple features that could be useful to add to usrc.py that has to do with Git tags:

  1. Snap to tag - when running update take the latest tagged commit from the branch instead of the latest commit. This could further be enhanced to decide what to do when there is no tagged commit that is newer then what we already have - we can either decide not to update or update to the latest (untagged) commit.

  2. Copy tag - when running with --commit and the upstream commit we're updating into is tagged, store some information somewhere so that if the commit is merged, the CI system could tag it automatically and push that tag. It should be possible to customise the tag we add to allow it to be different but derived from the upstream tag. One possible place to store the needed information is to use a header in the commit message like we do for auto-merge.

Activity

Show:
Emil Natan
September 2, 2018, 6:04 AM

Re the first part of task, I think about adding --tag option to the update command. If there is no newer tagged commit, then the upstream_sources file won't be updated. I do not see the use case of updating to untagged commit if tagged commit was requested by using --tag.

General question - if we are interested in specific type of tag, lightweight or annotated or just any type of tag? I'm in favor of any type of tag. Let me know what you think.

Barak Korren
September 2, 2018, 7:22 AM

Re the first part of task, I think about adding --tag option to the update command. If there is no newer tagged commit, then the upstream_sources file won't be updated. I do not see the use case of updating to untagged commit if tagged commit was requested by using --tag.

The point of the usrc.py update sub command is primarily to be used as part of the automated 'poll-upstream-sources' process, as such its probably best if:

  1. The snap-to-tag option will be specified in the upsgtream-sources.yaml file.

  2. If we make the tool only pull tagged commits, it will only get tagged commits for us to test in DS CI, this is why we want it to do both. Having said that, we may want to allow users to select that only tagged commits are pulled, perhaps by having 'snap-to-tag' be a 'yes/no/always' option.

General question - if we are interested in specific type of tag, lightweight or annotated or just any type of tag? I'm in favor of any type of tag. Let me know what you think.

Lets have the user be able to select that with appropriate options in the upsgtream-sources.yaml file. Try to keep the option names clear and descriptive. It important to be able to filter the tags used.

Ehud Yonasi
December 4, 2018, 2:07 PM

Hey, maybe we should make 2 fields such as:
1) snap to tag
2) tag name for comparison as commits?

Ehud Yonasi
January 28, 2019, 2:29 PM

Assignee

Ehud Yonasi

Reporter

Barak Korren

Blocked By

None

Components

Priority

Medium
Configure