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

Fix list_nodes in the Azure arm driver #1850

Merged
merged 40 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
ad5bd68
fix list_nodes for the azure arm driver
jan-mue Jan 25, 2023
a12ae52
Support all S3 storage classes
mohammad-aburadeh Mar 20, 2023
70d2f56
Add test case in test_s3.py to test upload object with storage class
mohammad-aburadeh Mar 20, 2023
1d71302
outscale: fix list_volumes
outscale-mgo Mar 21, 2023
76061f0
outscale: fix private_ips and public_ips from nodes
outscale-mgo Mar 21, 2023
64405c6
Fix exception when using internal URL
llamasoft Mar 27, 2023
579f625
add unit tests
jan-mue Apr 13, 2023
b8e836c
Merge branch 'trunk' into fix-azure-list-nodes
jan-mue Apr 14, 2023
e8cdde1
fix crash if no PublicIp or no PrivateIp
outscale-mgo Jun 13, 2023
0450ac4
Fix failing test due to extra , which made argument a tuple, fix lint
Kami Jul 31, 2023
18f0636
Add changelog entry for #1875.
Kami Jul 31, 2023
6cd0e91
Upgrade rstcheck.
Kami Jul 31, 2023
9fe1721
Re-generate supported method tables.
Kami Jul 31, 2023
3fada6d
Upgrade codecov dependency.
Kami Jul 31, 2023
93f6f7a
Switch to non-deprecated GHA action based codecov coverage uploader.
Kami Jul 31, 2023
f6648fa
Update dependabot config.
Kami Jul 31, 2023
f5fcfc5
Upgrade pytest dependencies.
Kami Jul 31, 2023
c501a5c
Upgrade requests and requests_mock library.
Kami Jul 31, 2023
3e5cc5a
Upgrade various dev and tests dependencies.
Kami Jul 31, 2023
21f6883
Squashed '.github/actions/gh-action-pip-audit/' changes from 9075e938…
Kami Jul 31, 2023
55658ba
Merge commit '21f6883472df778d022fd9ffe34c442d18fa52be' into trunk
Kami Jul 31, 2023
ac9d7b5
Update GHA actions.
Kami Jul 31, 2023
9545751
Upgrade black.
Kami Jul 31, 2023
bae8e96
Reformat code with the latest version of black library.
Kami Jul 31, 2023
b48bb1e
Ignore setuptools vulnerability over we don't have a direct control (we
Kami Jul 31, 2023
b2be54b
Fix codecov coverage upload CI step.
Kami Jul 31, 2023
b6ca236
Fix conflicing dependency version.
Kami Jul 31, 2023
1431a2f
Temporary disable PyPy 3.7 tests which are failing on CI.
Kami Jul 31, 2023
4fdc32b
Merge branch 'trunk' of https://github.com/outscale-mgo/libcloud into…
Kami Jul 31, 2023
62e8d5a
Add changelog entry for #1877.
Kami Jul 31, 2023
504354c
Merge branch 'patch-1' of https://github.com/llamasoft/libcloud into …
Kami Jul 31, 2023
b0035eb
Add test case for get_endpoint() and use_internal_url=True.
Kami Jul 31, 2023
aa9a947
Add changelog entry for #1883 and #1884.
Kami Jul 31, 2023
c906009
Merge branch 'fix-azure-list-nodes' of https://github.com/jan-mue/lib…
Kami Jul 31, 2023
c49ecd0
Update the code so we don't end up in an infinite loop in case API
Kami Jul 31, 2023
cc30859
Bump the pagination limit to 300s.
Kami Jul 31, 2023
09cc6c4
Add changelog entry for #1824 #1850.
Kami Jul 31, 2023
efe4978
Update the comment.
Kami Jul 31, 2023
b843334
Fix codecov config.
Kami Jul 31, 2023
863b88d
Merge branch 'trunk' into fix-azure-list-nodes
Kami Jul 31, 2023
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: 0 additions & 4 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
codecov:
#notify:
#require_ci_to_pass: yes

coverage:
precision: 2 # decimal places to display: 0 <= value <= 4
round: nearest
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Bug report
description: Report a bug with pip-audit's GitHub Action
labels: bug
body:
- type: markdown
attributes:
value: >-
Thank you for reporting a potential bug in `gh-action-pip-audit`! Please
read the following carefully:


**IMPORTANT:** This issue tracker is for `pip-audit`'s
**GitHub Action**, the scaffolding that integrates `pip-audit` with your
CI. If the buggy behavior you are experiencing appears to be in
`pip-audit`, please file an issue
[against the `pip-audit` repo](https://github.com/pypa/pip-audit/issues/new/choose).


**IMPORTANT:** Please fill out every section below. Bug reports with
missing information will be given a lower priority or closed outright.


Before filing an issue, check out our
[troubleshooting guide](https://github.com/pypa/gh-action-pip-audit#troubleshooting) :)
- type: textarea
id: current-behavior
attributes:
label: Current behavior
description: >-
What issue are you having with the action? What were you trying to do
when the issue occurred?
placeholder: The action run succeeds when I ...
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
description: What should've happened instead?
placeholder: I expected the action run to fail.
validations:
required: true
- type: textarea
id: repro
attributes:
label: Steps to reproduce
description: What are the detailed steps we can follow to trigger this issue?
placeholder: |-
1. ...
2. ...
3. ...
validations:
required: true
- type: textarea
id: context
attributes:
label: Relevant context
description: >-
Please include a link to an action run, as well as any logs that you think might
be helpful! You can
[follow these instructions](https://docs.github.com/en/actions/managing-workflow-runs/re-running-workflows-and-jobs#re-running-all-the-jobs-in-a-workflow)
to re-run the action with debug logging.
validations:
required: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: pip-audit's issue tracker
url: https://github.com/pypa/pip-audit/issues/new/choose
about: >-
You may want to file a report on pip-audit instead if your issue is not
directly related to this GitHub Action
- name: Troubleshooting guide
url: https://github.com/pypa/gh-action-pip-audit#troubleshooting
about: >-
Learn how to fix some common issues or enable debug logging here
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Feature request
description: Suggest an idea for pip-audit's GitHub Action
labels: enhancement
body:
- type: markdown
attributes:
value: >-
Thank you for filing a feature request for `gh-action-pip-audit`! Please
read the following carefully:


**IMPORTANT:** This form is for `pip-audit`'s **GitHub Action**, the
scaffolding that integrates `pip-audit` with your CI. If you would like
a new feature in `pip-audit` itself, please go to
[the `pip-audit` repo](https://github.com/pypa/pip-audit/issues/new/choose).


**IMPORTANT:** Please fill out every required section below to the best
of your ability. Feature requests with missing information may be given
a lower priority or closed outright.
- type: textarea
id: problem
attributes:
label: Is your feature request related to a problem?
description: Describe how the current solution is deficient.
placeholder: I am frustrated when ...
validations:
required: true
- type: textarea
id: solution
attributes:
label: Describe the solution you'd like
description:
placeholder: I think gh-action-pip-audit would benefit from ...
validations:
required: true
- type: textarea
id: alternatives-considered
attributes:
label: Alternative solutions or features you've considered
description:
placeholder:
validations:
required: true
- type: textarea
id: context
attributes:
label: Additional context
description: Add any context or screenshots related to the feature request.
placeholder:
18 changes: 18 additions & 0 deletions .github/actions/gh-action-pip-audit/.github/workflows/selftest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,21 @@ jobs:
PIP_AUDIT_OUTPUT: "${{ steps.pip-audit.outputs.internal-be-careful-output }}"
run: |
grep -E 'pyyaml\s+\|\s+5.1' <<< $(base64 -d <<< "${PIP_AUDIT_OUTPUT}")
selftest-pipaudit-fail:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./
id: pip-audit
with:
# we do not care about pip-audit's actual output in this test, we just need a file to pass
# in so as to not exercise `pip list` mode.
inputs: ./test/empty.txt
# pass in a fake flag here to reliably trigger the failure we're looking for.
internal-be-careful-extra-flags: --not-a-real-pip-audit-flag
internal-be-careful-allow-failure: true
- name: assert expected output
env:
PIP_AUDIT_OUTPUT: "${{ steps.pip-audit.outputs.internal-be-careful-output }}"
run: |
grep 'pip-audit did not return any output' <<< $(base64 -d <<< "${PIP_AUDIT_OUTPUT}")
69 changes: 35 additions & 34 deletions .github/actions/gh-action-pip-audit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@v3
- name: install
run: python -m pip install .
- uses: pypa/[email protected].5
- uses: pypa/[email protected].8
```

Or, with a virtual environment:
Expand All @@ -48,7 +48,7 @@ jobs:
python -m venv env/
source env/bin/activate
python -m pip install .
- uses: pypa/[email protected].5
- uses: pypa/[email protected].8
with:
virtual-environment: env/
```
Expand All @@ -72,15 +72,15 @@ The `inputs` setting controls what sources `pip-audit` runs on.
To audit one or more requirements-style inputs:

```yaml
- uses: pypa/[email protected].5
- uses: pypa/[email protected].8
with:
inputs: requirements.txt dev-requirements.txt
```

To audit a project that uses `pyproject.toml` for its dependencies:

```yaml
- uses: pypa/[email protected].5
- uses: pypa/[email protected].8
with:
# NOTE: this can be `.`, for the current directory
inputs: path/to/project/
Expand Down Expand Up @@ -108,7 +108,7 @@ Example: use the virtual environment specified at `env/`, relative to the
current directory:

```yaml
- uses: pypa/[email protected].5
- uses: pypa/[email protected].8
with:
virtual-environment: env/
# Note the absence of `input:`, since we're auditing the environment.
Expand All @@ -128,7 +128,7 @@ installed directly into the current environment are included.
Example:

```yaml
- uses: pypa/[email protected].5
- uses: pypa/[email protected].8
with:
local: true
```
Expand All @@ -145,7 +145,7 @@ It's directly equivalent to `pip-audit --vulnerability-service=...`.
To audit with OSV instead of PyPI:

```yaml
- uses: pypa/[email protected].5
- uses: pypa/[email protected].8
with:
vulnerability-service: osv
```
Expand All @@ -160,7 +160,7 @@ It's directly equivalent to `pip-audit --require-hashes ...`.
Example:

```yaml
- uses: pypa/[email protected].5
- uses: pypa/[email protected].8
with:
# NOTE: only works with requirements-style inputs
inputs: requirements.txt
Expand All @@ -177,7 +177,7 @@ It's directly equivalent to `pip-audit --no-deps ...`.
Example:

```yaml
- uses: pypa/[email protected].5
- uses: pypa/[email protected].8
with:
# NOTE: only works with requirements-style inputs
inputs: requirements.txt
Expand All @@ -195,7 +195,7 @@ is rendered at the end of the action.
Example:

```yaml
- uses: pypa/[email protected].5
- uses: pypa/[email protected].8
with:
summary: false
```
Expand All @@ -214,7 +214,7 @@ indices to search (such as a corporate index with private packages), see
Example:

```yaml
- uses: pypa/[email protected].5
- uses: pypa/[email protected].8
with:
index-url: https://example.corporate.local/simple
```
Expand All @@ -229,7 +229,7 @@ indexes to search when resolving dependencies. Each URL is whitespace-separated.
Example:

```yaml
- uses: pypa/[email protected].5
- uses: pypa/[email protected].8
with:
extra-index-urls: |
https://example.corporate.local/simple
Expand All @@ -246,7 +246,7 @@ ignore (i.e., exclude from the results) if present. Each ID is whitespace-separa
Example

```yaml
- uses: pypa/[email protected].5
- uses: pypa/[email protected].8
with:
ignore-vulns: |
GHSA-XXXX-YYYYYY
Expand Down Expand Up @@ -276,29 +276,24 @@ Example
Example:

```yaml
- uses: pypa/[email protected].5
- uses: pypa/[email protected].8
with:
internal-be-careful-allow-failure: true
```

#### `internal-be-careful-debug`
#### `internal-be-careful-extra-flags`
**Default**: `""`

**Default**: `false`

The `internal-be-careful-debug` setting enables additional debug logs,
both within `pip-audit` itself and the action's harness code. You can
use it to debug troublesome configurations.
The `internal-be-careful-extra-flags` setting passes the specified flags
to `pip-audit`.

Be mindful that `pip-audit`'s own debug logs contain HTTP requests,
which may or may not be sensitive in your use case.

Example:
Example:

```yaml
- uses: pypa/[email protected].5
with:
internal-be-careful-debug: true
```
```yaml
- uses: pypa/[email protected].8
with:
internal-be-careful-extra-flags: --not-a-real-pip-audit-flag
```

</details>

Expand All @@ -312,7 +307,7 @@ If you're auditing a requirements file, consider setting `no-deps: true` or
`require-hashes: true`:

```yaml
- uses: pypa/[email protected].5
- uses: pypa/[email protected].8
with:
inputs: requirements.txt
require-hashes: true
Expand All @@ -321,7 +316,7 @@ If you're auditing a requirements file, consider setting `no-deps: true` or
or:

```yaml
- uses: pypa/[email protected].5
- uses: pypa/[email protected].8
with:
inputs: requirements.txt
no-deps: true
Expand All @@ -342,7 +337,7 @@ by the host system itself, or other Python projects that happen to be installed.
To minimize external dependencies, you can opt into a virtual environment:

```yaml
- uses: pypa/[email protected].5
- uses: pypa/[email protected].8
with:
# must be populated earlier in the CI
virtual-environment: env/
Expand All @@ -352,13 +347,19 @@ and, more aggressively, specify that only dependencies marked as "local"
in the virtual environment should be included:

```yaml
- uses: pypa/[email protected].5
- uses: pypa/[email protected].8
with:
# must be populated earlier in the CI
virtual-environment: env/
local: true
```

### There's an issue with the action and I want to enable debug logging!

The action prints debug information when the `ACTIONS_STEP_DEBUG` secret is set
to `true``. You should be able to enable this behavior by
[following these instructions](https://docs.github.com/en/actions/managing-workflow-runs/re-running-workflows-and-jobs#re-running-all-the-jobs-in-a-workflow).

## Tips and Tricks

### Running against a pipenv project
Expand All @@ -382,7 +383,7 @@ jobs:
run: |
pipx run pipfile-requirements Pipfile.lock > requirements.txt

- uses: pypa/[email protected].5
- uses: pypa/[email protected].8
with:
inputs: requirements.txt
```
Expand Down
Loading