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

feature: Add user defined repository checks #1049

Closed
ogenstad opened this issue Sep 11, 2023 · 1 comment
Closed

feature: Add user defined repository checks #1049

ogenstad opened this issue Sep 11, 2023 · 1 comment
Assignees
Labels
group/backend Issue related to the backend (API Server, Git Agent) state/ref This issue is referenced in our internal tooling type/feature New feature or request

Comments

@ogenstad
Copy link
Contributor

Component

API Server / GraphQL, Git Integration

Describe the Feature Request

Currently, we support repository checks tied to a proposed change in the form of looking for merge conflicts. It should be possible to define checks within a git repository to run custom checks. It could be for linting checks or code etc.

Describe the Use Case

No response

Additional Information

No response

@ogenstad ogenstad added type/feature New feature or request group/backend Issue related to the backend (API Server, Git Agent) labels Sep 11, 2023
@ogenstad ogenstad added this to the Alpha #2 milestone Sep 11, 2023
@ogenstad ogenstad self-assigned this Sep 18, 2023
@dgarros dgarros modified the milestones: Alpha #2, Alpha #3 Oct 11, 2023
@BeArchiTek BeArchiTek added the state/ref This issue is referenced in our internal tooling label Nov 14, 2023
ogenstad added a commit that referenced this issue Nov 20, 2023
Add parameters and targets. If targets is empty this will be a global
check, otherwise it will target a specific group.

Also introduces InfrahubCheckInitializer, this is to provide information
to the check that user created code could act upon. For now it contains
information about which proposed change (if any) triggered the check to
run. The reason for this is to support that use case with checking
something within an external system such as ServiceNow to see if a given
proposed change has been approved. We don't yet inject the proposed
change into the check that will come in a follow up PR.

Related to #1049, will move out User checks from the
RepositoryValidators as a next step and also add the ability to target
groups of devices for these checks.
ogenstad added a commit that referenced this issue Nov 20, 2023
Add parameters and targets. If targets is empty this will be a global
check, otherwise it will target a specific group.

Also introduces InfrahubCheckInitializer, this is to provide information
to the check that user created code could act upon. For now it contains
information about which proposed change (if any) triggered the check to
run. The reason for this is to support that use case with checking
something within an external system such as ServiceNow to see if a given
proposed change has been approved. We don't yet inject the proposed
change into the check that will come in a follow up PR.

Related to #1049, will move out User checks from the
RepositoryValidators as a next step and also add the ability to target
groups of devices for these checks.
ogenstad added a commit that referenced this issue Nov 20, 2023
Add parameters and targets. If targets is empty this will be a global
check, otherwise it will target a specific group.

Also introduces InfrahubCheckInitializer, this is to provide information
to the check that user created code could act upon. For now it contains
information about which proposed change (if any) triggered the check to
run. The reason for this is to support that use case with checking
something within an external system such as ServiceNow to see if a given
proposed change has been approved. We don't yet inject the proposed
change into the check that will come in a follow up PR.

Related to #1049, will move out User checks from the
RepositoryValidators as a next step and also add the ability to target
groups of devices for these checks.
ogenstad added a commit that referenced this issue Nov 20, 2023
Add parameters and targets. If targets is empty this will be a global
check, otherwise it will target a specific group.

Also introduces InfrahubCheckInitializer, this is to provide information
to the check that user created code could act upon. For now it contains
information about which proposed change (if any) triggered the check to
run. The reason for this is to support that use case with checking
something within an external system such as ServiceNow to see if a given
proposed change has been approved. We don't yet inject the proposed
change into the check that will come in a follow up PR.

Related to #1049, will move out User checks from the
RepositoryValidators as a next step and also add the ability to target
groups of devices for these checks.
ogenstad added a commit that referenced this issue Dec 1, 2023
The ability to run checks with infrahubctl has been broken for some
time. This PR repairs the functionality and also simplifies some of the
nested code. Also moves out the functions to load the .infrahub.yml file
from the repository into a separate file so that this functionality
isn't split between utils.py and cli.py.

This is in preparation for #1049.
ogenstad added a commit that referenced this issue Dec 1, 2023
The ability to run checks with infrahubctl has been broken for some
time. This PR repairs the functionality and also simplifies some of the
nested code. Also moves out the functions to load the .infrahub.yml file
from the repository into a separate file so that this functionality
isn't split between utils.py and cli.py.

This is in preparation for #1049.
ogenstad added a commit that referenced this issue Dec 19, 2023
If a check definition in a .infrahub.yml defines a target group and
input parameters we will now run a targeted check on each group member
instead of running a "global" check for everything.

Fixes #1049
ogenstad added a commit that referenced this issue Dec 19, 2023
If a check definition in a .infrahub.yml defines a target group and
input parameters we will now run a targeted check on each group member
instead of running a "global" check for everything.

Fixes #1049
ogenstad added a commit that referenced this issue Dec 19, 2023
If a check definition in a .infrahub.yml defines a target group and
input parameters we will now run a targeted check on each group member
instead of running a "global" check for everything.

Fixes #1049
ogenstad added a commit that referenced this issue Dec 19, 2023
If a check definition in a .infrahub.yml defines a target group and
input parameters we will now run a targeted check on each group member
instead of running a "global" check for everything.

Fixes #1049
@ogenstad
Copy link
Contributor Author

Fixed in #1663.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group/backend Issue related to the backend (API Server, Git Agent) state/ref This issue is referenced in our internal tooling type/feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants