Skip to content

Fix deployment errors in OpenDataFunctions.kql - #1242

Closed
Brett Wilson (MSBrett) wants to merge 2 commits into
devfrom
msbrett/dev/OpenDataScriptFix
Closed

Brett Wilson (MSBrett) wants to merge 2 commits into
devfrom
msbrett/dev/OpenDataScriptFix

Conversation

@MSBrett

@MSBrett Brett Wilson (MSBrett) commented Jan 9, 2025

Copy link
Copy Markdown
Contributor

🛠️ Description

This PR fixes deployment caused by

  • shortening the length of the OpenDataFunctions.kql script script to less than 131K chars
  • casting the type of data returned in tmp_resourcedetails to string.

🔬 How did you test this change?

  • 🤏 Lint tests
  • 🤞 PS -WhatIf / az validate
  • 👍 Manually deployed + verified
  • 💪 Unit tests
  • 🙌 Integration tests

🙋‍♀️ Do any of the following that apply?

  • 🚨 This is a breaking change.
  • 🤏 The change is less than 20 lines of code.

📑 Did you update docs/changelog.md?

  • ✅ Updated changelog (required for dev PRs)
  • ➡️ Will add log in a future PR (feature branch PRs only)
  • ❎ Log not needed (small/internal change)

📖 Did you update documentation?

  • ✅ Public docs in docs (required for dev)
  • ✅ Internal dev docs in src (required for dev)
  • ➡️ Will add docs in a future PR (feature branch PRs only)
  • ❎ Docs not needed (small/internal change)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

src/templates/finops-hub/modules/scripts/IngestionSetup.kql:1253

  • The newly introduced ResourceName variable should be covered by tests to ensure its correct behavior.
| extend ResourceName = tostring(tmp_ResourceDetails.ResourceName)

@microsoft-github-policy-service microsoft-github-policy-service Bot added the Needs: Review 👀 PR that is ready to be reviewed label Jan 9, 2025
@MSBrett Brett Wilson (MSBrett) changed the title Msbrett/dev/open data script fix Fix deployment errors in OpenDataFunctions.kql Jan 10, 2025
@@ -6,31 +6,9 @@
with (docstring = 'Return details about the specified ID.', folder = 'OpenData')

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My VS code is telling me that it is still 132138 characters. I can't deploy it: Error BCP184: File 'C:\Projects\finops-toolkit\src\templates\finops-hub\modules\scripts\OpenDataFunctions.kql' exceeded maximum size of 131072 characters.

@@ -6,31 +6,9 @@
with (docstring = 'Return details about the specified ID.', folder = 'OpenData')
resource_type(id: string) {
dynamic({
"arizeai.observabilityeval/organizations": { "SingularDisplayName": "Azure Native ArizeAi Cloud Service" }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are you deciding what to keep and what to remove?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love removing values. While I feel there has to be a better solution, I submitted a PR to split the file into multiple files since we know it will grow over time. I don't love it, but it should get us past the current issue. I validated the deployment so it should resolve the current issues. Thanks for digging into this.

#1269

@microsoft-github-policy-service microsoft-github-policy-service Bot added Needs: Attention 👋 Issue or PR needs to be reviewed by the author or it will be closed due to no activity and removed Needs: Review 👀 PR that is ready to be reviewed labels Jan 26, 2025
@flanakin

Copy link
Copy Markdown
Collaborator

Closing in favor of #1269

@flanakin
Michael Flanakin (flanakin) deleted the msbrett/dev/OpenDataScriptFix branch March 31, 2025 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs: Attention 👋 Issue or PR needs to be reviewed by the author or it will be closed due to no activity Tool: FinOps hubs Data pipeline solution Type: Bug 🐛 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants