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

CI/CD Script does not detect changes in parameter values in object arrays #542

Open
aurelschwitter opened this issue Feb 23, 2023 · 2 comments

Comments

@aurelschwitter
Copy link

Example trigger config:

{
    "name": "schedule_daily_execution",
    "properties": {
        "annotations": [],
        "runtimeState": "Started",
        "pipelines": [
            {
                "pipelineReference": {
                    "referenceName": "my_pipeline",
                    "type": "PipelineReference"
                },
                "parameters": {
                    "tableConfig": [
                        {
                            "tableName": "table1"
                        },
                        {
                            "tableName": "table2"
                        }
                    ]
                }
            }
        ],
        "type": "ScheduleTrigger",
        "typeProperties": {
            "recurrence": {
                "frequency": "Day",
                "interval": 1,
                "startTime": "2022-09-21T09:32:00Z",
                "timeZone": "UTC",
                "schedule": {
                    "minutes": [
                        30
                    ],
                    "hours": [
                        4
                    ]
                }
            }
        }
    }
}

When changing the table names to "table3" and "table4", the script does not detect a change because compare-object does not compare array contents:

pwsh > $oldConfig = '[{"tableName":"table1"},{"tableName":"table2"}]'
pwsh > $newConfig = '[{"tableName":"table3"},{"tableName":"table4"}]'
pwsh > Compare-Object (ConvertFrom-Json $oldConfig) (ConvertFrom-Json $newConfig)
# no output --> no change
@soma-ms
Copy link
Contributor

soma-ms commented Feb 28, 2023

@aurelschwitter - The script will do best-effort comparison to detect changes in trigger payload. You can pass the trigger list to ExplicitStopTriggerList argument to explicitly stop them as the deployment fail if the trigger is not stopped.

We will investigate and check if the issue can be addressed.

@himanshu-ram-punjabi
Copy link

I started facing the same issue today. All my Triggers now have a Object Parameter (due to limitation of 256 Parameters). While I can use ExplicitStopTriggerList to stop the Triggers, there is no way to Start all of them after the Deployment.

Please see if a solution can be proposed. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants