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

Ci/fix cross test workflow test #7

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
bf7f173
new: Adding cross repo testing workflow for Release (#378)
ykim-akamai Mar 12, 2024
a0393db
doc: Add .readthedocs.yaml config file (#381)
lgarber-akamai Mar 13, 2024
fd878dd
doc: Add missing models and groups to documentation (#383)
lgarber-akamai Mar 18, 2024
49dd2c6
Improve `.readthedocs.yaml` config file (#382)
zliang-akamai Mar 18, 2024
95d0b20
new: Add `vpc` field to `Instance(...).ips` property method result (#…
lgarber-akamai Mar 18, 2024
fd151d5
Support LinodeClient(...).vpcs.ips(...) (#385)
lgarber-akamai Mar 19, 2024
58dcd1d
new: Add handling for failed events in EventPoller(...).wait_for_next…
lgarber-akamai Mar 25, 2024
cb1e30a
ci: update labels and release drafter (#387)
jriddle-linode Apr 1, 2024
0951c34
new: Add site_type to `Region` (#386)
yec-akamai Apr 1, 2024
c8f4bd5
new: List ips under a specific VPC (#391)
yec-akamai Apr 8, 2024
bcb66cb
Annotate set fields as unordered (#390)
lgarber-akamai Apr 9, 2024
37fbc5e
Serialize `Base` objects in `MappedObject` (#389)
zliang-akamai Apr 9, 2024
22e1778
test: remove unnecessary warnings when running integration tests (#392)
ykim-akamai Apr 10, 2024
a25850f
add integration workflow for main and dev (#393)
ykim-akamai Apr 12, 2024
b1c56a6
test: address intermittent test failures (#394)
ykim-akamai Apr 16, 2024
23d41fd
new: Add `available` field to AccountAvailability class (#395)
lgarber-akamai Apr 17, 2024
e9c7331
fix cross testing workflow
ykim-akamai Apr 18, 2024
9bcaaa4
Update name
ykim-akamai Apr 18, 2024
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
38 changes: 38 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# PR Labels
- name: new-feature
description: for new features in the changelog.
color: 225fee
- name: improvement
description: for improvements in existing functionality in the changelog.
color: 22ee47
- name: repo-ci-improvement
description: for improvements in the repository or CI workflow in the changelog.
color: c922ee
- name: bugfix
description: for any bug fixes in the changelog.
color: ed8e21
- name: documentation
description: for updates to the documentation in the changelog.
color: d3e1e6
- name: dependencies
description: dependency updates usually from dependabot
color: 5c9dff
- name: testing
description: for updates to the testing suite in the changelog.
color: 933ac9
- name: breaking-change
description: for breaking changes in the changelog.
color: ff0000
- name: ignore-for-release
description: PRs you do not want to render in the changelog
color: 7b8eac
- name: do-not-merge
description: PRs that should not be merged until the commented issue is resolved
color: eb1515
# Issue Labels
- name: enhancement
description: issues that request a enhancement
color: 22ee47
- name: bug
description: issues that report a bug
color: ed8e21
21 changes: 0 additions & 21 deletions .github/release-drafter.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
changelog:
exclude:
labels:
- ignore-for-release
categories:
- title: ⚠️ Breaking Change
labels:
- breaking-change
- title: 🐛 Bug Fixes
labels:
- bugfix
- title: 🚀 New Features
labels:
- new-feature
- title: 💡 Improvements
labels:
- improvement
- title: 🧪 Testing Improvements
labels:
- testing
- title: ⚙️ Repo/CI Improvements
labels:
- repo-ci-improvement
- title: 📖 Documentation
labels:
- documentation
- title: 📦 Dependency Updates
labels:
- dependencies
- title: Other Changes
labels:
- "*"
70 changes: 70 additions & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Integration Tests

on:
workflow_dispatch: null
push:
branches:
- main
- dev

jobs:
integration-tests:
runs-on: ubuntu-latest
env:
EXIT_STATUS: 0
steps:
- name: Clone Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install Python deps
run: pip install -U setuptools wheel boto3 certifi

- name: Install Python SDK
run: make dev-install
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run Integration tests
run: |
timestamp=$(date +'%Y%m%d%H%M')
report_filename="${timestamp}_sdk_test_report.xml"
status=0
if ! python3 -m pytest test/integration/${INTEGRATION_TEST_PATH} --disable-warnings --junitxml="${report_filename}"; then
echo "EXIT_STATUS=1" >> $GITHUB_ENV
fi
env:
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }}

- name: Add additional information to XML report
run: |
filename=$(ls | grep -E '^[0-9]{12}_sdk_test_report\.xml$')
python tod_scripts/add_to_xml_test_report.py \
--branch_name "${GITHUB_REF#refs/*/}" \
--gha_run_id "$GITHUB_RUN_ID" \
--gha_run_number "$GITHUB_RUN_NUMBER" \
--xmlfile "${filename}"

- name: Upload test results
run: |
report_filename=$(ls | grep -E '^[0-9]{12}_sdk_test_report\.xml$')
python3 tod_scripts/test_report_upload_script.py "${report_filename}"
env:
LINODE_CLI_OBJ_ACCESS_KEY: ${{ secrets.LINODE_CLI_OBJ_ACCESS_KEY }}
LINODE_CLI_OBJ_SECRET_KEY: ${{ secrets.LINODE_CLI_OBJ_SECRET_KEY }}

- name: Test Execution Status Handler
run: |
if [[ "$EXIT_STATUS" != 0 ]]; then
echo "Test execution contains failure(s)"
exit $EXIT_STATUS
else
echo "Tests passed!"
fi
31 changes: 31 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: labeler

on:
push:
branches:
- 'main'
paths:
- '.github/labels.yml'
- '.github/workflows/labeler.yml'
pull_request:
paths:
- '.github/labels.yml'
- '.github/workflows/labeler.yml'

jobs:
labeler:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Run Labeler
uses: crazy-max/ghaction-github-labeler@de749cf181958193cb7debf1a9c5bb28922f3e1b
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
yaml-file: .github/labels.yml
dry-run: ${{ github.event_name == 'pull_request' }}
exclude: |
help*
*issue
61 changes: 61 additions & 0 deletions .github/workflows/release-cross-repo-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Release Ansible cross repository test

on:
pull_request:
branches:
- main
types: [opened] # Workflow will only be executed when PR is opened to main branch
workflow_dispatch: # Manual trigger


jobs:
ansible_integration_test:
runs-on: ubuntu-latest
steps:
- name: Checkout linode_api4 repository
uses: actions/checkout@v4

- name: update packages
run: sudo apt-get update -y

- name: install make
run: sudo apt-get install -y build-essential

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: checkout repo
uses: actions/checkout@v3
with:
repository: linode/ansible_linode
path: .ansible/collections/ansible_collections/linode/cloud

- name: install dependencies
run: |
cd .ansible/collections/ansible_collections/linode/cloud
pip install -r requirements.txt -r requirements-dev.txt --upgrade-strategy only-if-needed

- name: install ansible dependencies
run: ansible-galaxy collection install amazon.aws:==6.0.1

- name: install collection
run: |
cd .ansible/collections/ansible_collections/linode/cloud
make install

- name: Install linode_api4 # Need to install from source after all ansible dependencies have been installed
run: make install

- name: replace existing keys
run: |
cd .ansible/collections/ansible_collections/linode/cloud
rm -rf ~/.ansible/test && mkdir -p ~/.ansible/test && ssh-keygen -m PEM -q -t rsa -N '' -f ~/.ansible/test/id_rsa

- name: Run Ansible Tests
run: |
cd .ansible/collections/ansible_collections/linode/cloud
make testall
env:
LINODE_API_TOKEN: ${{ secrets.LINODE_TOKEN }}
16 changes: 0 additions & 16 deletions .github/workflows/release-drafter.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2
build:
os: ubuntu-lts-latest
tools:
python: latest
sphinx:
configuration: docs/conf.py
python:
install:
- method: pip
path: .
extra_requirements:
- doc
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ testunit:

.PHONY: smoketest
smoketest:
$(PYTHON) -m pytest -m smoke test/integration --disable-warnings
$(PYTHON) -m pytest -m smoke test/integration
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# -- Project information -----------------------------------------------------

project = 'linode_api4'
copyright = '2023, Linode'
copyright = '2024, Akamai Technologies Inc.'
author = 'Linode'

# The short X.Y version
Expand Down
20 changes: 19 additions & 1 deletion docs/linode_api4/linode_client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ Includes methods for managing your account.
:members:
:special-members:

BetaGroup
^^^^^^^^^

Includes methods for enrolling in beta programs.

.. autoclass:: linode_api4.linode_client.BetaGroup
:members:
:special-members:

DatabaseGroup
^^^^^^^^^^^^^

Expand Down Expand Up @@ -98,7 +107,7 @@ accessing and working with associated features.
:members:
:special-members:

LKE Group
LKEGroup
^^^^^^^^^

Includes methods for interacting with Linode Kubernetes Engine.
Expand Down Expand Up @@ -199,3 +208,12 @@ Includes methods for managing Linode Volumes.
.. autoclass:: linode_api4.linode_client.VolumeGroup
:members:
:special-members:

VPCGroup
^^^^^^^^

Includes methods for managing Linode VPCs.

.. autoclass:: linode_api4.linode_client.VPCGroup
:members:
:special-members:
18 changes: 18 additions & 0 deletions docs/linode_api4/objects/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ Account Models
:undoc-members:
:inherited-members:

Beta Models
-----------

.. automodule:: linode_api4.objects.beta
:members:
:exclude-members: api_endpoint, properties, derived_url_path, id_attribute, parent_id_name
:undoc-members:
:inherited-members:

Database Models
-------------

Expand Down Expand Up @@ -139,3 +148,12 @@ Volume Models
:exclude-members: api_endpoint, properties, derived_url_path, id_attribute, parent_id_name
:undoc-members:
:inherited-members:

VPC Models
----------

.. automodule:: linode_api4.objects.vpc
:members:
:exclude-members: api_endpoint, properties, derived_url_path, id_attribute, parent_id_name
:undoc-members:
:inherited-members:
1 change: 0 additions & 1 deletion docs/requirements.txt

This file was deleted.

4 changes: 2 additions & 2 deletions linode_api4/groups/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,10 +487,10 @@ def join_beta_program(self, beta: Union[str, BetaProgram]):

def availabilities(self, *filters):
"""
Returns a list of all available regions and the resources which are NOT available
Returns a list of all available regions and the resource types which are available
to the account.

API doc: TBD
API doc: https://www.linode.com/docs/api/account/#region-service-availability

:returns: a list of region availability information.
:rtype: PaginatedList of AccountAvailability
Expand Down
Loading