-
Notifications
You must be signed in to change notification settings - Fork 851
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
Augur 0.76.1 Release #2869
Merged
Merged
Augur 0.76.1 Release #2869
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
3ccd69d
Proper Gunicorn bringup detection
Ulincsys 2be3c4d
Write controlling process ID to disk for retrieval
Ulincsys c43ca39
Merge pull request #2842 from chaoss/backend-detect-gunicorn-up
sgoggins 0f114fe
Remove nulls from pr review message ref
ABrain7710 42fba8e
Add metadata to sub process exceptions
ABrain7710 2a30cbe
Simplify metadata exception
ABrain7710 f9557c5
Add github graphql data access'
ABrain7710 ce08e9d
Log required ouput in exception when dependency task fails
ABrain7710 65fbcfe
Migrate pr reviews to github data access
ABrain7710 3667071
Migrate pr review comments to github data access
ABrain7710 02fcff0
Simplify pr reviews
ABrain7710 94e1405
Fix some log levels since we are in the file
ABrain7710 67f95a9
Improve paginate_resource logic
ABrain7710 30350fc
Remove unused method
ABrain7710 9819296
Change log statements in contributor resolution to match new policy
IsaacMilarky 48ad40b
Merge pull request #2860 from chaoss/add_metadata_to_subprocess_errors
IsaacMilarky 204ebd0
Fix pylint
IsaacMilarky 2316efe
Merge pull request #2859 from chaoss/pr_review_comments_fix
Ulincsys 4e3ba93
Merge pull request #2864 from chaoss/github_data_access_pr_migration
ABrain7710 321ef0c
Merge pull request #2863 from chaoss/fix-pylint
ABrain7710 5e2b747
Merge pull request #2862 from chaoss/isaac-logging-changes
ABrain7710 d4fec6a
Move repo_info to new graphql endpoint
ABrain7710 e460b2c
Migrate pr files to github_graphql_data_access
ABrain7710 21e8700
Indent client'
ABrain7710 09207b6
Remove strip
ABrain7710 ce322ba
Define keys as list
ABrain7710 05195a9
Return data properly
ABrain7710 c107786
Add self
ABrain7710 68aa4ce
Fix syntax error
ABrain7710 afd1a19
Fix syntax error
ABrain7710 c92e1ef
Fixes
ABrain7710 526f085
Raise from original exception
ABrain7710 03fa6c6
Make annoying info log a debug
ABrain7710 1cfcd38
Merge pull request #2861 from chaoss/graphql_refactor
sgoggins ea8d0a4
updating version
sgoggins fc664fc
Merge pull request #2870 from chaoss/dev
sgoggins ccbc822
Address release bugs
ABrain7710 25cc00c
Merge pull request #2872 from chaoss/release-fixes
sgoggins 0205e13
Raise exceptions on graphql errors
ABrain7710 1c8839f
Remove comment
ABrain7710 a951d13
Merge pull request #2874 from chaoss/release-fixes
sgoggins 208148c
Fix syntax error
ABrain7710 009687e
Catch not found for prs
ABrain7710 0b40bbb
Throw exception when data is none
ABrain7710 4529a91
try this
ABrain7710 54fd6fa
Add variables
ABrain7710 0210296
Handle case where api returns None
ABrain7710 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ augur_export_env.sh | |
!docker.config.json | ||
config.yml | ||
reports.yml | ||
*.pid | ||
|
||
node_modules/ | ||
.idea/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
from augur.tasks.util.worker_util import parse_json_from_subprocess_call | ||
from augur.tasks.git.util.facade_worker.facade_worker.utilitymethods import get_absolute_repo_path | ||
from augur.tasks.github.util.github_random_key_auth import GithubRandomKeyAuth | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [pylint] reported by reviewdog 🐶 |
||
from augur.tasks.util.metadata_exception import MetadataException | ||
|
||
|
||
def generate_deps_data(logger, repo_git): | ||
|
@@ -94,50 +95,47 @@ def generate_scorecard(logger, repo_git): | |
|
||
try: | ||
required_output = parse_json_from_subprocess_call(logger,['./scorecard', command, '--format=json'],cwd=path_to_scorecard) | ||
except Exception as e: | ||
logger.error(f"Could not parse required output! Error: {e}") | ||
raise e | ||
|
||
# end | ||
|
||
logger.info('adding to database...') | ||
logger.debug(f"output: {required_output}") | ||
logger.info('adding to database...') | ||
logger.debug(f"output: {required_output}") | ||
|
||
if not required_output['checks']: | ||
logger.info('No scorecard checks found!') | ||
return | ||
|
||
#Store the overall score first | ||
to_insert = [] | ||
overall_deps_scorecard = { | ||
'repo_id': repo_id, | ||
'name': 'OSSF_SCORECARD_AGGREGATE_SCORE', | ||
'scorecard_check_details': required_output['repo'], | ||
'score': required_output['score'], | ||
'tool_source': 'scorecard_model', | ||
'tool_version': '0.43.9', | ||
'data_source': 'Git', | ||
'data_collection_date': datetime.now().strftime('%Y-%m-%dT%H:%M:%SZ') | ||
} | ||
to_insert.append(overall_deps_scorecard) | ||
# bulk_insert_dicts(overall_deps_scorecard, RepoDepsScorecard, ["repo_id","name"]) | ||
|
||
#Store misc data from scorecard in json field. | ||
for check in required_output['checks']: | ||
repo_deps_scorecard = { | ||
if not required_output['checks']: | ||
logger.info('No scorecard checks found!') | ||
return | ||
|
||
#Store the overall score first | ||
to_insert = [] | ||
overall_deps_scorecard = { | ||
'repo_id': repo_id, | ||
'name': check['name'], | ||
'scorecard_check_details': check, | ||
'score': check['score'], | ||
'name': 'OSSF_SCORECARD_AGGREGATE_SCORE', | ||
'scorecard_check_details': required_output['repo'], | ||
'score': required_output['score'], | ||
'tool_source': 'scorecard_model', | ||
'tool_version': '0.43.9', | ||
'data_source': 'Git', | ||
'data_collection_date': datetime.now().strftime('%Y-%m-%dT%H:%M:%SZ') | ||
} | ||
to_insert.append(repo_deps_scorecard) | ||
|
||
bulk_insert_dicts(logger, to_insert, RepoDepsScorecard, ["repo_id","name"]) | ||
|
||
logger.info(f"Done generating scorecard for repo {repo_id} from path {path}") | ||
to_insert.append(overall_deps_scorecard) | ||
# bulk_insert_dicts(overall_deps_scorecard, RepoDepsScorecard, ["repo_id","name"]) | ||
|
||
#Store misc data from scorecard in json field. | ||
for check in required_output['checks']: | ||
repo_deps_scorecard = { | ||
'repo_id': repo_id, | ||
'name': check['name'], | ||
'scorecard_check_details': check, | ||
'score': check['score'], | ||
'tool_source': 'scorecard_model', | ||
'tool_version': '0.43.9', | ||
'data_source': 'Git', | ||
'data_collection_date': datetime.now().strftime('%Y-%m-%dT%H:%M:%SZ') | ||
} | ||
to_insert.append(repo_deps_scorecard) | ||
|
||
bulk_insert_dicts(logger, to_insert, RepoDepsScorecard, ["repo_id","name"]) | ||
|
||
logger.info(f"Done generating scorecard for repo {repo_id} from path {path}") | ||
|
||
except Exception as e: | ||
|
||
raise MetadataException(e, f"required_output: {required_output}") |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
W0621: Redefining name 'processes' from outer scope (line 386) (redefined-outer-name)