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

Merge stable into branch release-1.1 #5193

Merged
merged 63 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
7113231
Fix error message returned while querying for a missing repository file
LucasG0 Dec 2, 2024
506de50
Add validator when adding a new attribute to the schema
dgarros Dec 3, 2024
92066dd
Merge pull request #5116 from opsmill/dga-20241202-fix-5106
dgarros Dec 3, 2024
99e8a49
Use the branch uuid instead of the internal database id to track the …
dgarros Dec 3, 2024
541ad1f
Refresh branch hash in cache for local worker on create
ogenstad Dec 3, 2024
bc76067
release v1.0.8 (#5137)
lykinsbd Dec 3, 2024
dff12ce
Merge pull request #5138 from opsmill/pog-empty-hash-on-branch-create…
ogenstad Dec 3, 2024
a13b7b1
add pypi publish
BeArchiTek Dec 3, 2024
b9893eb
fix(ci): update release workflow to use release events
fatih-acar Dec 3, 2024
6eb22e4
fix(ci): ignore some linter rules
fatih-acar Dec 3, 2024
00bc5c5
Update relationship field to use new combobox and improve UI/UX (#5093)
pa-lem Dec 4, 2024
ba8516b
Add pagination and backend search in new combobox for relationships (…
pa-lem Dec 5, 2024
784295f
add pypi publish
BeArchiTek Dec 3, 2024
4b106fe
fix(ci): update release workflow to use release events
fatih-acar Dec 3, 2024
0af8b02
fix(ci): ignore some linter rules
fatih-acar Dec 3, 2024
2d7f3b1
update required style (#5146)
pa-lem Dec 5, 2024
99496d1
fix(ci): add workflow_dispatch for publish pypi
fatih-acar Dec 5, 2024
5cf0efe
chore(ci): remove legacy chart repo
fatih-acar Nov 4, 2024
0e89fb7
Changelog Fixes (#5149)
lykinsbd Dec 5, 2024
8bc2928
fix spacing errors with `towncrier build` by adding custom template (…
lykinsbd Dec 5, 2024
8def246
initial CI and invoke tasks for releases (#5156)
lykinsbd Dec 5, 2024
42ac866
move imports into functions to allow `invoke` execution (#5160)
lykinsbd Dec 5, 2024
a6d50cd
bump to version to 1.0.9a0
lykinsbd Dec 5, 2024
8d6093f
Merge branch 'stable' of github.com:opsmill/infrahub into ple-beta-st…
pa-lem Dec 5, 2024
e8c5025
Merge pull request #5161 from opsmill/ple-beta-stable
pa-lem Dec 5, 2024
49e9dfe
Review the overview (#5143)
BaptisteGi Dec 9, 2024
e25a602
Merge pull request #5139 from opsmill/lgu-fix-error-on-missing-file
LucasG0 Dec 9, 2024
a929d26
update doc for MacOs install (#5159)
rmaunier Dec 9, 2024
432027d
bump version to 1.0.9b
lykinsbd Dec 9, 2024
67de8d5
Merge branch 'stable' of https://github.com/opsmill/infrahub into rel…
lykinsbd Dec 9, 2024
9418095
Add CoreProfile to database
ogenstad Dec 9, 2024
09ecf6a
fix typo in doc (#5167)
rmaunier Dec 9, 2024
ba027ff
Rm fix doc typo shell (#5169)
rmaunier Dec 9, 2024
2d5df80
Add new CICD trigger to update submodule (#5166) (#5171)
BeArchiTek Dec 9, 2024
46d3a18
Update trigger-submodule.yml (#5174)
BeArchiTek Dec 10, 2024
e19331e
Merge pull request #5170 from opsmill/pog-store-coreprofile-in-db
ogenstad Dec 10, 2024
afb7c5c
Merge pull request #5140 from opsmill/dga-20241203-fix-branch-id
dgarros Dec 10, 2024
846a428
refactor Search Anywhere component (#5175)
bilalabbad Dec 10, 2024
1f5f5d4
Add trigger to update submodule in Enterprise (#5179)
BeArchiTek Dec 10, 2024
e77be99
Consistently use "Save" on all forms submit button (#5181)
bilalabbad Dec 10, 2024
c3aa86a
Refresh menu after access token has expired (#5180)
bilalabbad Dec 10, 2024
fab6295
Add uuid to spelling-exceptions (#5182)
BeArchiTek Dec 10, 2024
9730d08
Merge branch 'stable' into release-1.0.9-beta
BeArchiTek Dec 10, 2024
d657460
On generic schema viewer, display "Hierarchical" value (#5184)
bilalabbad Dec 10, 2024
4cf8009
fix flaky when uuid contains "256"
bilalabbad Dec 10, 2024
d54f3af
chore: lint
bilalabbad Dec 10, 2024
6594264
Initialize services for infrahub db update-core-schema
LucasG0 Dec 10, 2024
fe830fb
Remove infrahub_db_port in neo4j docker file
LucasG0 Dec 10, 2024
2966727
Merge pull request #5168 from opsmill/release-1.0.9-beta
opsmill-bot Dec 10, 2024
6470179
Merge pull request #5186 from opsmill/lgu-fix-infrahub-db-update
LucasG0 Dec 10, 2024
d9561a1
Allow pool as relationship name
LucasG0 Dec 10, 2024
358575d
Merge pull request #5187 from opsmill/lgu-fix-pool-rel-name
LucasG0 Dec 10, 2024
5ff22db
Search shortcuts show 'Cmd' on macOS and 'Ctrl' on other systems. (#5…
bilalabbad Dec 11, 2024
f91b4e8
Fixes SEMVER release tasks (#5172)
BeArchiTek Dec 11, 2024
b684529
chore: update docker-compose and helm chart
opsmill-bot Dec 11, 2024
73f6e8f
Bump the npm_and_yarn group across 2 directories with 6 updates (#5177)
dependabot[bot] Dec 11, 2024
0ced4f7
handle generics and generics peers correctly when deleting nodes (#5133)
ajtmccarty Dec 11, 2024
a5871df
Merge branch 'stable' into bab-merge-stable-into-1.1
bilalabbad Dec 11, 2024
376ad31
update changelog
bilalabbad Dec 11, 2024
3a29425
fix poetry lock + lint
bilalabbad Dec 11, 2024
6ab6b87
fix lint changelog
bilalabbad Dec 11, 2024
e765858
Initialize component/cache within test_proposed_changes.py
LucasG0 Dec 11, 2024
2f96f31
fix e2e search
bilalabbad Dec 11, 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
9 changes: 8 additions & 1 deletion .github/file-filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ doc_files: &doc_files
- package.json
- package-lock.json

release_files: &release_files
- "changelog/*.md"
- CHANGELOG.md
- "docs/docs/release_notes/infrahub/*.mdx"

helm_files: &helm_files
- "helm/**"

Expand All @@ -49,7 +54,6 @@ yaml_all: &yaml_all
markdown_all: &markdown_all
- "**/*.{md,mdx}"


backend_all:
- *backend_files
- *ci_config
Expand All @@ -62,6 +66,9 @@ documentation_all:
- *doc_files
- *markdown_all

release_all:
- *release_files

helm_all:
- *helm_files

Expand Down
47 changes: 37 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
outputs:
backend: ${{ steps.changes.outputs.backend_all }}
documentation: ${{ steps.changes.outputs.documentation_all }}
release: ${{ steps.changes.outputs.release_all }}
frontend: ${{ steps.changes.outputs.frontend_all }}
helm: ${{ steps.changes.outputs.helm_all }}
e2e: ${{ steps.changes.outputs.e2e_all }}
Expand Down Expand Up @@ -124,7 +125,9 @@ jobs:
run: "ruff format --check --diff --exclude python_sdk ."

markdown-lint:
if: needs.files-changed.outputs.documentation == 'true'
if: |
needs.files-changed.outputs.documentation == 'true' ||
needs.files-changed.outputs.release == 'true'
needs: ["files-changed"]
runs-on: "ubuntu-latest"
timeout-minutes: 5
Expand All @@ -139,7 +142,6 @@ jobs:
config: .markdownlint.yaml
globs: |
**/*.{md,mdx}
!changelog/*.md
action-lint:
if: needs.files-changed.outputs.github_workflows == 'true'
Expand Down Expand Up @@ -200,7 +202,7 @@ jobs:
# with:
# submodules: true
# - name: "Install Invoke"
# run: "pip install toml invoke"
# run: "pip install invoke toml"

# - name: "Set environment variables"
# run: echo INFRAHUB_BUILD_NAME=infrahub-${{ runner.name }} >> $GITHUB_ENV
Expand Down Expand Up @@ -529,7 +531,7 @@ jobs:
- name: "Install dependencies"
run: npm install
- name: "Setup Python environment"
run: "pip install toml invoke"
run: "pip install invoke toml"
- name: "Build website"
run: "invoke docs.build"

Expand Down Expand Up @@ -568,7 +570,7 @@ jobs:
always() && !cancelled() &&
!contains(needs.*.result, 'failure') &&
!contains(needs.*.result, 'cancelled') &&
needs.files-changed.outputs.documentation == 'true'
needs.files-changed.outputs.release == 'true'
needs: ["files-changed", "yaml-lint", "python-lint"]
runs-on: "ubuntu-22.04"
timeout-minutes: 5
Expand All @@ -586,7 +588,32 @@ jobs:
env:
VALE_VERSION: ${{ env.VALE_VERSION }}
- name: "Validate documentation style"
run: ./vale $(find . -type f \( -name "*.mdx" -o -name "*.md" \) -not -path "./docs/node_modules/*")
run: ./vale $(find ./docs -type f \( -name "*.mdx" -o -name "*.md" \) -not -path "./docs/node_modules/*")

validate-release-notes-style:
if: |
always() && !cancelled() &&
!contains(needs.*.result, 'failure') &&
!contains(needs.*.result, 'cancelled') &&
needs.files-changed.outputs.release == 'true'
needs: ["files-changed", "yaml-lint", "python-lint"]
runs-on: "ubuntu-22.04"
timeout-minutes: 5
steps:
- name: "Check out repository code"
uses: "actions/checkout@v4"
with:
submodules: true
# The official GitHub Action for Vale doesn't work, installing manually instead:
# https://github.com/errata-ai/vale-action/issues/103
- name: Download Vale
run: |
curl -sL "https://github.com/errata-ai/vale/releases/download/v${VALE_VERSION}/vale_${VALE_VERSION}_Linux_64-bit.tar.gz" -o vale.tar.gz
tar -xzf vale.tar.gz
env:
VALE_VERSION: ${{ env.VALE_VERSION }}
- name: "Validate release notes style"
run: ./vale $(find ./changelog ./docs/docs/release-notes/infrahub -type f \( -name '*.mdx' -o -name '*.md' \)) CHANGELOG.md

# ------------------------------------------ E2E Tests ------------------------------------------
E2E-testing-playwright:
Expand Down Expand Up @@ -636,7 +663,7 @@ jobs:
cache-dependency-path: frontend/app/package-lock.json

- name: Install Invoke
run: pip install toml invoke
run: pip install invoke toml

- name: Set job name
run: echo JOB_NAME="$GITHUB_JOB" >> $GITHUB_ENV
Expand Down Expand Up @@ -707,9 +734,9 @@ jobs:

- name: Add response delay if required
if: needs.files-changed.outputs.e2e_tests == 'true'
run: echo "INFRAHUB_MISC_RESPONSE_DELAY=1" >> $GITHUB_ENV && invoke dev.start
run: echo "INFRAHUB_MISC_RESPONSE_DELAY=0" >> $GITHUB_ENV && invoke dev.start
env:
INFRAHUB_MISC_RESPONSE_DELAY: 1
INFRAHUB_MISC_RESPONSE_DELAY: 0

- name: Set infrahub address
if: needs.files-changed.outputs.e2e_tests == 'true'
Expand Down Expand Up @@ -807,7 +834,7 @@ jobs:

- name: Install Invoke
run: |
pip install toml invoke
pip install invoke toml
- name: Set job name
run: echo JOB_NAME="$GITHUB_JOB" >> $GITHUB_ENV
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/publish-helm-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ jobs:
- name: Install Helm
uses: azure/[email protected]

- name: Install Helm Push Plugin
run: helm plugin install https://github.com/chartmuseum/helm-push

- name: Determine Chart Version
id: version
run: |
Expand All @@ -61,9 +58,6 @@ jobs:
--username '${{ secrets.HARBOR_USERNAME }}'
--password '${{ secrets.HARBOR_PASSWORD }}'
- name: Add Helm repository
run: helm repo add opsmill https://${{ vars.HARBOR_HOST }}/chartrepo/opsmill

- name: Package Helm Chart
run: |
helm package --dependency-update ./helm --version ${{ steps.version.outputs.version }}
Expand All @@ -73,12 +67,5 @@ jobs:
run: |
helm push infrahub-${{ steps.version.outputs.version }}.tgz oci://${{ vars.HARBOR_HOST }}/opsmill/chart
- name: Push Helm Chart to traditional repository
if: ${{ inputs.publish }}
run: >
helm cm-push -f infrahub-${{ steps.version.outputs.version }}.tgz opsmill
--username '${{ secrets.HARBOR_USERNAME }}'
--password '${{ secrets.HARBOR_PASSWORD }}'
- name: Cleanup
run: rm -f infrahub-${{ steps.version.outputs.version }}.tgz
14 changes: 13 additions & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
name: Publish Infrahub-Server Package

on:
workflow_dispatch:
inputs:
runs-on:
description: "The OS to run the job on"
required: false
default: "ubuntu-22.04"
type: string
publish:
type: boolean
description: Whether to publish the package to Pypi
required: false
default: false
workflow_call:
inputs:
runs-on:
Expand All @@ -12,7 +24,7 @@ on:
type: string
publish:
type: boolean
description: Wether to publish the package to Pypi
description: Whether to publish the package to Pypi
required: false
default: false

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,10 @@ jobs:
secrets: inherit
with:
publish: true

update-submodule:
needs: check_release
uses: ./.github/workflows/update-submodule.yml
secrets: inherit
with:
version: ${{ github.ref_name }}
71 changes: 71 additions & 0 deletions .github/workflows/trigger-submodule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
# yamllint disable rule:truthy rule:line-length
name: Handle Submodule Trigger

on:
repository_dispatch:
types:
- trigger-submodule-update

jobs:
update-dependencies:
strategy:
matrix:
branch-name:
- stable
- develop
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: "${{ matrix.branch-name }}"
submodules: recursive

- name: Set branch name
id: set-branch-name
run: |
SUBMODULE_PATH="python_sdk"
SDK_VERSION="${{ github.event.client_payload.version }}"
BRANCH_NAME="${{ matrix.branch-name}}-${SUBMODULE_PATH}-${SDK_VERSION}"
echo "SUBMODULE_PATH=$SUBMODULE_PATH" >> $GITHUB_ENV
echo "SDK_VERSION=$SDK_VERSION" >> $GITHUB_ENV
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
- name: Use the version from the client payload to update the submodule
run: |
echo "Updating submodule to version: ${{ env.SDK_VERSION }}"
echo "Branch name: ${{ env.BRANCH_NAME }}"
# Navigate to the submodule and update it to the specified version
cd ${{ env.SUBMODULE_PATH }}
git fetch --tags
git checkout ${{ env.SDK_VERSION }}
cd -
- name: Prepare the branch for the update
id: prepare-branch
run: |
echo "Checking if branch ${{ env.BRANCH_NAME }} exists..."
BRANCH_EXISTS=$(git ls-remote --heads origin ${{ env.BRANCH_NAME }} | wc -l)
echo "BRANCH_EXISTS=$BRANCH_EXISTS" >> $GITHUB_ENV
- name: Commit and push changes with github-actions-x/commit
uses: github-actions-x/[email protected]
with:
github-token: ${{ secrets.GH_UPDATE_PACKAGE_OTTO }}
push-branch: ${{ env.BRANCH_NAME }}
commit-message: "chore: update submodule ${{ env.SUBMODULE_PATH }} to version ${{ env.SDK_VERSION }}"
files: ${{ env.SUBMODULE_PATH }}/
name: opsmill-bot
email: [email protected]
rebase: ${{ env.BRANCH_EXISTS == 1 }}

- name: Create a pull request
run: |
echo ${{ secrets.GH_UPDATE_PACKAGE_OTTO }} | gh auth login --with-token
gh pr create \
--title "Update ${{ env.SUBMODULE_PATH }} to version ${{ env.SDK_VERSION }} against ${{ matrix.branch-name}}" \
--body "This PR updates the submodule ${{ env.SUBMODULE_PATH }} to version ${{ env.SDK_VERSION }}." \
--base ${{ matrix.branch-name}} \
--head ${{ env.BRANCH_NAME }}
6 changes: 3 additions & 3 deletions .github/workflows/update-compose-file-and-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ jobs:
run: "poetry install --all-extras"

- name: "Update Docker Env variable in docker-compose.yml file"
run: "poetry run invoke dev.gen-config-env -u"
run: "poetry run invoke release.gen-config-env -u"
- name: "Update Infrahub Image Version in docker-compose.yml file"
run: "poetry run invoke dev.update-docker-compose"
run: "poetry run invoke release.update-docker-compose"
- name: "Update AppVersion in helm/chart.yaml file"
run: "poetry run invoke dev.update-helm-chart"
run: "poetry run invoke release.update-helm-chart"
- name: Commit docker-compose.yml and helm
uses: github-actions-x/[email protected]
with:
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/update-submodule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
# yamllint disable rule:truthy rule:line-length
name: Trigger Submodule update

on:
workflow_dispatch:
inputs:
runs-on:
description: "The OS to run the job on"
required: false
default: "ubuntu-22.04"
type: string
version:
type: string
required: false
description: The string to extract semver from.
default: ''
workflow_call:
inputs:
runs-on:
description: "The OS to run the job on"
required: false
default: "ubuntu-22.04"
type: string
version:
type: string
required: false
description: The string to extract semver from.
default: ''

jobs:
trigger-submodule:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Trigger submodule update
run: |
curl -X POST \
-H 'Authorization: token ${{ secrets.GH_UPDATE_PACKAGE_OTTO }}' \
-H 'Accept: application/vnd.github.v3+json' \
'https://api.github.com/repos/${{ secrets.INFRAHUB_ENTERPRISE_REPOSITORY }}/dispatches' \
-d '{"event_type":"trigger-submodule-update","client_payload":{"version":"${{ inputs.version }}"}}'
3 changes: 3 additions & 0 deletions .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ BasedOnStyles = Infrahub
;(import.*?\n) to ignore import statement in .mdx
;(```.*?```\n) to ignore code block in .mdx
BlockIgnores = (?s) *((import.*?\n)|(```.*?```\n))

[*]
BasedOnStyles = Infrahub
5 changes: 5 additions & 0 deletions .vale/styles/spelling-exceptions.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
agent
Alibaba
Ansible
append_git_suffix
APIs
artifact_definitions
artifact_name
Expand All @@ -12,6 +13,7 @@ class_name
CloudFormation
codespace
codespaces
combobox
config
Config
content_type
Expand Down Expand Up @@ -106,13 +108,16 @@ subnet
template_path
toml
Towncrier
towncrier
uncheck
uniqueness_constraints
userinfo
validator
upsert
Upserting
upserting
uuid
UUID
validators
Version Control
Vitest
Expand Down
Loading
Loading