Skip to content

feat(Provider): Add ResolveSourceIdentity() to the source provider interface#45

Open
dmcilvaney wants to merge 1 commit intomicrosoft:mainfrom
dmcilvaney:damcilva/component_change_detection_parts/3
Open

feat(Provider): Add ResolveSourceIdentity() to the source provider interface#45
dmcilvaney wants to merge 1 commit intomicrosoft:mainfrom
dmcilvaney:damcilva/component_change_detection_parts/3

Conversation

@dmcilvaney
Copy link
Copy Markdown
Contributor

@dmcilvaney dmcilvaney commented Mar 31, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 31, 2026 00:51
@dmcilvaney dmcilvaney changed the title feat(Provider): Add ResolveSourceIdentity() to the source provider in… feat(Provider): Add ResolveSourceIdentity() to the source provider interface Mar 31, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a “source identity” concept to source providers and the source manager so callers can compute a deterministic, reproducible identifier for a component’s source (e.g., commit hash for dist-git, content hash for local specs).

Changes:

  • Introduce SourceIdentityProvider and extend ComponentSourceProvider / SourceManager with ResolveSourceIdentity(...).
  • Implement identity resolution for upstream providers (Fedora provider resolves an effective commit; RPM contents provider hashes downloaded RPM content).
  • Add local spec-directory identity hashing via a new ResolveLocalSourceIdentity(...) helper.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
internal/providers/sourceproviders/sourceproviders_test/sourcemanager_mocks.go Updates SourceManager mock to include ResolveSourceIdentity (test support).
internal/providers/sourceproviders/sourcemanager.go Adds SourceIdentityProvider, wires identity resolution into SourceManager.
internal/providers/sourceproviders/rpmcontentsprovider.go Implements identity for RPM-backed sources by hashing the downloaded RPM.
internal/providers/sourceproviders/localidentity.go Adds deterministic hashing of all files under a local spec directory.
internal/providers/sourceproviders/identityprovider_test.go Adds unit tests around identity resolution helpers/providers.
internal/providers/sourceproviders/fedorasourceprovider.go Implements upstream identity resolution based on pinned commit / snapshot time / current HEAD.

@dmcilvaney dmcilvaney force-pushed the damcilva/component_change_detection_parts/3 branch from 625fb53 to 5c27839 Compare March 31, 2026 00:58
Copilot AI review requested due to automatic review settings March 31, 2026 01:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings March 31, 2026 21:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

@dmcilvaney dmcilvaney force-pushed the damcilva/component_change_detection_parts/3 branch 2 times, most recently from f231810 to 67dc565 Compare March 31, 2026 21:39
Copilot AI review requested due to automatic review settings March 31, 2026 21:53
@dmcilvaney dmcilvaney force-pushed the damcilva/component_change_detection_parts/3 branch from 67dc565 to f159df5 Compare March 31, 2026 21:53
@dmcilvaney dmcilvaney force-pushed the damcilva/component_change_detection_parts/3 branch from f159df5 to aa96fa6 Compare March 31, 2026 21:59
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

// Collect all files in the spec directory.
var filePaths []string

err := afero.Walk(filesystem, specDir,
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.

Is there any concern about recursive fingerprinting of toml files...
Probably an edge case we can just accept for now.

@dmcilvaney dmcilvaney force-pushed the damcilva/component_change_detection_parts/3 branch from aa96fa6 to 4ac2bc4 Compare March 31, 2026 23:07
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