Skip to content

Support tracking git references in track bundle#1453

Merged
zregvart merged 5 commits into
conforma:mainfrom
zregvart:issue/EC-386
Mar 20, 2024
Merged

Support tracking git references in track bundle#1453
zregvart merged 5 commits into
conforma:mainfrom
zregvart:issue/EC-386

Conversation

@zregvart

Copy link
Copy Markdown
Contributor

Also contains some refactoring in separate commits.

@codecov

codecov Bot commented Mar 19, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 86.44068% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 87.16%. Comparing base (370a1a7) to head (5d1c17b).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1453      +/-   ##
==========================================
+ Coverage   80.28%   87.16%   +6.87%     
==========================================
  Files          66       77      +11     
  Lines        4637     5009     +372     
==========================================
+ Hits         3723     4366     +643     
+ Misses        914      643     -271     
Flag Coverage Δ
acceptance 72.62% <84.74%> (?)
generative 80.35% <84.74%> (+0.07%) ⬆️
integration 80.35% <84.74%> (+0.07%) ⬆️
unit 80.35% <84.74%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
cmd/track/track_bundle.go 95.95% <100.00%> (+1.11%) ⬆️
internal/tracker/tracker.go 92.34% <84.00%> (+7.25%) ⬆️

... and 39 files with indirect coverage changes

if err := t.convertToOldFormat(); err != nil {
return nil, err
for _, u := range urls {
repository, rest, found := strings.Cut(u, "//")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does this mean we have to specify git+ssh or git+https for task references (used by git resolver) when calling the ec track command?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Interesting, when handling on the policy side we might ignore whether the scheme is git+ssh or git+https or git+..., we might not care at all about the transfer protocol...

Comment thread cmd/track/track_bundle.go Outdated
Comment thread internal/tracker/tracker.go Outdated
Dates with `0` on the second digit will not be replaced, this leaves
dates that are significant, i.e. those in the past or in the far future
within the snapshot.
Now we can see these significant dates in the snapshots, i.e. we can see
that an `effective_on` date is kept the same.
We can use the feature of Cobra to require at least one of `--bundle` or
`--input` to be provided.
@zregvart

Copy link
Copy Markdown
Contributor Author

Nits were easy to address so merging this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants