Skip to content

New Golden Config Setting Enabled Per GC Setting (replaces 847 913 936)#984

Open
jeffkala wants to merge 5 commits intodevelopfrom
gcs-aug25
Open

New Golden Config Setting Enabled Per GC Setting (replaces 847 913 936)#984
jeffkala wants to merge 5 commits intodevelopfrom
gcs-aug25

Conversation

@jeffkala
Copy link
Copy Markdown
Contributor

@jeffkala jeffkala commented Sep 2, 2025

Test Plan Executed

Backups

  • Both GCS are using the same git repos.
  1. 1 GC Setting Only Backup enabled.
    • 2 devices in scope.
  2. 2 GC settings 1 device in scope per setting
    • 2 devices backup successfully
    • disabled backup on 1 GCS but run GC backup on all devices
  3. 2 GC settings backup disabled for both
  4. 2 GC settings 1 devices in both Dynamic groups make sure higher weight GC setting for that device takes precedence.

Intended

  • Both GCS are using the same git repos.
  1. Make sure GC settings in the UI can't be saved if Intended is enabled and Sot agg query, Jinja repository and Jinja Template Path are not set.
  2. 1 GC Setting Only Intended enabled.
    • 2 devices in scope.
  3. 2 GC settings 1 device in scope per setting
    • 2 devices intended successfully
    • disabled intended on 1 GCS but run GC intended on all devices
  4. 2 GC settings intended disabled for both
  5. 2 GC settings 1 devices in both Dynamic groups make sure higher weight GC setting for that device takes precedence.

Compliance

  • Both GCS are using the same git repos.
  1. 1 GC Setting Only compliance enabled.
    • 2 devices in scope.
  2. 2 GC settings 1 device in scope per setting
    • 2 devices compliance successfully
    • disabled compliance on 1 GCS but run GC compliance on all devices
  3. 2 GC settings backup disabled for both
  4. 2 GC settings 1 devices in both Dynamic groups make sure higher weight GC setting for that device takes precedence.

All in One (Single)

All in One (Multiple)

Questions to Answer (ADRs)

  • If a device is in scope for two GC Settings and a feature is disabled on teh hightest weighted setting should it fallback to the other setting and still run? Or only use the highest weighted settings.
  • For the all in one jobs, what should happen if any of the jobs are not enabled? Run the ones that are? Don't run any of them and warn?

Extra Details

What do we need for each job related to repositories?

  • The best GoldenConfigSettings across all inscope devices. should be get_inscope_settings_from_device_qs from helpers.
  • Helps with quickly determining if a repo is needed for a job.
  • get_repo_types_for_job accompanied by inscope settings gets actual repos.
  • Device to settings map. This is a dict of device pk to the GoldenConfigSettings object.

From a device qs, we need to get the following:

  • The best GoldenConfigSettings across all inscope devices. should be get_inscope_settings_from_device_qs from helpers.
  • Device to settings map. This is a dict of device pk to the GoldenConfigSettings object.
  • Repos per inscope settings, if that specific setting is enabled based on the repos needed for the job (get_repo_types_for_job).

Other considerations for (only for compliance job, and all jobs)

  • If a setting is disabled, but a repo/repo path is set that means we need to do:
    • Still run ensure_git_repository on the repo.
    • Don't add repo to the list of repos to commit/push.

Backup job:

  • Repo types needed: backup_repository
  • Always sync repos if a device is in scope for the job that matches a GC setting.
  • If setting is enabled, and repo is set, and if a device is in scope for the job, then we need to commit/push only backup_repository.
  • We should log if a device is in the queryset, but the setting is disabled.

Intended job:

  • Repo types needed: jinja_repository, intended_repository
  • Always sync repos if a device is in scope for the job that matches a GC setting.
  • If setting is enabled, and repo is set, and if a device is in scope for the job, then we need to commit/push only intended_repository.
  • We should log if a device is in the queryset, but the setting is disabled.
    • Also if templates git repo is not set, but intended is set, and setting is enabled.

Compliance job:

  • Repo types needed: intended_repository, backup_repository
  • All job:
  • Repo types needed: backup_repository, jinja_repository, intended_repository

@jeffkala jeffkala changed the title New Golden Config Setting Enabled Per GC Setting (replaces #913 936) New Golden Config Setting Enabled Per GC Setting (replaces 847 913 936) Sep 2, 2025
@jeffkala
Copy link
Copy Markdown
Contributor Author

jeffkala commented Sep 2, 2025

Screenshot 2025-08-30 at 11 51 37 AM Screenshot 2025-08-30 at 11 34 07 AM

@jeffkala
Copy link
Copy Markdown
Contributor Author

jeffkala commented Sep 26, 2025

The ADRS have been discussed

  • If a device is in scope for two GC Settings and a feature is disabled on the highest weighted setting should it fallback to the other setting and still run? Or only use the highest weighted settings.
    • A: highest weight only, no fallback.
  • For the all in one jobs, what should happen if any of the jobs are not enabled? Run the ones that are? Don't run any of them and warn?
    • A: Run whichever are enabled.

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.

1 participant