From cf9f8e7c696d84b8fea1557e17a3aa3ff453e375 Mon Sep 17 00:00:00 2001 From: trent-codecov Date: Thu, 31 Oct 2024 11:51:47 -0400 Subject: [PATCH 1/2] Add make shell --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 3cfaa95d1..5ffc2dc7b 100644 --- a/Makefile +++ b/Makefile @@ -199,6 +199,9 @@ push.self-hosted-rolling: docker push ${DOCKERHUB_REPO}:rolling_no_dependencies docker push ${DOCKERHUB_REPO}:rolling +shell: + docker-compose exec worker bash + test_env.up: env | grep GITHUB > .testenv; true TIMESERIES_ENABLED=${TIMESERIES_ENABLED} docker-compose up -d @@ -213,6 +216,7 @@ test_env.install_cli: pip install --no-cache-dir codecov-cli==$(CODECOV_CLI_VERSION) test_env.container_prepare: + apt-get update apt-get install -y git build-essential netcat-traditional make test_env.install_cli git config --global --add safe.directory /worker From aa812ed427c9b007554ad9de37fdd5a5e090f807 Mon Sep 17 00:00:00 2001 From: trent-codecov Date: Thu, 31 Oct 2024 15:08:38 -0400 Subject: [PATCH 2/2] Only update repo timestamp if something changed --- tasks/sync_repos.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/tasks/sync_repos.py b/tasks/sync_repos.py index 0c8a68238..af027af30 100644 --- a/tasks/sync_repos.py +++ b/tasks/sync_repos.py @@ -524,11 +524,21 @@ def upsert_repo( if repo: # Found the exact repo. Let's just update - repo.private = repo_data["private"] - repo.language = repo_data["language"] - repo.name = repo_data["name"] - repo.deleted = False - repo.updatestamp = datetime.now() + has_changes = False + if repo.private != repo_data["private"]: + repo.private = repo_data["private"] + has_changes = True + if repo.language != repo_data["language"]: + repo.language = repo_data["language"] + has_changes = True + if repo.name != repo_data["name"]: + repo.name = repo_data["name"] + has_changes = True + if repo.deleted is not False: + repo.deleted = False + has_changes = True + if has_changes: + repo.updatestamp = datetime.now() repo_id = repo.repoid return repo_id # repo was not found, could be a different owner