Skip to content

Conversation

yangw-dev
Copy link
Contributor

@yangw-dev yangw-dev commented Apr 4, 2025

[Bug]
when call github apiwith path parameter. Only commits containing this file path will be returned (have changes)
all_commits = self.repo.get_commits(path=self.path)

This causes issue since the config file fetch will always return empty if there is no cofig file change happen after our time to take snapshot.

Proposal Change

  1. find the first commit that is later than start_time -> found, fetch config
  2. if nothing find, fetch commits that are before/equal to commit time -> get the closest commit and fetch config

Copy link

vercel bot commented Apr 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
torchci ⬜️ Ignored (Inspect) Visit Preview Apr 7, 2025 6:10pm

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 4, 2025
@yangw-dev
Copy link
Contributor Author

Not sure if this what we aiming for,
I assume we just want to fetch the latest change close to this commit?

@yangw-dev yangw-dev marked this pull request as ready for review April 4, 2025 22:11
@yangw-dev yangw-dev requested a review from jeanschmidt April 4, 2025 22:15
info(
f" [LazyFileHistory] Nothing found, get latest commit before {timestamp.isoformat()} "
)
return self._find_closest_before_or_equal(timestamp)
Copy link
Contributor

Choose a reason for hiding this comment

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

res = self._find_closest_before_or_equal(timestamp)

@yangw-dev yangw-dev merged commit 6176464 into main Apr 7, 2025
7 checks passed
@yangw-dev yangw-dev deleted the investigateGitFileCOnfig branch April 7, 2025 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants