Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
e2e33b0
Merge pull request #196 from cortexapps/staging
jeff-schnitter Apr 2, 2026
ad8b16c
fix: use GH_TOKEN PAT for publish workflow git push to protected main…
jeff-schnitter Apr 2, 2026
7ad96e4
fix: pass GH_TOKEN to checkout action for protected branch push
jeff-schnitter Apr 2, 2026
1ebb963
chore: update HISTORY.md for main
actions-user Apr 2, 2026
7d2f482
fix: update GH Actions to Node 24 and fix dependabot security alerts
jeff-schnitter Apr 2, 2026
1f58252
chore: update HISTORY.md for main
actions-user Apr 2, 2026
4b8a71e
fix: remove publish.yml from paths trigger to prevent accidental rele…
jeff-schnitter Apr 2, 2026
d0c0ecc
feat: add functional test infrastructure for GitHub workflow action b…
jeff-schnitter Apr 7, 2026
c1519dc
feat: add cortex workflows run command
jeff-schnitter Apr 7, 2026
88d92cc
feat: add cortex workflows get-run command
jeff-schnitter Apr 7, 2026
f0310ac
feat: add list-branches workflow YAML for functional tests
jeff-schnitter Apr 7, 2026
8874ac0
feat: add GitHub helper functions for functional tests
jeff-schnitter Apr 7, 2026
ea6b2c0
feat: add session fixtures for functional tests
jeff-schnitter Apr 7, 2026
efddc65
feat: add functional test data import test
jeff-schnitter Apr 7, 2026
3d9b9b6
feat: add list-branches functional test
jeff-schnitter Apr 7, 2026
ea3036c
feat: add env var checks for functional tests in Justfile
jeff-schnitter Apr 7, 2026
b7176a7
docs: add README for functional test setup and prerequisites
jeff-schnitter Apr 7, 2026
24851a7
fix: use configurable GITHUB_INTEGRATION_ALIAS and assert import success
jeff-schnitter Apr 7, 2026
0556150
Add workflow CLI support, GitHub and GitLab functional tests
jeff-schnitter Apr 10, 2026
9cbe2a0
feat: pytest CVE fix, beta label updates, test improvements
jeff-schnitter Apr 15, 2026
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
17 changes: 9 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
- main
paths:
- 'cortexapps_cli/**'
- '.github/workflows/publish.yml'

env:
CORTEX_API_KEY: ${{ secrets.CORTEX_API_KEY_PRODUCTION }}
Expand All @@ -25,13 +24,14 @@ jobs:
URL: ${{ steps.git-details.outputs.URL }}
VERSION: ${{ steps.git-details.outputs.VERSION }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: main
fetch-depth: 0

token: ${{ secrets.GH_TOKEN }}

- name: Bump version and push tag
uses: anothrNick/github-tag-action@1.64.0
uses: anothrNick/github-tag-action@1.75.0
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
WITH_V: false
Expand All @@ -40,9 +40,10 @@ jobs:
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git

- name: Set up Python 3.11
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: 3.11

Expand Down Expand Up @@ -138,7 +139,7 @@ jobs:
SHA: ${{ steps.build-docker-image.outputs.SHA }}
URL: ${{ steps.build-docker-image.outputs.URL }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Get version info
env:
Expand All @@ -158,7 +159,7 @@ jobs:
echo "URL=https://hub.docker.com/layers/${{ env.DOCKER_ORGANIZATION }}/cli/${{ env.VERSION }}/images/${sha}" >> $GITHUB_OUTPUT

- name: Run Trivy on Root Image
uses: aquasecurity/trivy-action@master
uses: aquasecurity/trivy-action@v0.35.0
with:
image-ref: ${{ env.DOCKER_IMAGE }}
format: table
Expand Down Expand Up @@ -209,7 +210,7 @@ jobs:
- pypi
runs-on: ubuntu-latest
steps:
- uses: mislav/bump-homebrew-formula-action@v3
- uses: mislav/bump-homebrew-formula-action@v4
with:
formula-name: cortexapps-cli
homebrew-tap: cortexapps/homebrew-tap
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
#python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

Expand Down
89 changes: 69 additions & 20 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,56 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

<!-- insertion marker -->
## [1.14.0](https://github.com/cortexapps/cli/releases/tag/1.14.0) - 2026-04-02

<small>[Compare with 1.13.0](https://github.com/cortexapps/cli/compare/1.13.0...1.14.0)</small>

### Bug Fixes

- update GH Actions to Node 24 and fix dependabot security alerts ([7d2f482](https://github.com/cortexapps/cli/commit/7d2f4828210dedc1880a3730a0f57259fce3950f) by Jeff Schnitter).

## [1.13.0](https://github.com/cortexapps/cli/releases/tag/1.13.0) - 2026-04-02

<small>[Compare with 1.12.0](https://github.com/cortexapps/cli/compare/1.12.0...1.13.0)</small>

### Bug Fixes

- pass GH_TOKEN to checkout action for protected branch push ([7ad96e4](https://github.com/cortexapps/cli/commit/7ad96e4f3e3f9a5abd584059ca229058588c8a24) by Jeff Schnitter).

## [1.12.0](https://github.com/cortexapps/cli/releases/tag/1.12.0) - 2026-04-02

<small>[Compare with 1.11.0](https://github.com/cortexapps/cli/compare/1.11.0...1.12.0)</small>

### Bug Fixes

- use GH_TOKEN PAT for publish workflow git push to protected main branch ([ad8b16c](https://github.com/cortexapps/cli/commit/ad8b16c0ba1f6c4b7d671901e431b6fdaa4fa998) by Jeff Schnitter).

## [1.11.0](https://github.com/cortexapps/cli/releases/tag/1.11.0) - 2026-04-02

<small>[Compare with 1.10.0](https://github.com/cortexapps/cli/compare/1.10.0...1.11.0)</small>

### Features

- Add User-Agent header to CLI API requests (#195) ([8e94411](https://github.com/cortexapps/cli/commit/8e94411a9dc5b3e64d922ad148adcd234c6d187f) by Jeff Schnitter).
- add entity relationships API support with optimized backup/restore (#160) ([6fc38bb](https://github.com/cortexapps/cli/commit/6fc38bbf5a4fe994f3967b6c0aad3a379b5c20ac) by Jeff Schnitter).
- add support for Cortex Secrets API (#161) ([32c9f45](https://github.com/cortexapps/cli/commit/32c9f456e4dcde53b8df370f2e2b9ba45c9cbb8b) by Jeff Schnitter).

### Bug Fixes

- correct New Relic integration commands to match API (#192) ([a54f13a](https://github.com/cortexapps/cli/commit/a54f13aacebc54d8db3df0443da97600c8fa0eb1) by Jeff Schnitter).
- only retry on 429 rate limit errors, not 5xx server errors (#179) ([a037024](https://github.com/cortexapps/cli/commit/a037024672d7721d490c1f3cfca79e6e0399a289) by Jeff Schnitter).
- initialize results and failed_count before directory check in import functions (#178) ([b5f0c5a](https://github.com/cortexapps/cli/commit/b5f0c5a939cf15924ca46d2265513ff510c5251c) by Jeff Schnitter).
- change default logging level from INFO to WARNING (#177) ([d7e6963](https://github.com/cortexapps/cli/commit/d7e6963d6ba3157d1690b7288991502b337dd6b9) by Jeff Schnitter).
- only retry on 429 rate limit errors, not 5xx server errors ([b292e67](https://github.com/cortexapps/cli/commit/b292e67b1896c291b8bb63969ea97bf5a3d04d33) by Jeff Schnitter).
- initialize results and failed_count before directory check in import functions ([4165886](https://github.com/cortexapps/cli/commit/41658862455075d01c23be72432785d9e66c0afd) by Jeff Schnitter).
- change default logging level from INFO to WARNING ([8e58ea0](https://github.com/cortexapps/cli/commit/8e58ea0c94b4b077604d114618f21209f28a3e67) by Jeff Schnitter).
- remove rate limiter initialization log message (#168) ([5741d35](https://github.com/cortexapps/cli/commit/5741d355451a1f1ad1e658f1974cfeb6d1dfd559) by Jeff Schnitter).
- add client-side rate limiting and make tests idempotent (#165) #minor ([e54dca3](https://github.com/cortexapps/cli/commit/e54dca376e67a7dbc0059ff4f2f942014b308cf8) by Jeff Schnitter).

### Performance Improvements

- optimize test scheduling with --dist loadfile for 25% faster test runs ([0d99232](https://github.com/cortexapps/cli/commit/0d992320bdd9eecb2e0e86ebb3e7088ce81a9829) by Jeff Schnitter).

## [1.10.0](https://github.com/cortexapps/cli/releases/tag/1.10.0) - 2026-01-23

<small>[Compare with 1.9.0](https://github.com/cortexapps/cli/compare/1.9.0...1.10.0)</small>
Expand All @@ -18,24 +68,23 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- Update urllib3 to address CVE-2025-66418 and CVE-2025-66471 #patch (#188) ([4fba98b](https://github.com/cortexapps/cli/commit/4fba98bf12083faa030dfb84b2db325d55ae9afc) by Jeff Schnitter).

## [1.7.0](https://github.com/cortexapps/cli/releases/tag/1.7.0) - 2025-11-19
## [1.7.0](https://github.com/cortexapps/cli/releases/tag/1.7.0) - 2025-11-18

<small>[Compare with 1.6.0](https://github.com/cortexapps/cli/compare/1.6.0...1.7.0)</small>

## [1.6.0](https://github.com/cortexapps/cli/releases/tag/1.6.0) - 2025-11-14
## [1.6.0](https://github.com/cortexapps/cli/releases/tag/1.6.0) - 2025-11-13

<small>[Compare with 1.5.0](https://github.com/cortexapps/cli/compare/1.5.0...1.6.0)</small>

### Bug Fixes

- remove rate limiter initialization log message (#169) #patch ([015107a](https://github.com/cortexapps/cli/commit/015107aca15d5a4cf4eb746834bcbb7dac607e1d) by Jeff Schnitter).


## [1.5.0](https://github.com/cortexapps/cli/releases/tag/1.5.0) - 2025-11-13

<small>[Compare with 1.4.0](https://github.com/cortexapps/cli/compare/1.4.0...1.5.0)</small>

## [1.4.0](https://github.com/cortexapps/cli/releases/tag/1.4.0) - 2025-11-06
## [1.4.0](https://github.com/cortexapps/cli/releases/tag/1.4.0) - 2025-11-05

<small>[Compare with 1.3.0](https://github.com/cortexapps/cli/compare/1.3.0...1.4.0)</small>

Expand All @@ -49,7 +98,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- rename test_deploys.py to test_000_deploys.py for early scheduling ([f36aae2](https://github.com/cortexapps/cli/commit/f36aae22f56317cde70a6a9df56b097edb6a6117) by Jeff Schnitter).
- optimize test scheduling with --dist loadfile for 25% faster test runs (#157) ([8879fcf](https://github.com/cortexapps/cli/commit/8879fcfa7ee30a73f023e8bbef7d799808493319) by Jeff Schnitter).

## [1.3.0](https://github.com/cortexapps/cli/releases/tag/1.3.0) - 2025-11-05
## [1.3.0](https://github.com/cortexapps/cli/releases/tag/1.3.0) - 2025-11-04

<small>[Compare with 1.2.0](https://github.com/cortexapps/cli/compare/1.2.0...1.3.0)</small>

Expand Down Expand Up @@ -127,7 +176,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

<small>[Compare with 0.27.0](https://github.com/cortexapps/cli/compare/0.27.0...1.0.0)</small>

## [0.27.0](https://github.com/cortexapps/cli/releases/tag/0.27.0) - 2025-01-05
## [0.27.0](https://github.com/cortexapps/cli/releases/tag/0.27.0) - 2025-01-04

<small>[Compare with 0.26.7](https://github.com/cortexapps/cli/compare/0.26.7...0.27.0)</small>

Expand All @@ -151,7 +200,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

<small>[Compare with 0.26.4](https://github.com/cortexapps/cli/compare/0.26.4...0.26.5)</small>

## [0.26.4](https://github.com/cortexapps/cli/releases/tag/0.26.4) - 2024-06-27
## [0.26.4](https://github.com/cortexapps/cli/releases/tag/0.26.4) - 2024-06-26

<small>[Compare with 0.26.3](https://github.com/cortexapps/cli/compare/0.26.3...0.26.4)</small>

Expand All @@ -175,39 +224,39 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

<small>[Compare with 0.24.3](https://github.com/cortexapps/cli/compare/0.24.3...0.25.0)</small>

## [0.24.3](https://github.com/cortexapps/cli/releases/tag/0.24.3) - 2024-04-27
## [0.24.3](https://github.com/cortexapps/cli/releases/tag/0.24.3) - 2024-04-26

<small>[Compare with 0.24.2](https://github.com/cortexapps/cli/compare/0.24.2...0.24.3)</small>

## [0.24.2](https://github.com/cortexapps/cli/releases/tag/0.24.2) - 2024-02-28

<small>[Compare with 0.24.1](https://github.com/cortexapps/cli/compare/0.24.1...0.24.2)</small>

## [0.24.1](https://github.com/cortexapps/cli/releases/tag/0.24.1) - 2024-02-15
## [0.24.1](https://github.com/cortexapps/cli/releases/tag/0.24.1) - 2024-02-14

<small>[Compare with 0.24.0](https://github.com/cortexapps/cli/compare/0.24.0...0.24.1)</small>

## [0.24.0](https://github.com/cortexapps/cli/releases/tag/0.24.0) - 2024-02-14
## [0.24.0](https://github.com/cortexapps/cli/releases/tag/0.24.0) - 2024-02-13

<small>[Compare with 0.23.0](https://github.com/cortexapps/cli/compare/0.23.0...0.24.0)</small>

## [0.23.0](https://github.com/cortexapps/cli/releases/tag/0.23.0) - 2024-02-06
## [0.23.0](https://github.com/cortexapps/cli/releases/tag/0.23.0) - 2024-02-05

<small>[Compare with 0.22.0](https://github.com/cortexapps/cli/compare/0.22.0...0.23.0)</small>

## [0.22.0](https://github.com/cortexapps/cli/releases/tag/0.22.0) - 2024-02-06
## [0.22.0](https://github.com/cortexapps/cli/releases/tag/0.22.0) - 2024-02-05

<small>[Compare with 0.21.0](https://github.com/cortexapps/cli/compare/0.21.0...0.22.0)</small>

## [0.21.0](https://github.com/cortexapps/cli/releases/tag/0.21.0) - 2024-01-26
## [0.21.0](https://github.com/cortexapps/cli/releases/tag/0.21.0) - 2024-01-25

<small>[Compare with 0.20.0](https://github.com/cortexapps/cli/compare/0.20.0...0.21.0)</small>

## [0.20.0](https://github.com/cortexapps/cli/releases/tag/0.20.0) - 2024-01-23
## [0.20.0](https://github.com/cortexapps/cli/releases/tag/0.20.0) - 2024-01-22

<small>[Compare with 0.19.0](https://github.com/cortexapps/cli/compare/0.19.0...0.20.0)</small>

## [0.19.0](https://github.com/cortexapps/cli/releases/tag/0.19.0) - 2023-12-22
## [0.19.0](https://github.com/cortexapps/cli/releases/tag/0.19.0) - 2023-12-21

<small>[Compare with 0.18.0](https://github.com/cortexapps/cli/compare/0.18.0...0.19.0)</small>

Expand All @@ -231,7 +280,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

<small>[Compare with 0.13.0](https://github.com/cortexapps/cli/compare/0.13.0...0.14.0)</small>

## [0.13.0](https://github.com/cortexapps/cli/releases/tag/0.13.0) - 2023-12-01
## [0.13.0](https://github.com/cortexapps/cli/releases/tag/0.13.0) - 2023-11-30

<small>[Compare with 0.12.0](https://github.com/cortexapps/cli/compare/0.12.0...0.13.0)</small>

Expand All @@ -243,7 +292,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

<small>[Compare with 0.10.0](https://github.com/cortexapps/cli/compare/0.10.0...0.11.0)</small>

## [0.10.0](https://github.com/cortexapps/cli/releases/tag/0.10.0) - 2023-11-22
## [0.10.0](https://github.com/cortexapps/cli/releases/tag/0.10.0) - 2023-11-21

<small>[Compare with 0.9.0](https://github.com/cortexapps/cli/compare/0.9.0...0.10.0)</small>

Expand All @@ -255,19 +304,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

<small>[Compare with 0.7.0](https://github.com/cortexapps/cli/compare/0.7.0...0.8.0)</small>

## [0.7.0](https://github.com/cortexapps/cli/releases/tag/0.7.0) - 2023-11-18
## [0.7.0](https://github.com/cortexapps/cli/releases/tag/0.7.0) - 2023-11-17

<small>[Compare with 0.6.0](https://github.com/cortexapps/cli/compare/0.6.0...0.7.0)</small>

## [0.6.0](https://github.com/cortexapps/cli/releases/tag/0.6.0) - 2023-11-16

<small>[Compare with 0.5.0](https://github.com/cortexapps/cli/compare/0.5.0...0.6.0)</small>

## [0.5.0](https://github.com/cortexapps/cli/releases/tag/0.5.0) - 2023-11-14
## [0.5.0](https://github.com/cortexapps/cli/releases/tag/0.5.0) - 2023-11-13

<small>[Compare with 0.4.0](https://github.com/cortexapps/cli/compare/0.4.0...0.5.0)</small>

## [0.4.0](https://github.com/cortexapps/cli/releases/tag/0.4.0) - 2023-11-14
## [0.4.0](https://github.com/cortexapps/cli/releases/tag/0.4.0) - 2023-11-13

<small>[Compare with 0.3.0](https://github.com/cortexapps/cli/compare/0.3.0...0.4.0)</small>

Expand Down
22 changes: 20 additions & 2 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ pytest := 'PYTHONPATH=. poetry run pytest -rA'
export CORTEX_API_KEY := env('CORTEX_API_KEY')
export CORTEX_BASE_URL := env('CORTEX_BASE_URL', "https://api.getcortexapp.com")
export CORTEX_API_KEY_VIEWER := env('CORTEX_API_KEY_VIEWER')
export GITHUB_TEST_ORG := env('GITHUB_TEST_ORG', "")
export GITHUB_TEST_PAT := env('GITHUB_TEST_PAT', "")
export GITHUB_TEST_USERNAME := env('GITHUB_TEST_USERNAME', "")
export GITHUB_INTEGRATION_ALIAS := env('GITHUB_INTEGRATION_ALIAS', "")
export GITLAB_TOKEN := env('GITLAB_TOKEN', "")
export GITLAB_INTEGRATION_ALIAS := env('GITLAB_INTEGRATION_ALIAS', "")

help:
@just -l
Expand All @@ -13,11 +19,11 @@ _setup:

# Run all tests
test-all: _setup test-import
{{pytest}} -n auto -m "not setup and not perf" --html=report.html --self-contained-html --cov=cortexapps_cli --cov-append --cov-report term-missing tests
{{pytest}} -n auto -m "not setup and not perf and not functional" --html=report.html --self-contained-html --cov=cortexapps_cli --cov-append --cov-report term-missing tests

# Run all tests serially - helpful to see if any tests seem to be hanging
_test-all-individual: test-import
{{pytest}} -m "not setup and not perf" --html=report-all-invidual.html --self-contained-html --cov=cortexapps_cli --cov-append --cov-report term-missing tests
{{pytest}} -m "not setup and not perf and not functional" --html=report-all-invidual.html --self-contained-html --cov=cortexapps_cli --cov-append --cov-report term-missing tests

# Run import test, a pre-requisite for any tests that rely on test data.
test-import:
Expand All @@ -27,6 +33,18 @@ test-import:
test testname:
{{pytest}} -n auto -m "" {{testname}}

# Import functional test data (workflows)
test-functional-import:
{{pytest}} tests/functional/test_functional_import.py --cov=cortexapps_cli --cov-report=

# Run functional tests, ie: just test-functional tests/functional/test_gh_branches.py
test-functional *args:
{{pytest}} -v -s -n auto -m functional --html=report-functional.html --self-contained-html {{args}}

# Clean up orphaned functional test resources from interrupted runs
test-functional-sweep:
{{pytest}} -v -s tests/functional/test_gh_sweep.py

# Run performance tests (rate limiting, long-running tests)
test-perf:
@echo "Running performance tests (this may take 60+ seconds)..."
Expand Down
2 changes: 1 addition & 1 deletion cortexapps_cli/commands/entity_relationships.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from cortexapps_cli.command_options import CommandOptions, ListCommandOptions

app = typer.Typer(
help="Entity Relationships commands (Beta)",
help="Entity Relationships commands",
no_args_is_help=True
)

Expand Down
Loading