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

POL-1435 POL-1436 POL-1437 - feat: Schedule Instance PT Enhancements #2918

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

bryankaraffa
Copy link
Contributor

@bryankaraffa bryankaraffa commented Jan 7, 2025

Description

  • Added retry mechanism in case of failed actions or timeout waiting for the expected status change
  • Fixed issue preventing schedules being enforced when first action attempt fails
  • Added "Last Stop Status", "Last Stop Time", "Last Start Status", "Last Start Time" details to instance list

Issues Resolved

https://flexera.atlassian.net/browse/POL-1435
https://flexera.atlassian.net/browse/POL-1436
https://flexera.atlassian.net/browse/POL-1437

Link to Example Applied Policy

https://app.flexera.com/orgs/6/automation/applied-policies/projects/7954

Contribution Check List

  • New functionality includes testing.
  • New functionality has been documented in the README if applicable
  • New functionality has been documented in CHANGELOG.MD

@bryankaraffa bryankaraffa added enhancement New feature or request DO-NOT-MERGE labels Jan 7, 2025
Copy link
Contributor

github-actions bot commented Jan 7, 2025

2 Errors
🚫

cost/azure/schedule_instance/README.md

Markdown syntax errors found:

cost/azure/schedule_instance/README.md:56: MD005 Inconsistent indentation for list items at the same level
cost/azure/schedule_instance/README.md:57: MD005 Inconsistent indentation for list items at the same level
cost/azure/schedule_instance/README.md:58: MD005 Inconsistent indentation for list items at the same level
cost/azure/schedule_instance/README.md:59: MD005 Inconsistent indentation for list items at the same level
cost/azure/schedule_instance/README.md:60: MD005 Inconsistent indentation for list items at the same level
cost/azure/schedule_instance/README.md:87: MD005 Inconsistent indentation for list items at the same level
cost/azure/schedule_instance/README.md:88: MD005 Inconsistent indentation for list items at the same level
cost/azure/schedule_instance/README.md:89: MD005 Inconsistent indentation for list items at the same level
cost/azure/schedule_instance/README.md:90: MD005 Inconsistent indentation for list items at the same level
cost/azure/schedule_instance/README.md:91: MD005 Inconsistent indentation for list items at the same level
cost/azure/schedule_instance/README.md:94: MD005 Inconsistent indentation for list items at the same level
cost/azure/schedule_instance/README.md:31: MD029 Ordered list item prefix

Further documentation is available for these failures:

  • MD005: https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md#md005—inconsistent-indentation-for-list-items-at-the-same-level
  • MD029: https://github.com/markdownlint/markdownlint/blob/main/docs/RULES.md#md029—ordered-list-item-prefix
🚫

cost/azure/schedule_instance/azure_schedule_instance.pt

Version number in policy template does not match latest version number in CHANGELOG.md. Please review both files to make sure they are correct and aligned with each other.


run_script statements found whose parameters are not in the correct order. run_script parameters should be in the following order: script, val(iter_item, string), datasources, parameters, variables, raw values:

Line 788: ds_instances_schedule_result_action_start / run_script $js_instances_schedule_result_action_start
Line 827: ds_instances_schedule_result_action_stop / run_script $js_instances_schedule_result_action_stop

1 Warning
⚠️

cost/azure/schedule_instance/azure_schedule_instance.pt

Detected new request datasource(s) in Policy Template file. Please verify the README.md has any new permissions that may be required.


Possible invalid spacing between comma-separated items found:

Line 247: path join(["/api/governance/projects/", rs_project_id, "/incidents/",val(iter_item, 'incident_id')])

Line 643: // schedule="08:00-17:30;MO,TU,WE,TH,FR"

Line 644: // schedule="08:00-17:30;MO,TU,WE,TH,FR;America/Los_Angeles"

Line 645: var schedule_is_valid = /([0-9]{1,2}.*)-([0-9]{1,2}.*);([A-Za-z,]*).*/.test(schedule)

Line 682: days = "SU,MO,TU,WE,TH,FR,SA"

Line 995: check logic_or($ds_parent_policy_terminated, eq(size(val(data,"actions")), 0))

Comma separated items should be organized as follows, with a single space following each comma: apple, banana, pear

1 Message
📖

Github Pull Request

Pull Request is missing READY-FOR-REVIEW label. Please add this label if this Pull Request is ready for review.

Please note that this message may be a false positive if you've added the label after Dangerfile tests were run, since adding labels does not trigger them to run again. In these cases, simply ignore this message.

Generated by 🚫 Danger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO-NOT-MERGE enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant