Skip to content
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

Remove the use of shell for mkdir -p #2314

Merged
merged 8 commits into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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.50.1
# Augur NEW Release v0.50.2

[![first-timers-only](https://img.shields.io/badge/first--timers--only-friendly-blue.svg?style=flat-square)](https://www.firsttimersonly.com/) We follow the [First Timers Only](https://www.firsttimersonly.com/) philosophy of tagging issues for first timers only, and walking one newcomer through the resolution process weekly. [You can find these issues tagged with "first timers only" on our issues list.](https://github.com/chaoss/augur/labels/first-timers-only).

Expand All @@ -8,7 +8,7 @@
### [If you want to jump right in, updated docker build/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.50.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.50.2
- The `main` branch is a stable version of our new architecture, which features:
- Dramatic improvement in the speed of large scale data collection (100,000+ repos). All data is obtained for 100k+ repos within 2 weeks.
- A new job management architecture that uses Celery and Redis to manage queues, and enables users to run a Flower job monitoring dashboard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import getopt
import xlsxwriter
import configparser
import pathlib
import sqlalchemy as s
from .facade02utilitymethods import update_repo_log, trim_commit, store_working_author, trim_author, get_absolute_repo_path
from augur.application.db.models.augur_data import *
Expand Down Expand Up @@ -114,21 +115,16 @@ def git_repo_initialize(session, repo_git):
return

# Create the prerequisite directories
return_code = subprocess.Popen([f"mkdir -p {repo_path}"],shell=True).wait()
# session.log_activity('Info','Return code value when making directors from facade05, line 120: {:d}'.format(return_code))



# Make sure it's ok to proceed
if return_code != 0:
print("COULD NOT CREATE REPO DIRECTORY")
try:
pathlib.Path(repo_path).mkdir(parents=True, exist_ok=True)
except Exception as e:
print("COULD NOT CREATE REPO DIRECTORY")

update_repo_log(session, row.repo_id,'Failed (mkdir)')
session.update_status(f"Failed (mkdir {repo_path})")
session.log_activity('Error',f"Could not create repo directory: {repo_path}" )

raise Exception("Could not create git repo's prerequisite directories. "
" Do you have write access?")

raise e

update_repo_log(session, row.repo_id,'New (cloning)')

Expand Down
2 changes: 1 addition & 1 deletion docker/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM python:3.8.11-slim-buster

LABEL maintainer="outdoors@acm.org"
LABEL version="0.50.1"
LABEL version="0.50.2"

ENV DEBIAN_FRONTEND=noninteractive

Expand Down
2 changes: 1 addition & 1 deletion docker/database/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM postgres:12

LABEL maintainer="outdoors@acm.org"
LABEL version="0.50.1"
LABEL version="0.50.2"

ENV POSTGRES_DB "test"
ENV POSTGRES_USER "augur"
Expand Down
4 changes: 2 additions & 2 deletions metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

__short_description__ = "Python 3 package for free/libre and open-source software community metrics, models & data collection"

__version__ = "0.50.1"
__release__ = "v0.50.1 (Springtime for Metrics!)"
__version__ = "0.50.2"
__release__ = "v0.50.2 (Springtime for Metrics!)"

__license__ = "MIT"
__copyright__ = "University of Missouri, University of Nebraska-Omaha, CHAOSS, Brian Warner & Augurlabs 2023"