From 7e6f31826969a5f280353781cac27bfaa16f62a1 Mon Sep 17 00:00:00 2001 From: Brett Lykins Date: Thu, 9 Jan 2025 11:18:13 -0500 Subject: [PATCH] release v1.1.2 (#5405) * prepare v1.1.2 --- CHANGELOG.md | 22 ++++ .../+incremental-diff-performance.fixed.md | 1 - changelog/+task-deprecated.changed.md | 1 - changelog/+tasknode.added.md | 1 - changelog/+uniqueness-nulls.fixed.md | 4 - changelog/5242.fixed.md | 1 - changelog/5306.added.md | 1 - changelog/5350.added.md | 1 - changelog/5385.fixed.md | 1 - changelog/add.5376.md | 1 - docker-compose.yml | 4 +- .../release-notes/infrahub/release-1_1_2.mdx | 108 ++++++++++++++++++ docs/sidebars.ts | 1 + helm/Chart.yaml | 4 +- pyproject.toml | 2 +- python_testcontainers/pyproject.toml | 10 +- 16 files changed, 139 insertions(+), 24 deletions(-) delete mode 100644 changelog/+incremental-diff-performance.fixed.md delete mode 100644 changelog/+task-deprecated.changed.md delete mode 100644 changelog/+tasknode.added.md delete mode 100644 changelog/+uniqueness-nulls.fixed.md delete mode 100644 changelog/5242.fixed.md delete mode 100644 changelog/5306.added.md delete mode 100644 changelog/5350.added.md delete mode 100644 changelog/5385.fixed.md delete mode 100644 changelog/add.5376.md create mode 100644 docs/docs/release-notes/infrahub/release-1_1_2.mdx diff --git a/CHANGELOG.md b/CHANGELOG.md index 07feb5a56e..c8c4af0071 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,28 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/) and the chang +## [Infrahub - v1.1.2](https://github.com/opsmill/infrahub/tree/infrahub-v1.1.2) - 2025-01-09 + +### Added + +- Added a configuration option for INFRAHUB_PUBLIC_URL, which could be required for SSO depending on how Infrahub is published and accessed within your organization. ([#5306](https://github.com/opsmill/infrahub/issues/5306)) +- Add `PermissionManager` that takes care of validating permissions when executing a GraphQL query or a requesting a REST endpoint by fetching permissions from backends only once per query. ([#5350](https://github.com/opsmill/infrahub/issues/5350)) +- The query InfrahubTask in GraphQL, introduced a new `related_nodes` field to retrieve multiple related nodes per task. + +### Changed + +- The fields `related_node` and `related_node_kind` on the GraphQL query `InfrahubTask` have been deprecated, please use `related_nodes` instead. + +### Fixed + +- Fix schema dropdown option removal in branches other than the default one ([#5242](https://github.com/opsmill/infrahub/issues/5242)) +- Fix an issue that would prevent creating a node on a branch with a computed attribute that referenced another node on that branch ([#5385](https://github.com/opsmill/infrahub/issues/5385)) +- Update how we calculate an incremental diff to skip potentially expensive operations if at all possible +- Update uniqueness checks/constraints logic to consider NULL values instead of ignoring. + This might cause data integrity issues if you have nodes with NULL values for attributes that are part of their + the uniqueness constraints of their schema. This change includes a database migration that validates data integrity + using the new uniqueness check/constraint logic and will fail if any uniqueness issues exist. + ## [Infrahub - v1.1.1](https://github.com/opsmill/infrahub/tree/infrahub-v1.1.1) - 2025-01-05 ### Fixed diff --git a/changelog/+incremental-diff-performance.fixed.md b/changelog/+incremental-diff-performance.fixed.md deleted file mode 100644 index 005a73a2a5..0000000000 --- a/changelog/+incremental-diff-performance.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Update how we calculate an incremental diff to skip potentially expensive operations if at all possible \ No newline at end of file diff --git a/changelog/+task-deprecated.changed.md b/changelog/+task-deprecated.changed.md deleted file mode 100644 index 24ff554d3d..0000000000 --- a/changelog/+task-deprecated.changed.md +++ /dev/null @@ -1 +0,0 @@ -The fields `related_node` and `related_node_kind` on the GraphQL query `InfrahubTask` have been deprecated, please use `related_nodes` instead. \ No newline at end of file diff --git a/changelog/+tasknode.added.md b/changelog/+tasknode.added.md deleted file mode 100644 index d66ab52cb6..0000000000 --- a/changelog/+tasknode.added.md +++ /dev/null @@ -1 +0,0 @@ -The query InfrahubTask in GraphQL, introduced a new `related_nodes` field to retrieve multiple related nodes per task. \ No newline at end of file diff --git a/changelog/+uniqueness-nulls.fixed.md b/changelog/+uniqueness-nulls.fixed.md deleted file mode 100644 index 66d38667c9..0000000000 --- a/changelog/+uniqueness-nulls.fixed.md +++ /dev/null @@ -1,4 +0,0 @@ -Update uniqueness checks/constraints logic to consider NULL values instead of ignoring. -This might cause data integrity issues if you have nodes with NULL values for attributes that are part of their -the uniqueness constraints of their schema. This change includes a database migration that validates data integrity -using the new uniqueness check/constraint logic and will fail if any uniqueness issues exist. \ No newline at end of file diff --git a/changelog/5242.fixed.md b/changelog/5242.fixed.md deleted file mode 100644 index 38c9de2358..0000000000 --- a/changelog/5242.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Fix schema dropdown option removal in branches other than the default one \ No newline at end of file diff --git a/changelog/5306.added.md b/changelog/5306.added.md deleted file mode 100644 index 334f9d51f4..0000000000 --- a/changelog/5306.added.md +++ /dev/null @@ -1 +0,0 @@ -Added a configuration option for INFRAHUB_PUBLIC_URL, which could be required for SSO depending on how Infrahub is published and accessed within your organization. diff --git a/changelog/5350.added.md b/changelog/5350.added.md deleted file mode 100644 index 5215732867..0000000000 --- a/changelog/5350.added.md +++ /dev/null @@ -1 +0,0 @@ -Add `PermissionManager` that takes care of validating permissions when executing a GraphQL query or a requesting a REST endpoint by fetching permissions from backends only once per query. \ No newline at end of file diff --git a/changelog/5385.fixed.md b/changelog/5385.fixed.md deleted file mode 100644 index b337977282..0000000000 --- a/changelog/5385.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Fix an issue that would prevent creating a node on a branch with a computed attribute that referenced another node on that branch \ No newline at end of file diff --git a/changelog/add.5376.md b/changelog/add.5376.md deleted file mode 100644 index 8be80da7c7..0000000000 --- a/changelog/add.5376.md +++ /dev/null @@ -1 +0,0 @@ -Add `order` parameter to GraphQL queries so nodes ordering can be disabled to improve performances diff --git a/docker-compose.yml b/docker-compose.yml index 20cc92ca00..0689d9e2ef 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -206,7 +206,7 @@ services: retries: 5 infrahub-server: - image: "${INFRAHUB_DOCKER_IMAGE:-registry.opsmill.io/opsmill/infrahub}:${VERSION:-1.1.1}" + image: "${INFRAHUB_DOCKER_IMAGE:-registry.opsmill.io/opsmill/infrahub}:${VERSION:-1.1.2}" restart: unless-stopped command: > gunicorn --config backend/infrahub/serve/gunicorn_config.py @@ -252,7 +252,7 @@ services: deploy: mode: replicated replicas: 2 - image: "${INFRAHUB_DOCKER_IMAGE:-registry.opsmill.io/opsmill/infrahub}:${VERSION:-1.1.1}" + image: "${INFRAHUB_DOCKER_IMAGE:-registry.opsmill.io/opsmill/infrahub}:${VERSION:-1.1.2}" command: prefect worker start --type infrahubasync --pool infrahub-worker --with-healthcheck restart: unless-stopped depends_on: diff --git a/docs/docs/release-notes/infrahub/release-1_1_2.mdx b/docs/docs/release-notes/infrahub/release-1_1_2.mdx new file mode 100644 index 0000000000..1928ad8363 --- /dev/null +++ b/docs/docs/release-notes/infrahub/release-1_1_2.mdx @@ -0,0 +1,108 @@ +--- +title: Release 1.1.2 +--- + + + + + + + + + + + + + + + + + + + +
Release Number1.1.2
Release DateJanuary 9th, 2025
Release CodenameLyon, Patch #2
Tag[infrahub-v1.1.2](https://github.com/opsmill/infrahub/releases/tag/infrahub-v1.1.2)
+ +# Release 1.1.2 + +This release is a bug-fix release to resolve issues found in Infrahub v1.1.1 and prior. + +## Main changes + +The complete list of changes can always be found in the `CHANGELOG.md` file in the Infrahub Git repository. + +### Null values in uniqueness constraints + +Previous to v1.1.2, NULL values were incorrectly ignored in uniqueness constraints; +as of this release, NULL values will be treated properly by the uniqueness logic. + +Because the previous logic could have resulted in unintended behavior, upgrading v1.1.2 will perform a database migration for data integrity purposes. + +### Added + +- Added a configuration option for INFRAHUB_PUBLIC_URL, which could be required for SSO depending on how Infrahub is published and accessed within your organization. ([#5306](https://github.com/opsmill/infrahub/issues/5306)) +- Add `PermissionManager` that takes care of validating permissions when executing a GraphQL query or a requesting a REST endpoint by fetching permissions from backends only once per query. ([#5350](https://github.com/opsmill/infrahub/issues/5350)) +- The query InfrahubTask in GraphQL, introduced a new `related_nodes` field to retrieve multiple related nodes per task. + +### Changed + +- The fields `related_node` and `related_node_kind` on the GraphQL query `InfrahubTask` have been deprecated, please use `related_nodes` instead. + +### Fixed + +- Fix schema dropdown option removal in branches other than the default one ([#5242](https://github.com/opsmill/infrahub/issues/5242)) +- Fix an issue that would prevent creating a node on a branch with a computed attribute that referenced another node on that branch ([#5385](https://github.com/opsmill/infrahub/issues/5385)) +- Update how we calculate an incremental diff to skip potentially expensive operations if at all possible +- Update uniqueness checks/constraints logic to consider NULL values instead of ignoring. + This might cause data integrity issues if you have nodes with NULL values for attributes that are part of their + the uniqueness constraints of their schema. This change includes a database migration that validates data integrity + using the new uniqueness check/constraint logic and will fail if any uniqueness issues exist. + +## Migration guide + +The process to migrate your instance of Infrahub to the latest version may vary depending on your deployment of Infrahub. +However, at a high-level, it will involve getting the latest version of the Infrahub code, and then performing any needed Database Migrations and Schema updates. + +Please ensure you have a **backup of your Infrahub environment** prior to attempting any migration or upgrade activities. + +### Migration of an Infrahub instance + +**First**, update the Infrahub version running in your environment. + +Below are some example ways to get the latest version of Infrahub in your environment. + +- For deployments via Docker Compose, update your container version by updating the `VERSION` environment variable and relaunch: + - `export VERSION="1.1.2"; docker compose pull && docker compose up -d` +- For deployments via Kubernetes, utilize the latest version of the Helm chart supplied with this release + +**Second**, once you have gotten the desired version of Infrahub in your environment, please run the following commands. + +> Note: If you are running Infrahub in Docker/K8s, these commands need to run from a container where Infrahub is installed. + +```shell +infrahub db migrate +infrahub db update-core-schema +``` + +**Finally**, restart all instances of Infrahub. + +### Migration of a dev or demo instance + +If you are using the `dev` or `demo` environments, we have provided `invoke` commands to aid in the migration to the latest version. +The below examples provide the `demo` version of the commands, however similar commands can be used for `dev` as well. + +```shell +invoke demo.stop +invoke demo.build +invoke demo.migrate +invoke demo.start +``` + +If you don't want to keep your data, you can start a clean instance with the following command. + +> **Warning: All data will be lost, please make sure to backup everything you need before running this command.** + +```shell +invoke demo.destroy demo.build demo.start demo.load-infra-schema demo.load-infra-data +``` + +The repository https://github.com/opsmill/infrahub-demo-edge has also been updated, it's recommended to pull the latest changes into your fork. \ No newline at end of file diff --git a/docs/sidebars.ts b/docs/sidebars.ts index 519306a015..d32891ee57 100644 --- a/docs/sidebars.ts +++ b/docs/sidebars.ts @@ -315,6 +315,7 @@ const sidebars: SidebarsConfig = { slug: 'release-notes/infrahub', }, items: [ + 'release-notes/infrahub/release-1_1_2', 'release-notes/infrahub/release-1_1_1', 'release-notes/infrahub/release-1_1_0', 'release-notes/infrahub/release-1_0_10', diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 9c3d292c29..1944a05b44 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -15,12 +15,12 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 4.1.1 +version: 4.1.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "1.1.1" +appVersion: "1.1.2" dependencies: - name: neo4j diff --git a/pyproject.toml b/pyproject.toml index 695c206dd6..2d178d1f14 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "infrahub-server" -version = "1.1.1" +version = "1.1.2" description = "Infrahub is taking a new approach to Infrastructure Management by providing a new generation of datastore to organize and control all the data that defines how an infrastructure should run." authors = ["OpsMill "] readme = "README.md" diff --git a/python_testcontainers/pyproject.toml b/python_testcontainers/pyproject.toml index 42389b6f1a..5730310a13 100644 --- a/python_testcontainers/pyproject.toml +++ b/python_testcontainers/pyproject.toml @@ -1,11 +1,11 @@ [project] name = "infrahub-testcontainers" -version = "1.1.1" +version = "1.1.2" requires-python = ">=3.9" [tool.poetry] name = "infrahub-testcontainers" -version = "1.1.0" +version = "1.1.2" description = "Testcontainers instance for Infrahub to easily build integration tests" authors = ["OpsMill "] readme = "README.md" @@ -23,13 +23,9 @@ classifiers = [ "Programming Language :: Python :: 3.13", ] -include = [ - "infrahub_testcontainers/docker-compose.test.yml" -] +include = ["infrahub_testcontainers/docker-compose.test.yml"] [tool.poetry.dependencies] python = "^3.9" testcontainers = "~4.8" pytest = "*" - -