Skip to content

Bump tornado from 6.4.1 to 6.4.2 #3097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 34 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
247b3bf
fix pr events uniqueness
ABrain7710 Mar 8, 2025
4ed1a26
update revision number
ABrain7710 Mar 8, 2025
cff1bdc
incrementally update database
ABrain7710 Mar 12, 2025
025192b
add index log
ABrain7710 Mar 12, 2025
e00d172
only print if there are rows that need updated
ABrain7710 Mar 12, 2025
53748c4
Update README.md
sgoggins Mar 12, 2025
e67cf0c
Update metadata.py
sgoggins Mar 12, 2025
65e08c9
Merge pull request #3046 from chaoss/events-fix
sgoggins Mar 12, 2025
1b4b6cd
remove podman compose
MoralCode Mar 16, 2025
2b5981c
Delete Vagrantfile
MoralCode Mar 16, 2025
3ae2c20
Update gsoc-ideas.md
sgoggins Mar 17, 2025
7deb0f1
Update gsoc-ideas.md
sgoggins Mar 17, 2025
d8d40a2
add flower section to the docker compose
MoralCode Mar 18, 2025
a96b838
Update CONTRIBUTING.md
sgoggins Mar 18, 2025
b475105
fixing install-dev command by removal
sgoggins Mar 18, 2025
3a26e54
Merge pull request #3066 from MoralCode/flower-compose
sgoggins Mar 18, 2025
4dbc908
Merge pull request #3060 from MoralCode/dedupe-compose
sgoggins Mar 18, 2025
661f03e
Merge pull request #3061 from MoralCode/remove-vagrant
sgoggins Mar 18, 2025
64cc5e1
log stderr in called process for facade commit count
IsaacMilarky Mar 18, 2025
f4dad21
stop using keys once they have 100 requests remaining
ABrain7710 Mar 19, 2025
192f87d
set to 50
ABrain7710 Mar 19, 2025
73a4c6a
adjust path that scc gets copied to
MoralCode Mar 14, 2025
9792586
Merge pull request #3070 from chaoss/log-facade-git-128
sgoggins Mar 19, 2025
99c73c1
Merge pull request #3071 from chaoss/leave-room-on-keys
sgoggins Mar 19, 2025
230925e
Merge pull request #3068 from chaoss/docs-patch-spg-1
sgoggins Mar 19, 2025
84ac28d
Merge pull request #3067 from chaoss/sgoggins-patch-2-contributing.doc
sgoggins Mar 19, 2025
a234b9f
Merge pull request #3055 from MoralCode/patch-3053
sgoggins Mar 19, 2025
a414ab1
version update
sgoggins Mar 19, 2025
0b829bb
Merge pull request #3074 from chaoss/version0.85.3
sgoggins Mar 19, 2025
a71fde9
fix syntax error
Mar 21, 2025
2000270
Merge pull request #3083 from marcelb98/main
sgoggins Mar 21, 2025
ec1f374
Rework CI container builds
JohnStrunk Mar 31, 2025
648ce67
Merge pull request #3093 from JohnStrunk/action-docker-build
sgoggins Apr 1, 2025
27d0e40
Bump tornado from 6.4.1 to 6.4.2
dependabot[bot] Apr 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 50 additions & 28 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,45 +11,67 @@ on:
release:
types:
- published
workflow_dispatch:

permissions: {}

jobs:
build:
name: Build image
permissions:
contents: read # to fetch code (actions/checkout)
packages: write # to push docker image

name: Build image
strategy:
matrix:
image:
- backend
- database
- rabbitmq
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v2
- name: Run the build
run: |
set -ex
# use that here since the variable are not present before start, so can't be in env
export LOGIN=$GITHUB_REPOSITORY_OWNER
- name: Checkout repository
uses: actions/checkout@v4

echo $PASSWORD | docker login $REGISTRY -u $LOGIN --password-stdin
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
id: setup-buildx

for i in docker/* ; do
CONTAINER=$(basename $i)
echo "Building $CONTAINER"
export IMAGE=$LOGIN/augur_$CONTAINER
DOCKERFILE=${i}/Dockerfile
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

docker build . -f $DOCKERFILE --tag $REGISTRY/$IMAGE:latest
if [[ $GITHUB_EVENT_NAME == 'release' ]]; then
TAG=$(basename $GITHUB_REF)
docker tag $REGISTRY/$IMAGE:latest $REGISTRY/$IMAGE:$TAG
docker push $REGISTRY/$IMAGE:latest
docker push $REGISTRY/$IMAGE:$TAG
elif [[ $GITHUB_EVENT_NAME == 'push' ]]; then
docker tag $REGISTRY/$IMAGE:latest $REGISTRY/$IMAGE:devel-latest
docker push $REGISTRY/$IMAGE:devel-latest
fi
done
- name: Set container metadata
uses: docker/metadata-action@v5
id: meta
env:
REGISTRY: ghcr.io
PASSWORD: ${{ secrets.GITHUB_TOKEN }}
DOCKER_METADATA_ANNOTATIONS_LEVELS: index,manifest
with:
annotations: |
org.opencontainers.image.title=augur_${{ matrix.image}}
labels: |
org.opencontainers.image.title=augur_${{ matrix.image}}
images: ghcr.io/${{ github.repository_owner }}/augur_${{ matrix.image }}
# Pushes to the dev branch update the *:devel-latest tag
# Releases update the *:latest tag and the *:<version> tag
tags: |
type=raw,value=devel-latest,enable=${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/dev' }}
type=raw,value=latest,enable=${{ github.event_name == 'release' }}
type=raw,value=${{ github.event.release.tag_name }},enable=${{ github.event_name == 'release' }}

- name: Build and push
id: push
uses: docker/build-push-action@v6
with:
annotations: ${{ steps.meta.outputs.annotations }}
context: .
file: ./docker/${{ matrix.image }}/Dockerfile
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha,scope=container-${{ matrix.image }}
cache-to: type=gha,scope=container-${{ matrix.image }},mode=max
20 changes: 0 additions & 20 deletions .github/workflows/docker-image.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ git push origin master
### Augur
- [Stable documentation (`main` branch)](https://oss-augur.readthedocs.io/en/main/)
- [Nightly/developer build documentation (`dev` branch)](https://oss-augur.readthedocs.io/en/dev/) (warning: this is should be considered an unstable branch and should not be used for production)
- [Live Augur demo](http://zephyr.osshealth.io/)
- [Live Augur demo](https://ai.chaoss.io)

### CHAOSS
- [Website](https://chaoss.community/)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Augur NEW Release v0.85.1
# Augur NEW Release v0.85.3

Augur is primarily a data engineering tool that makes it possible for data scientists to gather open source software community data - less data carpentry for everyone else!
The primary way of looking at Augur data is through [8Knot](https://github.com/oss-aspen/8knot), a public instance of 8Knot is available [here](https://metrix.chaoss.io) - this is tied to a public instance of [Augur](https://ai.chaoss.io).
Expand All @@ -11,7 +11,7 @@ We follow the [First Timers Only](https://www.firsttimersonly.com/) philosophy o
## NEW RELEASE ALERT!
**If you want to jump right in, the updated docker, docker-compose and bare metal installation instructions are available [here](docs/new-install.md)**.

Augur is now releasing a dramatically improved new version to the ```main``` branch. It is also available [here](https://github.com/chaoss/augur/releases/tag/v0.85.1).
Augur is now releasing a dramatically improved new version to the ```main``` branch. It is also available [here](https://github.com/chaoss/augur/releases/tag/v0.85.3).


- The `main` branch is a stable version of our new architecture, which features:
Expand Down
108 changes: 0 additions & 108 deletions Vagrantfile

This file was deleted.

2 changes: 1 addition & 1 deletion augur/application/db/data_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def extract_pr_event_data(event: dict, pr_id: int, gh_src_id: int, platform_id:
'action': event['event'],
'action_commit_hash': None,
'created_at': event['created_at'],
'issue_event_src_id': gh_src_id,
'issue_event_src_id': event["id"],
'node_id': event['node_id'],
'node_url': event['url'],
'tool_source': tool_source,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
"""Update pr events unique

Revision ID: 31
Revises: 30
Create Date: 2025-03-08

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy import text
from augur.application.db import create_database_engine, get_database_string


# revision identifiers, used by Alembic.
revision = '31'
down_revision = '30'
branch_labels = None
depends_on = None


# conn = op.get_bind()
# conn.execute(text("""
# UPDATE pull_request_events
# SET issue_event_src_id = substring(node_url FROM '.*/([0-9]+)$')::BIGINT;
# """))


def upgrade():

connection_string = get_database_string()
engine = create_database_engine(connection_string)

with engine.connect() as conn:

result = conn.execute(text("SELECT COUNT(*) FROM pull_request_events WHERE issue_event_src_id=pr_platform_event_id"))
total_rows = result.scalar()
if total_rows != 0:
print(f"Rows needing updated: {total_rows}")
print(f"0.0% complete")
total_updated = 0

while True:
result = conn.execute(text("""
WITH cte AS (
SELECT pr_event_id
FROM pull_request_events
WHERE issue_event_src_id=pr_platform_event_id
LIMIT 250000
)
UPDATE pull_request_events
SET issue_event_src_id = substring(node_url FROM '.*/([0-9]+)$')::BIGINT
FROM cte
WHERE pull_request_events.pr_event_id = cte.pr_event_id
RETURNING 1;
"""))

conn.commit()

rows_updated = result.rowcount
total_updated += rows_updated

if rows_updated == 0:
print(f"Update complete")
break

percentage_updated = (total_updated / total_rows) * 100

print(f"{percentage_updated:.1f}% complete ({total_rows-total_updated} rows left)")

print("Creating (repo_id, issue_event_src_id) index")
op.create_unique_constraint('pr_events_repo_id_event_src_id_unique', 'pull_request_events', ['repo_id', 'issue_event_src_id'], schema='augur_data')


def downgrade():
op.drop_constraint('pr_events_repo_id_event_src_id_unique', 'pull_request_events', schema='augur_data', type_='unique')

print("Please run in background. This downgrade will take a very *very* long time")
conn = op.get_bind()
conn.execute(text("""
UPDATE pull_request_events
SET issue_event_src_id = pr_platform_event_id
WHERE issue_event_src_id <> pr_platform_event_id;
"""))
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import sqlalchemy as s

from augur.application.db.lib import execute_sql, fetchall_data_from_sql_text
from augur.tasks.init import get_rabbitmq_conn_string

def analyze_commit(logger, repo_id, repo_loc, commit):

Expand Down
12 changes: 10 additions & 2 deletions augur/tasks/git/util/facade_worker/facade_worker/utilitymethods.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# repos. It also rebuilds analysis data, checks any changed affiliations and
# aliases, and caches data for display.
import subprocess
from subprocess import check_output
from subprocess import check_output, CalledProcessError
import os
import sqlalchemy as s
from augur.application.db.models import *
Expand Down Expand Up @@ -154,7 +154,15 @@ def get_repo_commit_count(logger, facade_helper, repo_git):
if count_branches(repo_loc) == 0:
return 0

check_commit_count_cmd = check_output(["git", "--git-dir", repo_loc, "rev-list", "--count", "HEAD"])
try:
check_commit_count_cmd = check_output(
["git", "--git-dir", repo_loc, "rev-list", "--count", "HEAD"],
stderr=subprocess.PIPE)
except CalledProcessError as e:
logger.error(f"Ran into {e}: {e.output} {e.stderr} \n With return code {e.returncode}")
raise e


commit_count = int(check_commit_count_cmd)

return commit_count
Expand Down
2 changes: 1 addition & 1 deletion augur/tasks/github/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def _insert_issue_events(self, events):
bulk_insert_dicts(self._logger, events, IssueEvent, issue_event_natural_keys)

def _insert_pr_events(self, events):
pr_event_natural_keys = ["node_id"]
pr_event_natural_keys = ["repo_id", "issue_event_src_id"]
bulk_insert_dicts(self._logger, events, PullRequestEvent, pr_event_natural_keys)

def _insert_contributors(self, contributors):
Expand Down
Loading
Loading