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

Make the Git commit message configurable #815

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

nkallergis
Copy link
Contributor

  • Adds a commit_message field on the Backup, Intended, and Execute All Golden Configuration Jobs variants that allows the operator to define the Git commit message to be used.
    image

.

  • In alignment with the behavior of the core Nautobot ensure_git_repository function, the GC gc_repo_push function has been modified to log the Git repository HEAD hash after commits.
    image

Closes #814.

@itdependsnetworks
Copy link
Contributor

Not against this approach, would think we would do this with constance config that supports jinja syntax. What do you think @jeffkala

@nkallergis
Copy link
Contributor Author

I have the "constance config" approach semi-working in a Git stash, if we eventually decide to go there. The use case that I'm working on though (ITSM pre/post integration) requires the form field anyways and having both seemed a bit over-engineered. Certainly up to discuss this.

@jeffkala
Copy link
Contributor

jeffkala commented Oct 9, 2024

The general configuration sprawl is what I'm concerned about.

We have:

  1. plugin_config
  2. plugin_config w/ merge overrides to constances values
  3. Golden config settings (UI)
  4. Remediation settings (UI)
    etc.

Adding what I consider as a "configuration switch" to the job input form seems like yet another options. I'm fine with constance, I'd also consider having it in golden config settings in a field similar to the j2 supported path to backup/intended files

@nkallergis
Copy link
Contributor Author

I understand your point of view even though I personally see this more like a job execution thing, not unsimilar to selecting devices. The scenario I have in mind is a Backup prior to changing say DNS for a thousand devices. In this case, a commit message like "Change Request 1234 - before DNS change" would make way more sense than "BACKUP 2024-10-10", at least in my head. Let me know what you think!

@jeffkala
Copy link
Contributor

Looks like the ask @nkallergis is truly a custom / on-demand commit message. If that is the case I think using Constance or GC settings isn't going to accomplish what is asked. With that being the case I'd vote for the job input as long as it continues to have a default and its not required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the Git commit message configurable
3 participants