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

PR File Patch / Varoius Bug Fixes #2790

Merged
merged 41 commits into from
May 21, 2024
Merged

PR File Patch / Varoius Bug Fixes #2790

merged 41 commits into from
May 21, 2024

Conversation

sgoggins
Copy link
Member

Description

  • The purpose of this patch is primarily to reduce the number of errors associated with pull request file retrieval on GitHub. A number of specific errors are corrected as indicated by the extensive commit comments in this PR.

  • Yes, I signed my commits.

sgoggins and others added 30 commits March 18, 2024 19:03
scipy 1.13.0 breaks a lot of stuff
Signed-off-by: Sean P. Goggins <[email protected]>
Signed-off-by: Sean P. Goggins <[email protected]>
Signed-off-by: Isaac Milarsky <[email protected]>
Fix Facade Task Signature to Take `repo_git` instead of `repo_id`
Rollback transaction when query throws exception
Signed-off-by: Gary White Jr <[email protected]>
handle rate limiting and more repo load messages
Fix some typos and broken links in the docs
added `sudo apt-get install libpq-dev` as it wasn't installed by default on a new instance

Signed-off-by: Sean P. Goggins <[email protected]>
```bash
Traceback (most recent call last):
  File "/home/ubuntu/github/virtualenvs/hosted/lib/python3.11/site-packages/celery/app/trace.py", line 451, in trace_task
    R = retval = fun(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/github/virtualenvs/hosted/lib/python3.11/site-packages/celery/app/trace.py", line 734, in __protected_call__
    return self.run(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/github/augur/augur/tasks/github/pull_requests/files_model/tasks.py", line 18, in process_pull_request_files
    pull_request_files_model(repo.repo_id, logger, augur_db, manifest.key_auth)
  File "/home/ubuntu/github/augur/augur/tasks/github/pull_requests/files_model/core.py", line 68, in pull_request_files_model
    pr_file_rows += [{
                    ^^
  File "/home/ubuntu/github/augur/augur/tasks/github/pull_requests/files_model/core.py", line 68, in <listcomp>
    pr_file_rows += [{
                    ^^
  File "/home/ubuntu/github/augur/augur/tasks/github/util/gh_graphql_entities.py", line 344, in __iter__
    coreData['totalCount']
    ~~~~~~~~^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
```
```python
            if coreData is not None:
                self.logger.info(f"... core data obtained")
            else:
                self.logger.info(f"Helen, the ghost in our machine, did not get a numerical result for core data (value): {data} \n Zero value assigned.")
                coreData['totalCount'] = 0
        except KeyError as e:
            self.logger.error("Could not extract paginate result because there was no data returned")
            self.logger.error(
                ''.join(traceback.format_exception(None, e, e.__traceback__)))

            self.logger.info(f"Graphql paramters: {params}")
            return
```
```python
try:
    if coreData is not None:
        if coreData.get('totalCount') is not None:
            self.logger.info("... core data obtained")
        else:
            self.logger.info(f"Helen, the ghost in our machine, did not get a numerical result for core data (value): {data} \n Zero value assigned.")
            coreData['totalCount'] = 0
    else:
        self.logger.error("Core data is None, cannot proceed with operations on it.")
except KeyError as e:
    self.logger.error("Could not extract paginate result because there was no data returned")
    self.logger.error(''.join(traceback.format_exception(None, e, e.__traceback__)))
```
augur/application/cli/backend.py Show resolved Hide resolved
augur/application/cli/collection.py Show resolved Hide resolved
augur/application/cli/tasks.py Show resolved Hide resolved
augur/application/cli/tasks.py Show resolved Hide resolved
ABrain7710
ABrain7710 previously approved these changes May 13, 2024
Signed-off-by: Andrew Brain <[email protected]>
Copy link
Member Author

@sgoggins sgoggins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

augur/tasks/github/pull_requests/tasks.py Outdated Show resolved Hide resolved
augur/application/cli/tasks.py Outdated Show resolved Hide resolved
@sgoggins sgoggins requested a review from ABrain7710 May 14, 2024 16:42
@sgoggins sgoggins added deployed version Live problems with deployed versions API Related to Augur's metrics API CHAOSS Issues that relate directly to our goal of being a good reference implementation of CHAOSS metrics documentation Updates documentation docker Related to our Docker images CLI Related to Augur's CLI database Related to Augur's unifed data model discussion Seeking active feedback, usually for items under active development admin Administrative/housekeeping/community tasks bug-fix Fixes a bug add-feature Adds new features labels May 14, 2024
@ABrain7710 ABrain7710 changed the base branch from main to dev May 20, 2024 23:25
@ABrain7710 ABrain7710 merged commit 064a917 into dev May 21, 2024
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add-feature Adds new features admin Administrative/housekeeping/community tasks API Related to Augur's metrics API bug-fix Fixes a bug CHAOSS Issues that relate directly to our goal of being a good reference implementation of CHAOSS metrics CLI Related to Augur's CLI database Related to Augur's unifed data model deployed version Live problems with deployed versions discussion Seeking active feedback, usually for items under active development docker Related to our Docker images documentation Updates documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants