fix(gitops): AppConfig (MAF) not deprovisioned when maf block is removed or instance is deprovisioned [MASCORE-17756] - #2572
Open
Hardik-Prajapati-10 wants to merge 1 commit into
Open
fix(gitops): AppConfig (MAF) not deprovisioned when maf block is removed or instance is deprovisioned [MASCORE-17756]#2572Hardik-Prajapati-10 wants to merge 1 commit into
Hardik-Prajapati-10 wants to merge 1 commit into
Conversation
…e is deprovisioned - Add runAfter: gitops-suite-config to gitops-deprovision-maf-app-config in gitops-mas-instance pipeline to prevent race condition where gitops-suite was overwriting the AppConfig file deletion in the same git window - Change application_configuration param default from 'true' to '' so that removing the maf block from mas-instance-params.yaml does not cause gitops-suite to silently re-provision AppConfig - Add maf_enabled param and gitops-deprovision-maf-app-config task to gitops-deprovision-mas-instance pipeline so AppConfig is cleaned up during full instance deprovision when maf.enabled=true
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
https://jira.swg-devops.com/browse/MASCORE-17756
Description
AppConfig (MAF) deprovision was silently skipped in two scenarios:
Scenario 1 — Removing the
mafblock frommas-instance-params.yamlWhen the
maf/application_configurationblock is removed frommas-instance-params.yaml, the launcher classifies this as a positive instance-level change and triggers thegitops-mas-instancepipeline. Thegitops-deprovision-maf-app-configtask exists in this pipeline but had two problems:runAfterwas set, sogitops-deprovision-maf-app-configstarted at T=0 in parallel withgitops-suiteandgitops-suite-config. Becauseapplication_configurationhad a hardcoded default of"true",gitops-suitewould re-provision AppConfig and overwrite the deletion made by the deprovision task in the same git commit window.application_configurationparam defaulted to"true", meaninggitops-suitealways treated AppConfig as enabled even after themafblock was removed from params.Fixes:
runAfter: - gitops-suite-configtogitops-deprovision-maf-app-configso it only runs after the full provisioning path has completed, eliminating the race.application_configurationdefault from"true"to""so that removing the key from params correctly propagates as absent instead of silently defaulting to enabled.Scenario 2 — Full instance deprovision
When
mas-instance-params.yamlis deleted entirely (full instance deprovision), thegitops-deprovision-mas-instancepipeline is triggered. This pipeline had nogitops-deprovision-maf-app-configtask and nomaf_enabledparam — so AppConfig was never cleaned up regardless of whether MAF was enabled.Fixes:
maf_enabledparam (default"") togitops-deprovision-mas-instancepipeline.gitops-deprovision-maf-app-configtask referencinggitops-delete-app-config, withrunAfter: gitops-deprovision-suite-workspaceandwhen: maf_enabled in ["true"]so it only fires when MAF was actually provisioned.maf_enabledto themas-instance-deprovision-listenerTriggerTemplate, TriggerBinding ($(event.merged_params.maf.enabled)), and PipelineRun params so the value flows through from the event payload.Test Results
Tested by reverting the
mafblock frommas-instance-params.yamlinfyre-noble8-dev/us-east-2/noble8/inst01and verifying:gitops-mas-instancepipeline runs withgitops-deprovision-maf-app-configexecuting aftergitops-suite-configcompletes (no race).gitops-suite.Full instance deprovision with
maf.enabled: trueshould be verified against a cluster with MAF provisioned.Related Pull Requests