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

Adding Advisor and Resource Graph recommendations exports to Hubs #1130

Open
wants to merge 17 commits into
base: features/recs
Choose a base branch
from

Conversation

helderpinto
Copy link
Member

🛠️ Description

This is the first PR in a series of PRs that will add Advisor and Resource Graph recommendations exports to Hubs. This PR includes the initial Advisor/ARG recommendations export and the schema for recommendations. It is compatible with Data Explorer ingestion. For this PR, we also fixed Western Europe timezones.

The upcoming PRs will address documentation, reporting, and granting permissions to the ADF identity at a higher scope, for the recommendations exports to succeed. Currently, Reader permissions have to be granted manually at the subscription or management group level.

📋 Checklist

🔬 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)

src/templates/finops-hub/modules/azuretimezones.bicep Outdated Show resolved Hide resolved
src/templates/finops-hub/modules/dataFactory.bicep Outdated Show resolved Hide resolved
src/templates/finops-hub/modules/dataFactory.bicep Outdated Show resolved Hide resolved
src/templates/finops-hub/modules/dataFactory.bicep Outdated Show resolved Hide resolved
value: 'Pipeline failed'
type: 'Expression'
}
errorCode: 'ARGQueriesFailed'
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should make the prefix dynamic and pull from the JSON file.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can you be more specific? This activity is very generic, being there to raise a pipeline error only when at least one of the queries raised an error that is not attributable to a result with empty rows. This is needed to ensure the pipeline finishes successfully in case no cost recommendations were found.

Copy link
Member Author

Choose a reason for hiding this comment

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

I meanwhile understood what you meant. However, given the nature of each source type (ARG, ADX, etc.), error handling will probably be specific to the source type. We can discuss this further offline.

@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 Dec 19, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Review 👀 PR that is ready to be reviewed and removed Needs: Attention 👋 Issue or PR needs to be reviewed by the author or it will be closed due to no activity labels Dec 20, 2024
@helderpinto helderpinto changed the base branch from dev to features/recs December 20, 2024 15:09
@helderpinto
Copy link
Member Author

@flanakin, the ADF pipeline was refactored to become query type-agnostic. It is now prepared to deal with other query types in the future. There are still some unresolved conversations. Feel free to ping me offline or let's set up a meeting to discuss this further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Review 👀 PR that is ready to be reviewed Tool: FinOps hubs Data pipeline solution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants