Updated the workflow for maintainability added Readme as well#18
Updated the workflow for maintainability added Readme as well#18theharithsa merged 7 commits intodynatrace-oss:mainfrom
Conversation
Mostly split out the different section and also included latest OS version to include the support cycle of the major version.
There was a problem hiding this comment.
Pull request overview
Adds a Dynatrace Automation workflow (“Software Obsolescence Management” v1.5.0) plus documentation to refresh OS/technology/library lifecycle metadata and raise proactive OS EOL alerts (including cycle-based fields and support overrides).
Changes:
- Introduces a new multi-task workflow YAML with config, parallel refresh workers, and OS alerting.
- Adds cycle-aware OS metadata fields (e.g., in-cycle latest version / cycle publish date) and support override handling.
- Adds a README documenting architecture, configuration, and data sources.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| Software Obsolescence Management/Software Obsolescence Management workflow 1.5.0.yaml | Implements the workflow tasks for config, OS/tech/library refresh and OS EOL alerting. |
| Software Obsolescence Management/README.md | Documents workflow architecture, configuration, and how OS/tech/library refresh and alerting work. |
Comments suppressed due to low confidence (5)
Software Obsolescence Management/Software Obsolescence Management workflow 1.5.0.yaml:1
raiseProactiveAlertsisasyncbut is invoked withoutawait. In workflow runtimes this can cause the task to finish early (before alerts are raised) and can prevent errors from propagating/failing the task correctly. Make the callawait raiseProactiveAlerts(...).
metadata:
Software Obsolescence Management/Software Obsolescence Management workflow 1.5.0.yaml:1
- Threshold enablement is checked using truthiness (
if(alertThresholds['0'])), but earlier you explicitly treat the string'false'as deactivated. Since'false'is truthy, these lines would still bucket entities when a threshold is set to the string'false'. Use the same activation check here (e.g., require'CUSTOM_INFO'/'CUSTOM_ALERT') to keep behavior consistent.
metadata:
Software Obsolescence Management/Software Obsolescence Management workflow 1.5.0.yaml:1
- The
versionpath segment is interpolated without URL encoding. Many ecosystem versions can contain characters like+,/, or spaces which will break the request or be interpreted differently by the server. Encodeversion(e.g.,encodeURIComponent(version)) before inserting it into the URL.
metadata:
Software Obsolescence Management/Software Obsolescence Management workflow 1.5.0.yaml:1
- This catch logs a generic message but drops the actual
error, making debugging operational failures difficult. Log the error object (and ideally relevant context like the affected entity/key) so failures can be diagnosed from workflow logs. Similar patterns exist in other worker tasks.
metadata:
Software Obsolescence Management/Software Obsolescence Management workflow 1.5.0.yaml:1
- The DQL string repeats
overridesVariableArray.map(...).join(',')many times, which makes the query construction hard to read and easy to break during edits. Compute the joined string once (e.g.,const overrides = overridesVariableArray.map(...).join(',')) and interpolate that variable throughout the query.
metadata:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| \ configBody['alertThresholds'];\n const alertManagementZoneRestrictions\ | ||
| \ = configBody['alertManagementZoneRestrictions'];\n const alertTagRestrictions\ | ||
| \ = configBody['alertTagRestrictions'];\n const supportOverrides = configBody['supportOverrides'];\n\ | ||
| \ \n refreshOsData();\n console.log(`Refreshing OS Data...`);\n}" |
There was a problem hiding this comment.
refreshOsData is async but is invoked without await, which can let the task exit before refresh completes and swallow failures. The same pattern appears in the library/technology refresh tasks as well; use await so the workflow task reflects the true outcome.
| \ \n refreshOsData();\n console.log(`Refreshing OS Data...`);\n}" | |
| \ \n await refreshOsData();\n console.log(`Refreshing OS Data...`);\n}" |
| | Task | Purpose | | ||
| |---|---| | ||
| | **config** | Centralised user configuration. Returns alert thresholds, management zone/tag restrictions, and support overrides as a JSON object. | | ||
| | **get_os_eol_data** | Refreshes OS version lifecycle data from [endoflife.date](https://endoflife.date). | |
There was a problem hiding this comment.
The markdown tables use || at the start of rows, which renders as an extra empty column (or can render incorrectly depending on the renderer). Use single-pipe table syntax (| Task | Purpose |, |---|---|, etc.) to ensure consistent formatting.
| \ // 'K8host:d1-eks-demo',\n // 'kubernetes',\n ]\n \n /*\n \n\ | ||
| \ * Note: the combination of both a list of management zone(s) and\n tag(s)\ | ||
| \ is restrictive.\n \n * This means that only entities respecting *both*\ | ||
| \ types of\n restrictions will be included in the obsolesence analysis\n\ |
There was a problem hiding this comment.
Correct spelling: 'obsolesence' → 'obsolescence'.
| \ types of\n restrictions will be included in the obsolesence analysis\n\ | |
| \ types of\n restrictions will be included in the obsolescence analysis\n\ |
Added ability to configure time range and include EOS date if available
Changes to add extended life support dates and add variable to control refresh timeframe
Extended Support bug fix
Updated the workflow for maintainability added Readme as well.
Also includes extra fields for OS level EOL based on in Cycle versions not just latest versions