diff --git a/infra/build/functions/request_build.py b/infra/build/functions/request_build.py index b7046c7eb..f636397e5 100644 --- a/infra/build/functions/request_build.py +++ b/infra/build/functions/request_build.py @@ -32,7 +32,7 @@ MAX_BUILD_HISTORY_LENGTH = 64 def update_build_history(project_name, build_id, build_tag): """Update build history of project.""" - project_key = ndb.Key(BuildsHistory, project_name + build_tag) + project_key = ndb.Key(BuildsHistory, project_name + '-' + build_tag) project = project_key.get() if not project: diff --git a/infra/build/functions/request_build_test.py b/infra/build/functions/request_build_test.py index 9589c09b4..d73467216 100644 --- a/infra/build/functions/request_build_test.py +++ b/infra/build/functions/request_build_test.py @@ -82,7 +82,7 @@ class TestRequestBuilds(unittest.TestCase): build_tag='fuzzing', project='test-project', build_ids=[str(i) for i in range(1, 65)]).put() - update_build_history('test-project', '65', '-fuzzing') + update_build_history('test-project', '65', 'fuzzing') expected_build_ids = [str(i) for i in range(2, 66)] self.assertEqual(BuildsHistory.query().get().build_ids,