summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Finucane <stephenfin@redhat.com>2023-03-22 17:12:32 +0000
committerStephen Finucane <stephenfin@redhat.com>2023-03-22 17:16:30 +0000
commit25f1cc2e255ce9a27b806fbf611feaaa5de43992 (patch)
tree627cc5e04868e9ab66d48adce112de75c88823b8
parentd07d22e26b50e648520b1384d88313a13d41dffe (diff)
downloadheat-25f1cc2e255ce9a27b806fbf611feaaa5de43992.tar.gz
Integrate pre-commit
Makes my life easier wrt testing. Signed-off-by: Stephen Finucane <stephenfin@redhat.com> Change-Id: I5a79494eb81622be5e56686a1995eb2f0bddb085
-rw-r--r--.pre-commit-config.yaml29
-rw-r--r--api-ref/source/v1/events.inc2
-rw-r--r--api-ref/source/v1/services.inc2
-rw-r--r--heat/db/sqlalchemy/migrate_repo/migrate.cfg14
-rwxr-xr-xheat_upgradetests/post_test_hook.sh1
-rwxr-xr-xheat_upgradetests/pre_test_hook.sh1
-rw-r--r--releasenotes/notes/support-rbac-824a2d02c8746d3d.yaml2
7 files changed, 41 insertions, 10 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 000000000..0ae225c54
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,29 @@
+---
+default_language_version:
+ # force all unspecified python hooks to run python3
+ python: python3
+repos:
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v4.4.0
+ hooks:
+ - id: trailing-whitespace
+ - id: mixed-line-ending
+ args: ['--fix', 'lf']
+ exclude: '.*\.(svg)$'
+ - id: check-byte-order-marker
+ - id: check-executables-have-shebangs
+ - id: check-merge-conflict
+ - id: debug-statements
+ - id: check-yaml
+ files: .*\.(yaml|yml)$
+ exclude: 'rally-scenarios/heat-fakevirt.yaml'
+ - repo: local
+ hooks:
+ - id: flake8
+ name: flake8
+ additional_dependencies:
+ - hacking>=3.1.0,<3.2.0
+ language: python
+ entry: flake8
+ files: '^.*\.py$'
+ exclude: '^(doc|releasenotes|tools)/.*$'
diff --git a/api-ref/source/v1/events.inc b/api-ref/source/v1/events.inc
index a0f72ece2..ef3c08da2 100644
--- a/api-ref/source/v1/events.inc
+++ b/api-ref/source/v1/events.inc
@@ -169,7 +169,7 @@ Shows details for an event.
.. rest_status_code:: success status.yaml
- - 200
+ - 200
.. rest_status_code:: error status.yaml
diff --git a/api-ref/source/v1/services.inc b/api-ref/source/v1/services.inc
index 67b344cd5..3ce6b94ab 100644
--- a/api-ref/source/v1/services.inc
+++ b/api-ref/source/v1/services.inc
@@ -11,7 +11,7 @@ Show orchestration engine status
Enables administrative users to view details for all orchestration engines.
-Orchestration engine details include engine id, binary, topic name, host,
+Orchestration engine details include engine id, binary, topic name, host,
report interval, last updated time, health status, and host name.
Response Codes
diff --git a/heat/db/sqlalchemy/migrate_repo/migrate.cfg b/heat/db/sqlalchemy/migrate_repo/migrate.cfg
index 134fc065d..3a6ff0abd 100644
--- a/heat/db/sqlalchemy/migrate_repo/migrate.cfg
+++ b/heat/db/sqlalchemy/migrate_repo/migrate.cfg
@@ -5,16 +5,16 @@ repository_id=heat
# The name of the database table used to track the schema version.
# This name shouldn't already be used by your project.
-# If this is changed once a database is under version control, you'll need to
-# change the table name in each database too.
+# If this is changed once a database is under version control, you'll need to
+# change the table name in each database too.
version_table=migrate_version
-# When committing a change script, Migrate will attempt to generate the
+# When committing a change script, Migrate will attempt to generate the
# sql for all supported databases; normally, if one of them fails - probably
-# because you don't have that database installed - it is ignored and the
-# commit continues, perhaps ending successfully.
-# Databases in this list MUST compile successfully during a commit, or the
-# entire commit will fail. List the databases your application will actually
+# because you don't have that database installed - it is ignored and the
+# commit continues, perhaps ending successfully.
+# Databases in this list MUST compile successfully during a commit, or the
+# entire commit will fail. List the databases your application will actually
# be using to ensure your updates to that database work properly.
# This must be a list; example: ['postgres','sqlite']
required_dbs=[]
diff --git a/heat_upgradetests/post_test_hook.sh b/heat_upgradetests/post_test_hook.sh
index e69de29bb..a9bf588e2 100755
--- a/heat_upgradetests/post_test_hook.sh
+++ b/heat_upgradetests/post_test_hook.sh
@@ -0,0 +1 @@
+#!/bin/bash
diff --git a/heat_upgradetests/pre_test_hook.sh b/heat_upgradetests/pre_test_hook.sh
index e69de29bb..a9bf588e2 100755
--- a/heat_upgradetests/pre_test_hook.sh
+++ b/heat_upgradetests/pre_test_hook.sh
@@ -0,0 +1 @@
+#!/bin/bash
diff --git a/releasenotes/notes/support-rbac-824a2d02c8746d3d.yaml b/releasenotes/notes/support-rbac-824a2d02c8746d3d.yaml
index faaa3283c..9b6809680 100644
--- a/releasenotes/notes/support-rbac-824a2d02c8746d3d.yaml
+++ b/releasenotes/notes/support-rbac-824a2d02c8746d3d.yaml
@@ -5,7 +5,7 @@ features:
for default roles and system scope. This is part of a broader community
effort to support read-only roles and implement secure, consistent default
policies.
-
+
Refer to `the Keystone documentation`__ for more information on the reason
for these changes.