Skip to content

Enhance git reference last commit checker#2170

Merged
ottersbot merged 3 commits intokyma-project:mainfrom
pPrecel:git-service
Jan 13, 2026
Merged

Enhance git reference last commit checker#2170
ottersbot merged 3 commits intokyma-project:mainfrom
pPrecel:git-service

Conversation

@pPrecel
Copy link
Contributor

@pPrecel pPrecel commented Jan 9, 2026

Description

Changes proposed in this pull request:

  • improve the git package to support ordering async checking instead of blocking reconciliation loop until operation is done
  • the mechanism has its own cache that will automatically clean up entries older than 5 minutes

Related issue(s)

@pPrecel pPrecel requested a review from a team as a code owner January 9, 2026 11:58
@pPrecel pPrecel force-pushed the git-service branch 3 times, most recently from 24deda7 to 2a3a8cb Compare January 9, 2026 13:27
@pPrecel pPrecel enabled auto-merge (squash) January 9, 2026 13:37
@anoipm anoipm self-assigned this Jan 12, 2026
@ottersbot ottersbot disabled auto-merge January 13, 2026 08:05
@ottersbot ottersbot enabled auto-merge (squash) January 13, 2026 09:14

//go:generate mockery --name=AsyncLatestCommitChecker --output=automock --outpkg=automock --case=underscore
type AsyncLatestCommitChecker interface {
MakeOrder(string, string, string, *GitAuth)
Copy link
Contributor

Choose a reason for hiding this comment

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

The name MakeOrder is too ambiguous for me. Maybe something like SendRequest, CreateRequest, PlaceOrder?

//go:generate mockery --name=AsyncLatestCommitChecker --output=automock --outpkg=automock --case=underscore
type AsyncLatestCommitChecker interface {
MakeOrder(string, string, string, *GitAuth)
CollectOrder(string) *OrderResult
Copy link
Contributor

Choose a reason for hiding this comment

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

Mayge it could be something like GetResult, GetOrderResult?

implement

migrate tests

test new scenario

remove old code

fix imports

test checker

move checker declaration to main.go to pass main context to it

implement simple cache with entry per function

tests

fix tests
@ottersbot ottersbot merged commit a419773 into kyma-project:main Jan 13, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants