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

URI pattern being used is being flagged by ttk #10391

Closed
ashwinvenkatesha opened this issue Apr 25, 2024 · 5 comments
Closed

URI pattern being used is being flagged by ttk #10391

ashwinvenkatesha opened this issue Apr 25, 2024 · 5 comments
Assignees
Labels

Comments

@ashwinvenkatesha
Copy link
Contributor

Describe the bug
I am defining a variable called LogAnalyticsURI whose value is a constructed in the below manner.
"variables" : { ... "LogAnaltyicsUri":"[replace(environment().portal, 'https://portal', concat('https://', toLower(parameters('WorkspaceId')), '.ods.opinsights'))]", ... }

When I run arm-ttk locally, this complains that
[-] URIs Should Be Properly Constructed (17 ms) Function 'concat' found within 'LogAnaltyicsUri' Line: 95, Column: 6 Function 'concat' found within 'LogAnaltyicsUri' Line: 101, Column: 6

Tried changing it to,
"LogAnaltyicsUri": "[format('https://%s.ods.opinsights.azure.com', parameters('AzureSentinelWorkspaceId'))]",
This fails as well with the below message
Function 'format' found within 'LogAnaltyicsUri' Line: 95, Column: 6

To Reproduce
Steps to reproduce the behavior:

  1. In mainTemplate.json, create a variable in the below manner
    "variables" : { ... "LogAnaltyicsUri":"[replace(environment().portal, 'https://portal', concat('https://', toLower(parameters('WorkspaceId')), '.ods.opinsights'))]", ... }
  2. Run arm-ttk test locally to validate.

Expected behavior
Since most of the contributors are defining this variable in this manner, this definition of LogAnalyticsURi should be allowed.

Screenshots
image

I am wondering if I submit a pull request, will the same failure occur

@v-rusraut
Copy link
Contributor

Hi @ashwinvenkatesha,
Thanks for flagging this issue, we will investigate this issue and get back to you with some updates by 03 May 2024. Thanks!

@v-sabiraj
Copy link
Contributor

Hi @ashwinvenkatesha , can we get to know on which maintemplate you are running the Arm-ttk?
Also, can you please let us know what is the file where you have added the variable?

If we have "uri" or "url" keyword mentioned in variable name, it will fail with above mentioned error.

@v-sabiraj
Copy link
Contributor

Hi @ashwinvenkatesha , as per the discussion on call, I think you will not be following the approach to call the function app from the workbook, so are we good to close on this?
thanks.

@v-rusraut
Copy link
Contributor

Hi @ashwinvenkatesha, Gentle Reminder: We are waiting for your response on this issue. If you still need to keep this issue active, please respond to it in the next 2 days. If we don't receive a response by 15-05-2024 date, we will be closing this issue.
Thanks!

@v-rusraut
Copy link
Contributor

Hi @ashwinvenkatesha, since we have not received a response from you, we are closing this issue as per our standard operating procedures. If you still need support for this issue, feel free to re-open at any time. Thank you for your co-operation.

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

No branches or pull requests

4 participants