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.
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
feat(cssc): 31231619 Enhance update command to check for Task yaml changes #13
base: feature/cssc_ext
Are you sure you want to change the base?
feat(cssc): 31231619 Enhance update command to check for Task yaml changes #13
Changes from all commits
7eeebb5
d6cb7e6
2919af7
da4b689
3657b4e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than checking the content, shall we also check if schedule_cron_expression is null? Either change should trigger a task update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the function gets
schedule_cron_expression
asNone
, it will retrieve the cron from the trigger task.Do you mean that we should check if the returned task also has a
null
cron expression (i.e. the customer modified the task to remove the schedule?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There're two scenarios where we should update the task, either when the task content (yaml) changes or schedul_cron_expression schedule is modified, right? If schedul_cron_expression is non, it means "No update", else it might means "update". So when to decide if to update the task, it should be based on 1. whether deployed_task is equal to extension_task 2. Whether schedule_cron_expression is null, e.g.
if deployed_task != extension_task or schedule_cron_expression is None:
...
In your current code, you only check if the task is equal or not. If it is not equal, you then check the schedule_cron_expression.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, the case when the deployed task and the extension task are the same and the schedule needs to be updated is on line 137 under
_update_task_schedule
.This section is meant to handle only when the tasks are different, and if we don't have a cron expression (only the configuration is being updated) we need to retrieve it from the task to keep it the same, as the ARM template includes it as as parameter.