diff --git a/Makefile b/Makefile index 75f9fe896d..d0979c8592 100644 --- a/Makefile +++ b/Makefile @@ -178,6 +178,9 @@ push.self-hosted-rolling: docker push ${DOCKERHUB_REPO}:rolling_no_dependencies docker push ${DOCKERHUB_REPO}:rolling +shell: + docker-compose exec api bash + test_env.up: env | grep GITHUB > .testenv; true TIMESERIES_ENABLED=${TIMESERIES_ENABLED} docker-compose up -d diff --git a/upload/helpers.py b/upload/helpers.py index cd472358d2..769435bca3 100644 --- a/upload/helpers.py +++ b/upload/helpers.py @@ -497,9 +497,6 @@ def insert_commit(commitid, branch, pr, repository, owner, parent_commit_id=None ) edited = False - if commit.state != "pending": - commit.state = "pending" - edited = True if parent_commit_id and commit.parent_commit_id is None: commit.parent_commit_id = parent_commit_id edited = True @@ -508,7 +505,7 @@ def insert_commit(commitid, branch, pr, repository, owner, parent_commit_id=None commit.branch = branch edited = True if edited: - commit.save(update_fields=["parent_commit_id", "state", "branch"]) + commit.save(update_fields=["parent_commit_id", "branch"]) return commit diff --git a/upload/tests/test_upload.py b/upload/tests/test_upload.py index 56209c855f..980bcf1b27 100644 --- a/upload/tests/test_upload.py +++ b/upload/tests/test_upload.py @@ -636,7 +636,7 @@ def test_insert_commit(self): repository=repo, parent_commit_id=None, ) - # parent_commit_id, state, and branch should be updated + # parent_commit_id and branch should be updated insert_commit( "1c78206f1a46dc6db8412a491fc770eb7d0f8a47", "oranges", @@ -650,7 +650,6 @@ def test_insert_commit(self): commitid="1c78206f1a46dc6db8412a491fc770eb7d0f8a47" ) assert commit.repository == repo - assert commit.state == "pending" assert commit.branch == "oranges" assert commit.pullid == 456 assert commit.merged is None @@ -671,7 +670,6 @@ def test_insert_commit(self): commitid="8458a8c72aafb5fb4c5cd58f467a2f71298f1b61" ) assert commit.repository == repo - assert commit.state == "pending" assert commit.branch == "test" assert commit.pullid is None assert commit.merged is None