-
Notifications
You must be signed in to change notification settings - Fork 2
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
Upgrade dependencies 2023-11-27 (#5723) #5735
Upgrade dependencies 2023-11-27 (#5723) #5735
Conversation
9102660
to
929a5e3
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #5735 +/- ##
========================================
Coverage 83.04% 83.05%
========================================
Files 153 153
Lines 19410 19416 +6
========================================
+ Hits 16119 16125 +6
Misses 3291 3291 ☔ View full report in Codecov by Sentry. |
3f7bcc5
to
c597169
Compare
c597169
to
7abca52
Compare
PR was deployed to personal deployment & passed tests including IT. |
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.
Changes look good, nicely done. A few nits.
Also consider doing another pass over your Inspector script, it might benefit from having more type hints and other misc formatting changes.
.github/ISSUE_TEMPLATE/upgrade.md
Outdated
- [ ] … update to ClamAV image | ||
- [ ] … update to GitLab AMI | ||
- [ ] … update to [Python](https://hub.docker.com/_/python/tags) (only patch versions) | ||
- [ ] … Updates to [Terraform](https://hub.docker.com/r/hashicorp/terraform/tags) (only patch versions) |
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.
U…
might be a typo here.
scripts/inspector-findings.py
Outdated
f'Default: {cls.default_severities}\n' | ||
'Choices: ' + ','.join(cls.all_severities)) |
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.
Consider adhering to a single format, whether it be f-strings or concatenation, I think it might improve consistency.
scripts/inspector-findings.py
Outdated
f'Default: {cls.default_severities}\n' | ||
'Choices: ' + ','.join(cls.all_severities)) |
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.
Also consider a space character after the comma in the join command, to improve readability.
scripts/inspector-findings.py
Outdated
|
||
def main(self): | ||
log.info('Fetching all findings from AWS Inspector') | ||
client = aws.client('inspector2') # Note inspector2 not inspector |
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.
The comment might be redundant, I think it's protocol (has been enforced during review process) to use the most recent client or resource API version available.
scripts/inspector-findings.py
Outdated
paginator = client.get_paginator('list_findings') | ||
for page in paginator.paginate(): | ||
self.findings.extend(page['findings']) | ||
log.info(f'Fetched a total of {len(self.findings)} findings from AWS Inspector') |
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.
Reference the fourth bulleted item in https://github.com/DataBiosphere/azul/blob/develop/CONTRIBUTING.rst#logging.
scripts/inspector-findings.py
Outdated
log.info(f'Found {finding_count} vulnerabilities with a severity ' | ||
f'{self.severities!r}') | ||
log.info(f'Grouped findings by {len(findings)} unique vulnerabilities') |
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.
Same here.
scripts/inspector-findings.py
Outdated
file_data.append(row) | ||
|
||
output_file_name = f'inspector-findings_{self.date}.csv' | ||
log.info(f'Writing file {output_file_name!r}') |
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.
Also here.
scripts/inspector-findings.py
Outdated
if severity not in self.severities: | ||
continue |
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.
This looks to me like what the first bulleted item in https://github.com/DataBiosphere/azul/blob/develop/CONTRIBUTING.rst#control-flow describes.
scripts/inspector-findings.py
Outdated
assert summary['instances'] or summary['images'], summary | ||
finding_count += 1 | ||
findings[vulnerability].append(summary) | ||
log.info(f'Found {finding_count} vulnerabilities with a severity ' |
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.
Would len(findings)
not achieve the same here?
The counter might be unnecessary.
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.
finding_count
is the total number of findings (that matched the specified severity), while len(findings)
gives the number of unique vulnerabilities (e.g. CVE-1234), which can have one or more finding associated with it. Not entirely necessary as log output however, I'll clean this up.
scripts/inspector-findings.py
Outdated
self.write_compact_csv() | ||
log.info('Done.') | ||
|
||
def parse_findings_for_csv(self) -> tuple[dict, set, set]: |
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.
The definition of this method seems a bit complicated. Consider doing another pass over this method to see if it might do with a bit of de-duplication or simplification.
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.
Additionally, a bit of preprocessing might help cleanup and address what looks like a bail-out.
8b0b2e2
to
3cfe124
Compare
Note: I amended the PR was redeployed to |
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.
🦭✅
3cfe124
to
ba0d08a
Compare
When I rebased, some of the commits were squashed out. I also ran |
ba0d08a
to
da6ffd6
Compare
da6ffd6
to
1520f6f
Compare
Connected issues: #5723
Checklist
Author
develop
issues/<GitHub handle of author>/<issue#>-<slug>
p
tag to titles of partial commitspartial
label to PR or this PR completely resolves all connected issuespartial
label1 when the issue title describes a problem, the corresponding PR
title is
Fix:
followed by the issue titleAuthor (reindex, API changes)
r
tag to commit title or this PR does not require reindexingreindex
label to PR or this PR does not require reindexingAPI
or this PR does not modify a REST APIa
(A
) tag to commit title for backwards (in)compatible changes or this PR does not modify a REST APIapp.py
or this PR does not modify a REST APIAuthor (chains)
base
label to the blocking PR or this PR is not chained to another PRchained
label to this PR or this PR is not chained to another PRAuthor (upgrading)
u
tag to commit title or this PR does not require upgradingupgrade
label to PR or this PR does not require upgradingAuthor (operator tasks)
Author (hotfixes)
F
tag to main commit title or this PR does not include permanent fix for a temporary hotfixprod
branch has no temporary hotfixes for any connected issuesAuthor (before every review)
develop
, squashed old fixupsmake requirements_update
or this PR does not touch requirements*.txt, common.mk, Makefile and DockerfileR
tag to commit title or this PR does not touch requirements*.txtreqs
label to PR or this PR does not touch requirements*.txtmake integration_test
passes in personal deployment or this PR does not touch functionality that could break the ITPeer reviewer (after requesting changes)
Uncheck the Author (before every review) checklists.
Peer reviewer (after approval)
Primary reviewer (after requesting changes)
Uncheck the before every review checklists. Update the
N reviews
label.Primary reviewer (after approval)
demo
orno demo
no demo
no sandbox
N reviews
label is accurateOperator (before pushing merge the commit)
reindex
label andr
commit title tagno demo
upgrade
develop
dev.shared
dev
and addedsandbox
label or PR is labeledno sandbox
anvildev.shared
anvildev
or PR is labeledno sandbox
anvilprod.shared
anvilprod
or PR is labeledno sandbox
sandbox
deployment or PR is labeledno sandbox
anvilbox
deployment or PR is labeledno sandbox
hammerbox
deployment or PR is labeledno sandbox
sandbox
deployment or PR is labeledno sandbox
anvilbox
deployment or PR is labeledno sandbox
hammerbox
deployment or PR is labeledno sandbox
sandbox
or this PR does not remove catalogs or otherwise causes unreferenced indicesanvilbox
or this PR does not remove catalogs or otherwise causes unreferenced indiceshammerbox
or this PR does not remove catalogs or otherwise causes unreferenced indicessandbox
or this PR does not require reindexingsandbox
anvilbox
or this PR does not require reindexingsandbox
hammerbox
or this PR does not require reindexingsandbox
sandbox
or this PR does not require reindexingsandbox
anvilbox
or this PR does not require reindexingsandbox
hammerbox
or this PR does not require reindexingsandbox
p
if the PR is labeledpartial
Operator (chain shortening)
develop
or this PR is not labeledbase
chained
label from the blocked PR or this PR is not labeledbase
base
base
label from this PR or this PR is not labeledbase
Operator (after pushing the merge commit)
dev.gitlab
make -C terraform/gitlab/runner
(todev.gitlab
)dev
or PR is labeledno sandbox
anvildev.gitlab
make -C terraform/gitlab/runner
(toanvildev.gitlab
)anvildev
or PR is labeledno sandbox
anvilprod.gitlab
make -C terraform/gitlab/runner
(toanvilprod.gitlab
)anvilprod
or PR is labeledno sandbox
dev
1dev
1anvildev
1anvildev
1anvilprod
1anvilprod
1dev
anvildev
anvilprod
1 When pushing the merge commit is skipped due to the PR being
labelled
no sandbox
, the next build triggered by a PR whose merge commit ispushed determines this checklist item.
Operator (reindex)
dev
or this PR does not remove catalogs or otherwise causes unreferenced indicesanvildev
or this PR does not remove catalogs or otherwise causes unreferenced indicesanvilprod
or this PR does not remove catalogs or otherwise causes unreferenced indicesdev
or this PR does not require reindexinganvildev
or this PR does not require reindexinganvilprod
or this PR does not require reindexingdev
or this PR does not require reindexinganvildev
or this PR does not require reindexinganvilprod
or this PR does not require reindexingdev
deployment or this PR does not require reindexinganvildev
deployment or this PR does not require reindexinganvilprod
deployment or this PR does not require reindexingPrimary Reviewer
Operator
prod
promotion PR:Shorthand for review comments
L
line is too longW
line wrapping is wrongQ
bad quotesF
other formatting problem