From 091892397a553b3381fad4552dbb9e132757ab27 Mon Sep 17 00:00:00 2001 From: Hisham'sLocal Date: Thu, 12 Mar 2026 00:25:53 +0530 Subject: [PATCH 1/2] Remove legacy generated.yaml references and unused message template --- GITHUB_ISSUE_STATEMENT.md | 86 +++++++++++++++++++ .../modal-message/modal-message.component.ts | 11 +-- src/app/service/loader/data-loader.service.ts | 18 ++-- src/assets/YAML/meta.yaml | 3 +- 4 files changed, 94 insertions(+), 24 deletions(-) create mode 100644 GITHUB_ISSUE_STATEMENT.md diff --git a/GITHUB_ISSUE_STATEMENT.md b/GITHUB_ISSUE_STATEMENT.md new file mode 100644 index 00000000..e2ab1c45 --- /dev/null +++ b/GITHUB_ISSUE_STATEMENT.md @@ -0,0 +1,86 @@ +# Clean Up Legacy `generated.yaml` References + +## Issue Description +The codebase contains references to the deprecated `generated.yaml` file format that has been replaced by the newer `model.yaml` structure. While the code handles legacy format gracefully, these outdated references should be removed for code cleanliness and to avoid confusion for new contributors. + +## Current State +The application transitioned from a monolithic `generated.yaml` to a split architecture: +- `generated.yaml` (deprecated) → `model.yaml` (activities) + `team-progress.yaml` (progress) + +However, legacy references remain in the codebase. + +## References to Clean Up + +### 1. **File: `src/assets/YAML/meta.yaml` (Line 29)** +**Current:** +```yaml +activityFiles: + # - generated/generated.yaml # Old structure - No longer used + - default/model.yaml +``` + +**Action:** Remove the commented-out reference to `generated/generated.yaml` + +**Proposed Fix:** +```yaml +activityFiles: + - default/model.yaml +``` + +--- + +### 2. **File: `src/app/component/modal-message/modal-message.component.ts` (Lines 24-31)** + +**Current:** The component has a hardcoded error template specifically for the legacy `generated.yaml` file: +```typescript +if (this.dialogInfo?.title === 'generated_yaml') { + this.template = { ...this.generatedYamlTemplate }; + // ... template for downloading generated.yaml +} +``` + +**Issue:** This template references the deprecated file format and is no longer relevant. + +**Action:** Consider whether this template should be: +1. Removed entirely (preferred, since it's legacy) +2. Kept for backward compatibility with existing error handling + +**Recommended Fix:** Remove this conditional block and the associated `generatedYamlTemplate` definition. + +--- + +### 3. **File: `src/app/service/loader/data-loader.service.ts` (Lines 158, 177-178)** + +**Current:** Special handling for legacy validation errors: +```typescript +usingLegacyYamlFile ||= filename.endsWith('generated/generated.yaml'); + +// Legacy generated.yaml has several data validation problems. Do not report these +if (!usingLegacyYamlFile) { + throw new DataValidationError(...); +} +``` + +**Action:** This code can be removed once: +1. All users have migrated from `generated.yaml` to `model.yaml` +2. The legacy error template is removed +3. Only `model.yaml` is actively supported + +**Recommended Fix:** Remove the `usingLegacyYamlFile` flag and the conditional error suppression once legacy format is no longer needed. + +--- + +## Impact +- **Scope:** Minor cleanup, no functional impact +- **Risk:** Very low — only affects code clarity and maintainability +- **Breaking Changes:** None +- **Dependencies:** None + +## Testing +1. Verify the application loads correctly with `model.yaml` (the current standard) +2. Ensure no error messages reference the deprecated `generated.yaml` format +3. Confirm all existing functionality remains intact + +## Related Documentation +- Migration notes should clarify that `generated.yaml` is deprecated in favor of `model.yaml` + `team-progress.yaml` +- INSTALL.md can be updated to remove any references to manual `generated.yaml` download if not needed diff --git a/src/app/component/modal-message/modal-message.component.ts b/src/app/component/modal-message/modal-message.component.ts index ac7c35cd..bd5e3ab2 100644 --- a/src/app/component/modal-message/modal-message.component.ts +++ b/src/app/component/modal-message/modal-message.component.ts @@ -20,16 +20,7 @@ export class ModalMessageComponent implements OnInit { DSOMM_host: string = 'https://github.com/devsecopsmaturitymodel'; DSOMM_url: string = `${this.DSOMM_host}/DevSecOps-MaturityModel-data`; - meassageTemplates: Record = { - generated_yaml: new DialogInfo( - `{message}\n\n` + - `Please download the activity template \`generated.yaml\` ` + - `from [DSOMM-data](${this.DSOMM_url}) on GitHub.\n\n` + - 'The DSOMM activities are maintained and distributed ' + - 'separately from the software.', - 'DSOMM startup problems' - ), - }; + meassageTemplates: Record = {}; constructor( public dialog: MatDialog, diff --git a/src/app/service/loader/data-loader.service.ts b/src/app/service/loader/data-loader.service.ts index 79c49ddc..9dc41801 100644 --- a/src/app/service/loader/data-loader.service.ts +++ b/src/app/service/loader/data-loader.service.ts @@ -148,14 +148,12 @@ export class LoaderService { private async loadActivities(meta: MetaStore): Promise { const activityStore = new ActivityStore(); const errors: string[] = []; - let usingLegacyYamlFile = false; if (meta.activityFiles.length == 0) { throw new MissingModelError('No `activityFiles` are specified in `meta.yaml`.'); } for (let filename of meta.activityFiles) { if (this.debug) console.log(`${perfNow()}s: Loading activity file: ${filename}`); - usingLegacyYamlFile ||= filename.endsWith('generated/generated.yaml'); const response: ActivityFile = await this.loadActivityFile(filename); @@ -173,16 +171,12 @@ export class LoaderService { // Handle validation errors if (errors.length > 0) { errors.forEach(error => console.error(error)); - - // Legacy generated.yaml has several data validation problems. Do not report these - if (!usingLegacyYamlFile) { - throw new DataValidationError( - 'Data validation error after loading: ' + - filename + - '\n\n----\n\n' + - errors.join('\n\n') - ); - } + throw new DataValidationError( + 'Data validation error after loading: ' + + filename + + '\n\n----\n\n' + + errors.join('\n\n') + ); } } return activityStore; diff --git a/src/assets/YAML/meta.yaml b/src/assets/YAML/meta.yaml index f655a1d9..088862a1 100644 --- a/src/assets/YAML/meta.yaml +++ b/src/assets/YAML/meta.yaml @@ -26,8 +26,7 @@ teamGroups: $ref: 'default/teams.yaml#/teamGroups' activityFiles: - # - generated/generated.yaml # Old structure - No longer used - - default/model.yaml + - default/model.yaml # - custom/custom-activities.yaml # For customizing your own activities From 43b1cc11f2df0ac92e2913ebf289fbc08947ac76 Mon Sep 17 00:00:00 2001 From: Hisham'sLocal Date: Thu, 12 Mar 2026 00:32:18 +0530 Subject: [PATCH 2/2] Removeing unnessary change --- GITHUB_ISSUE_STATEMENT.md | 86 --------------------------------------- 1 file changed, 86 deletions(-) delete mode 100644 GITHUB_ISSUE_STATEMENT.md diff --git a/GITHUB_ISSUE_STATEMENT.md b/GITHUB_ISSUE_STATEMENT.md deleted file mode 100644 index e2ab1c45..00000000 --- a/GITHUB_ISSUE_STATEMENT.md +++ /dev/null @@ -1,86 +0,0 @@ -# Clean Up Legacy `generated.yaml` References - -## Issue Description -The codebase contains references to the deprecated `generated.yaml` file format that has been replaced by the newer `model.yaml` structure. While the code handles legacy format gracefully, these outdated references should be removed for code cleanliness and to avoid confusion for new contributors. - -## Current State -The application transitioned from a monolithic `generated.yaml` to a split architecture: -- `generated.yaml` (deprecated) → `model.yaml` (activities) + `team-progress.yaml` (progress) - -However, legacy references remain in the codebase. - -## References to Clean Up - -### 1. **File: `src/assets/YAML/meta.yaml` (Line 29)** -**Current:** -```yaml -activityFiles: - # - generated/generated.yaml # Old structure - No longer used - - default/model.yaml -``` - -**Action:** Remove the commented-out reference to `generated/generated.yaml` - -**Proposed Fix:** -```yaml -activityFiles: - - default/model.yaml -``` - ---- - -### 2. **File: `src/app/component/modal-message/modal-message.component.ts` (Lines 24-31)** - -**Current:** The component has a hardcoded error template specifically for the legacy `generated.yaml` file: -```typescript -if (this.dialogInfo?.title === 'generated_yaml') { - this.template = { ...this.generatedYamlTemplate }; - // ... template for downloading generated.yaml -} -``` - -**Issue:** This template references the deprecated file format and is no longer relevant. - -**Action:** Consider whether this template should be: -1. Removed entirely (preferred, since it's legacy) -2. Kept for backward compatibility with existing error handling - -**Recommended Fix:** Remove this conditional block and the associated `generatedYamlTemplate` definition. - ---- - -### 3. **File: `src/app/service/loader/data-loader.service.ts` (Lines 158, 177-178)** - -**Current:** Special handling for legacy validation errors: -```typescript -usingLegacyYamlFile ||= filename.endsWith('generated/generated.yaml'); - -// Legacy generated.yaml has several data validation problems. Do not report these -if (!usingLegacyYamlFile) { - throw new DataValidationError(...); -} -``` - -**Action:** This code can be removed once: -1. All users have migrated from `generated.yaml` to `model.yaml` -2. The legacy error template is removed -3. Only `model.yaml` is actively supported - -**Recommended Fix:** Remove the `usingLegacyYamlFile` flag and the conditional error suppression once legacy format is no longer needed. - ---- - -## Impact -- **Scope:** Minor cleanup, no functional impact -- **Risk:** Very low — only affects code clarity and maintainability -- **Breaking Changes:** None -- **Dependencies:** None - -## Testing -1. Verify the application loads correctly with `model.yaml` (the current standard) -2. Ensure no error messages reference the deprecated `generated.yaml` format -3. Confirm all existing functionality remains intact - -## Related Documentation -- Migration notes should clarify that `generated.yaml` is deprecated in favor of `model.yaml` + `team-progress.yaml` -- INSTALL.md can be updated to remove any references to manual `generated.yaml` download if not needed