Skip to content

Conversation

nathanjd
Copy link
Member

@nathanjd nathanjd commented Aug 13, 2025

Summary:

I completed a TODO in #349 to
just have kaGit.mergeRevisions return the SHA from ls-remote if there
are actually no merges to perform. But by skipping checkout,
make gae_version_name is generating the name from whatever
cached version of the repo it had from the last job. This is preventing
the prerequisite merge-branches from successfully reporting back to
buildmaster due to:

psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "commit_gae_version_name_key"

So, webapp-test is never kicked off for PRs.

https://khanacademy.slack.com/archives/C013ANU53LK/p1755118117498589

Remove this optimization so that, when the merge-branches job calls
make gae_version_name, it is run against the correct git revision.

Once this is merged, I will replay all the merge-branches jobs that
failed to report to buildmaster due to this issue.

Issue: https://khanacademy.atlassian.net/browse/INFRA-10737

Test plan:

Replay existing merge-branches job that failed to report to buildmaster
due to this issue.

https://jenkins.khanacademy.org/job/deploy/job/merge-branches/326071/console

Tested with replay:

https://jenkins.khanacademy.org/job/deploy/job/merge-branches/326086/console

As a result, buildmaster successfully kiced off a webapp-test:

https://jenkins.khanacademy.org/job/deploy/job/webapp-test/308969/

…ut during merge-branches

I completed a TODO in #349 to
just have merge-branches return the SHA from ls-remote if there are
actually no merges to perform. But by skipping checkout, `make
gae_version_name` is generating the name from whatever cached version of
the repo it had from the last job.

Remove this optimization so that, when the merge-branches job calls
`make gae_version_name`, it is run against the correct git revision.

Issue: https://khanacademy.atlassian.net/browse/INFRA-10737

Test plan:

Replay existing merge-branches job that failed to report to buildmaster
due to this issue.

https://jenkins.khanacademy.org/job/deploy/job/merge-branches/326071/console

Tested with replay:

https://jenkins.khanacademy.org/job/deploy/job/merge-branches/326086/console

As a result, buildmaster successfully kiced off a webapp-test:

https://jenkins.khanacademy.org/job/deploy/job/webapp-test/308969/
@nathanjd nathanjd requested a review from a team as a code owner August 13, 2025 23:10
@nathanjd nathanjd self-assigned this Aug 13, 2025
@nathanjd nathanjd requested review from benchristel and jwbron August 13, 2025 23:10
@nathanjd nathanjd merged commit cecfadd into master Aug 13, 2025
@nathanjd nathanjd deleted the infra-10737-prevent-cached-gae-version-name branch August 13, 2025 23:23
Copy link
Member

@csilvers csilvers left a comment

Choose a reason for hiding this comment

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

Ooh, good sleuthing.

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