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

Using tokens as dynamic values creates empty string error during validation #353

Open
mrWiecek opened this issue Mar 20, 2023 · 1 comment
Assignees
Labels
triage Issue is under investigation

Comments

@mrWiecek
Copy link

mrWiecek commented Mar 20, 2023

Current Behavior:

Using Azure DevOps build task
During validation in Azure Devops Build pipelines following error occurs:

=== Validating other rules ...
Checking duplicated names...
Checking names of datasets, pipelines, dataflows...
Checking: Global parameter names...
=== Validating config files ...
Checking config file: C:\agents\vsts-agent-win-x64-2.194.0\_work\13\s\ADF\deployment\config.json...
Config file:   C:\agents\vsts-agent-win-x64-2.194.0\_work\13\s\ADF\deployment\config.json
ERROR: Cannot bind argument to parameter 'value' because it is an empty string.
=============================================================================================
 ADF                                                                          # of Errors: 1
 Test code failed.                                                          # of Warnings: 0
=============================================================================================

Expected Behavior:

=== Validating config files ...
Checking config file: C:\agents\vsts-agent-win-x64-2.194.0\_work\13\s\ADF\deployment\config.json...
Config file:   C:\agents\vsts-agent-win-x64-2.194.0\_work\13\s\ADF\deployment\config.json
*** Properties modification report ***

Added Removed Updated
----- ------- -------
    0       0      32


=============================================================================================
 ADF                                                                          # of Errors: 0
 Test code completed (126 objects).                                         # of Warnings: 0
=============================================================================================


Steps To Reproduce:

  1. Create a config file in json config.json
  2. Update arbitrary object ex. global parameter value environment using dynamic values as the only thing as value in parameter value :).
    "adf-dev": [
        {
            "name": "$.properties.globalParameters.environment.value",
            "value": "$Env:env",
            "action": "update"
        },

Workaround:

When I try to add any character to value of parameter value everything work as aspected. Let's add space as prefix. It might not be working solution for some cases:

    "adf-dev": [
        {
            "name": "$.properties.globalParameters.environment.value",
            "value": " $Env:env",
            "action": "update"
        },
@NowinskiK
Copy link
Member

Thanks, I will check that in spare time.

@NowinskiK NowinskiK self-assigned this Jul 10, 2023
@NowinskiK NowinskiK added the triage Issue is under investigation label Jul 10, 2023
@NowinskiK NowinskiK transferred this issue from Azure-Player/azure.datafactory.devops Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Issue is under investigation
Projects
None yet
Development

No branches or pull requests

2 participants