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

Mapping product names #1091

Merged
merged 8 commits into from
May 30, 2024
Merged

Mapping product names #1091

merged 8 commits into from
May 30, 2024

Conversation

dagarwal-mitre
Copy link
Collaborator

@dagarwal-mitre dagarwal-mitre commented May 7, 2024

πŸ—£ Description

Added product names to the table with with tenant licensing information
Closes #993

πŸ’­ Motivation and context

This helps users understand which licenses they have

πŸ§ͺ Testing

Tested with the different tenants

βœ… Pre-approval checklist

  • This PR has an informative and human-readable title.
  • PR targets the correct parent branch (e.g., main or release-name) for merge.
  • Changes are limited to a single goal - eschew scope creep!
  • Changes are sized such that they do not touch excessive number of files.
  • All future TODOs are captured in issues, which are referenced in code comments.
  • These code changes follow the ScubaGear content style guide.
  • Related issues these changes resolve are linked preferably via closing keywords.
  • All relevant type-of-change labels added.
  • All relevant project fields are set.
  • All relevant repo and/or project documentation updated to reflect these changes.
  • Unit tests added/updated to cover PowerShell and Rego changes.
  • Functional tests added/updated to cover PowerShell and Rego changes.
  • All relevant functional tests passed.
  • All automated checks (e.g., linting, static analysis, unit/smoke tests) passed.

βœ… Pre-merge checklist

  • PR passed smoke test check.

  • Feature branch has been rebased against changes from parent branch, as needed

    Use Rebase branch button below or use this reference to rebase from the command line.

  • Resolved all merge conflicts on branch

  • Notified merge coordinator that PR is ready for merge via comment mention

βœ… Post-merge checklist

  • Feature branch deleted after merge to clean up repository.
  • Verified that all checks pass on parent branch (e.g., main or release-name) after merge.

@dagarwal-mitre dagarwal-mitre self-assigned this May 7, 2024
@dagarwal-mitre
Copy link
Collaborator Author

I am unsure where to put the product names csv file, currently it is in the ScubaGear folder, if it needs to be moved to a different location please reply to this comment.

@dagarwal-mitre dagarwal-mitre requested review from gdasher and removed request for tkol2022 May 7, 2024 17:23
@schrolla schrolla added this to the Halibut milestone May 16, 2024
@tkol2022
Copy link
Collaborator

I am guessing that Microsoft updates the licensing plan data regularly. What is the plan to keep this information up to date in ScubaGear? Right now the new code is referencing a static CSV file.

image

@gdasher
Copy link
Collaborator

gdasher commented May 17, 2024

I am guessing that Microsoft updates the licensing plan data regularly. What is the plan to keep this information up to date in ScubaGear? Right now the new code is referencing a static CSV file.

image

Given the direct copy is used, we can likely generalize David Bui's github action to check for updates to this file as well Probably just be comparing hashes for changes and updating if so, for example?

Suggest we file an issue for that after this is committed.

Separately, please ping when the test cases have been updated and I will re-review for approval.

@schrolla
Copy link
Collaborator

I am guessing that Microsoft updates the licensing plan data regularly. What is the plan to keep this information up to date in ScubaGear? Right now the new code is referencing a static CSV file.
image

Given the direct copy is used, we can likely generalize David Bui's github action to check for updates to this file as well Probably just be comparing hashes for changes and updating if so, for example?

Suggest we file an issue for that after this is committed.

Separately, please ping when the test cases have been updated and I will re-review for approval.

Github automation is a good idea. My other thought was to add a new cmdlet to the tool that would reach out and grab the new version of the file directly and incorporate it into ScubaGear. That way, users could update the file directly outside the release cycle when needed if they had the necessary connectivity to do so. So I'd say, how about both as TODOs added beyond this issue?

@schrolla schrolla added the enhancement This issue or pull request will add new or improve existing functionality label May 20, 2024
@dagarwal-mitre
Copy link
Collaborator Author

I am guessing that Microsoft updates the licensing plan data regularly. What is the plan to keep this information up to date in ScubaGear? Right now the new code is referencing a static CSV file.
image

Given the direct copy is used, we can likely generalize David Bui's github action to check for updates to this file as well Probably just be comparing hashes for changes and updating if so, for example?
Suggest we file an issue for that after this is committed.
Separately, please ping when the test cases have been updated and I will re-review for approval.

Github automation is a good idea. My other thought was to add a new cmdlet to the tool that would reach out and grab the new version of the file directly and incorporate it into ScubaGear. That way, users could update the file directly outside the release cycle when needed if they had the necessary connectivity to do so. So I'd say, how about both as TODOs added beyond this issue?

2 comments/questions about this.

  1. Currently the CSV File is not a direct copy of the CSV file from Microsoft, because the original file from Microsoft was about 1 MB and in an effort to reduce the size, I had removed the last few columns which we didn't use from the CSV file, but if size is not a concern, we can use a direct copy instead.
  2. If we use a Github automation, couldn't we set it up so that it runs nightly, similar to the Nightly Testing that is run through a Github automation so there is always the newest version of the file and it wouldn't be tied to the release cycle.

Copy link
Collaborator

@schrolla schrolla left a comment

Choose a reason for hiding this comment

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

See notes about recommendations for CSV file suggestions.

Product Names for Licensing.csv Outdated Show resolved Hide resolved
Product Names for Licensing.csv Outdated Show resolved Hide resolved
Product Names for Licensing.csv Outdated Show resolved Hide resolved
@gdasher
Copy link
Collaborator

gdasher commented May 22, 2024

I am guessing that Microsoft updates the licensing plan data regularly. What is the plan to keep this information up to date in ScubaGear? Right now the new code is referencing a static CSV file.
image

Given the direct copy is used, we can likely generalize David Bui's github action to check for updates to this file as well Probably just be comparing hashes for changes and updating if so, for example?
Suggest we file an issue for that after this is committed.
Separately, please ping when the test cases have been updated and I will re-review for approval.

Github automation is a good idea. My other thought was to add a new cmdlet to the tool that would reach out and grab the new version of the file directly and incorporate it into ScubaGear. That way, users could update the file directly outside the release cycle when needed if they had the necessary connectivity to do so. So I'd say, how about both as TODOs added beyond this issue?

2 comments/questions about this.

  1. Currently the CSV File is not a direct copy of the CSV file from Microsoft, because the original file from Microsoft was about 1 MB and in an effort to reduce the size, I had removed the last few columns which we didn't use from the CSV file, but if size is not a concern, we can use a direct copy instead.
  2. If we use a Github automation, couldn't we set it up so that it runs nightly, similar to the Nightly Testing that is run through a Github automation so there is always the newest version of the file and it wouldn't be tied to the release cycle.

Ok, makes sense. I think its fine to drop columns we don't need so long as we do it in a standardized way (e.g. ImportFrom-Csv | Select-Object -Blah -Blah | ExportTo-Csv or the like in the automation script) and not a manual process.

Yes, if we do automation we can run it on a cron schedule and just update main periodically. That's how I would think to do it anyways.

@dagarwal-mitre
Copy link
Collaborator Author

@nanda-katikaneni Ready to merge!

@nanda-katikaneni nanda-katikaneni merged commit a81c2b4 into main May 30, 2024
14 checks passed
@nanda-katikaneni nanda-katikaneni deleted the 993-mapping-product-names branch May 30, 2024 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This issue or pull request will add new or improve existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mapping SKU names to Product Name
5 participants