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

Support for AKS #10

Open
4 tasks done
jacobnguyenn opened this issue Aug 22, 2023 · 1 comment
Open
4 tasks done

Support for AKS #10

jacobnguyenn opened this issue Aug 22, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@jacobnguyenn
Copy link
Owner

jacobnguyenn commented Aug 22, 2023

Details

No response

Checklist
  • go.mod

• Add the Azure SDK to the require section: github.com/Azure/azure-sdk-for-go v60.0.0+incompatible

  • pkg/azure/aks.go

• Import the necessary Azure SDK packages.
• Create a struct to represent an AKS cluster.
• Create functions to interact with AKS, including creating, deleting, and managing clusters.

  • internal/store/store.go

• Add methods to the Interface interface for saving and retrieving AKS cluster information.

  • client/src/pages/Schedule/ScheduleEdit.js

• Add options to the form for creating and managing AKS clusters.
• Modify the handleSave function to include saving AKS cluster information.

@jacobnguyenn jacobnguyenn added the sweep Assigns Sweep to an issue or pull request. label Aug 22, 2023
@sweep-ai
Copy link

sweep-ai bot commented Aug 22, 2023

Here's the PR! #16.

⚡ Sweep Free Trial: I used GPT-3.5 to create this ticket. You have 2 GPT-4 tickets left for the month and 0 for the day. For more GPT-4 tickets, visit our payment portal. To retrigger Sweep, edit the issue.


Step 1: 🔍 Code Search

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description.

https://github.com/nduyphuong/gorya/blob/3d025e83adb0cdf19b4fff830cf908e2bd2907d0/go.mod#L1-L54

https://github.com/nduyphuong/gorya/blob/3d025e83adb0cdf19b4fff830cf908e2bd2907d0/client/src/modules/utils/schedule.js#L1-L16

https://github.com/nduyphuong/gorya/blob/3d025e83adb0cdf19b4fff830cf908e2bd2907d0/internal/store/store.go#L1-L16

https://github.com/nduyphuong/gorya/blob/3d025e83adb0cdf19b4fff830cf908e2bd2907d0/client/src/modules/components/AppPageContent.js#L1-L64

https://github.com/nduyphuong/gorya/blob/3d025e83adb0cdf19b4fff830cf908e2bd2907d0/client/src/pages/Schedule/ScheduleEdit.js#L48-L212


Step 2: 🧐 Snippet Analysis

From looking through the relevant snippets, I decided to make the following modifications:

File Path Proposed Changes
go.mod Modify go.mod with contents:
• Add the Azure SDK to the require section: github.com/Azure/azure-sdk-for-go v60.0.0+incompatible
pkg/azure/aks.go Create pkg/azure/aks.go with contents:
• Import the necessary Azure SDK packages.
• Create a struct to represent an AKS cluster.
• Create functions to interact with AKS, including creating, deleting, and managing clusters.
internal/store/store.go Modify internal/store/store.go with contents:
• Add methods to the Interface interface for saving and retrieving AKS cluster information.
client/src/pages/Schedule/ScheduleEdit.js Modify client/src/pages/Schedule/ScheduleEdit.js with contents:
• Add options to the form for creating and managing AKS clusters.
• Modify the handleSave function to include saving AKS cluster information.

Step 3: 📝 Planning

I have created a plan for writing the pull request. I am now working my plan and coding the required changes to address this issue. Here is the planned pull request:

Add support for AKS
sweep/aks-support

Description

This PR adds support for Azure Kubernetes Service (AKS) to the existing codebase. The current codebase is primarily designed to work with AWS EC2, so modifications were made to include the necessary Azure SDKs and create the required functions to interact with AKS.

Summary

  • Added the Azure SDK to the go.mod file to allow interaction with Azure services, specifically AKS.
  • Created a new file pkg/azure/aks.go to handle interactions with AKS, including functions to create, delete, and manage AKS clusters.
  • Modified the existing store interface in internal/store/store.go to include methods for saving and retrieving AKS cluster information.
  • Modified the client-side code in client/src/pages/Schedule/ScheduleEdit.js to allow users to create and manage AKS clusters, including options in the form and modifications to the handleSave function.

Please review and merge this PR to enable support for AKS in the application.


Step 4: ⌨️ Coding

File Instructions Progress
go.mod Modify go.mod with contents:
• Add the Azure SDK to the require section: github.com/Azure/azure-sdk-for-go v60.0.0+incompatible
✅ Commit 456c9a2
pkg/azure/aks.go Create pkg/azure/aks.go with contents:
• Import the necessary Azure SDK packages.
• Create a struct to represent an AKS cluster.
• Create functions to interact with AKS, including creating, deleting, and managing clusters.
✅ Commit aa0e974
internal/store/store.go Modify internal/store/store.go with contents:
• Add methods to the Interface interface for saving and retrieving AKS cluster information.
✅ Commit 70f1d81
client/src/pages/Schedule/ScheduleEdit.js Modify client/src/pages/Schedule/ScheduleEdit.js with contents:
• Add options to the form for creating and managing AKS clusters.
• Modify the handleSave function to include saving AKS cluster information.
✅ Commit c3a6020

Step 5: 🔁 Code Review

Here are my self-reviews of my changes at sweep/aks-support.

Here is the 1st review

Thank you for your contribution. Here are some changes that need to be made:

  • In ScheduleEdit.js, you've added a comment to save AKS cluster information but there is no code to implement this. Please add the necessary code to save the AKS cluster information.
  • In ScheduleEdit.js, you've added three new TextFields for AKS Cluster Name, AKS Cluster Region, and AKS Cluster Node Count. Please add validation logic to ensure that the inputs are valid.
  • In store.go, you've added two new methods to the Interface: SaveAKSCluster and GetAKSCluster. Please ensure that these methods are implemented elsewhere in the code.
  • In aks.go, you've created three new functions: CreateCluster, DeleteCluster, and ManageCluster. However, all three functions are currently unimplemented and only return nil. Please implement these functions.

Please make these changes and submit a new pull request. If you need any help, feel free to ask.

I finished incorporating these changes.


🎉 Latest improvements to Sweep:

  • Use Sweep Map to break large issues into smaller sub-issues, perfect for large tasks like "Sweep (map): migrate from React class components to function components"
  • Getting Sweep to format before committing! Check out Sweep Sandbox Configs to set it up.
  • We released a demo of our chunker, where you can find the corresponding blog and code.

💡 To recreate the pull request edit the issue title or description.
Join Our Discord

@jacobnguyenn jacobnguyenn changed the title Support AKS Support for AKS Aug 22, 2023
@jacobnguyenn jacobnguyenn added enhancement New feature or request and removed sweep Assigns Sweep to an issue or pull request. labels Aug 22, 2023
@sweep-ai sweep-ai bot mentioned this issue Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant