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

Enhance FreezingArchRule #252

Merged
merged 3 commits into from
Oct 24, 2019
Merged

Enhance FreezingArchRule #252

merged 3 commits into from
Oct 24, 2019

Conversation

codecholeric
Copy link
Collaborator

As mentioned in #211, FreezingArchRule needs some more configuration options to prevent misuse. Furthermore there are different scenarios how FreezingArchRule is used. In some scenarios, developers are required to update the violation store and check the current state into the repository. In some scenarios the CI job is more sophisticated and clones, updates and pushes a violation store automatically. In any case, within a CI environment it will normally not be necessary to ever create a new violation store, but on the contrary, this will easily be a sign of misconfiguration (the violation store being mounted / checked out to a different folder than configured for FreezingArchRule).

This PR will make it configurable, if FreezingArchRule may create a new default store, or if updates to the store are allowed in the specific environment.
Note that the default for allowing to create a violation store is now false, i.e. without further configuration running a FreezingArchRule without any existing violation store will cause an exception and explicitly demand to configure allowStoreCreation=true.

To make it easier to configure these capabilities per environment (e.g. one job or a developer might be allowed to update the violation store, another job may not), ArchUnit configuration may now be overwritten by system properties. This will in particular make it easier to configure the violation store folder based on the specific environment.

Resolves: #211

@codecholeric codecholeric requested a review from hankem October 20, 2019 15:29
@ghost
Copy link

ghost commented Oct 20, 2019

DeepCode Report (#e946a3)

DeepCode analyzed this pull request.
There are no new issues.

Copy link
Member

@hankem hankem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks! I could only come up with a few suggestions, mostly to the tests.

Copy link
Member

@hankem hankem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added my suggestions to branch PR#252 of my fork. Feel free to merge them, if you like. 😉

docs/userguide/008_The_Library_API.adoc Outdated Show resolved Hide resolved
@codecholeric codecholeric force-pushed the enhance-freezing-archrule branch from 8b8a3a5 to f8cc111 Compare October 24, 2019 17:10
… by passing the key prefixed with "archunit." as system property "-Darchunit.key.in.props=overwritten"

Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
… and update

Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
…d the possibility to override ArchUnit configuration by system properties.

Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
@codecholeric codecholeric force-pushed the enhance-freezing-archrule branch from f8cc111 to e946a3f Compare October 24, 2019 17:15
@codecholeric
Copy link
Collaborator Author

Kewl, thank you so much for your support 😃 Do you wanna quickly go over your points and check out, that I've covered everything?

@hankem
Copy link
Member

hankem commented Oct 24, 2019

I'll be curious to have a look, but you don't have to wait for me if you're already in the flow of merging. All of my comments were anyways all just cosmetics.

@codecholeric
Copy link
Collaborator Author

Sure, I'll merge it then 😉 Due to my busy schedule over the last months, I really have some reviewing and merging to do now 😓

@codecholeric codecholeric merged commit 989918f into master Oct 24, 2019
@codecholeric codecholeric deleted the enhance-freezing-archrule branch October 24, 2019 17:49
codecholeric added a commit that referenced this pull request Feb 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance Freezing for CI executions
2 participants