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

Fix concurrency check for hosted deployments #1279

Merged
merged 2 commits into from
Jun 23, 2023
Merged

Conversation

kushalmalani
Copy link
Contributor

@kushalmalani kushalmalani commented Jun 23, 2023

Description

Describe the purpose of this pull request.

Fix concurrency check for hosted deployments

🎟 Issue(s)

Related #1267

🧪 Functional Testing

List the functional testing steps to confirm this feature or fix.

📸 Screenshots

Add screenshots to illustrate the validity of these changes.

Screenshot 2023-06-22 at 20 08 29 Screenshot 2023-06-22 at 20 08 48

📋 Checklist

  • Rebased from the main (or release if patching) branch (before testing)
  • Ran make test before taking out of draft
  • Ran make lint before taking out of draft
  • Added/updated applicable tests
  • Tested against Astro-API (if necessary).
  • Tested against Houston-API and Astronomer (if necessary).
  • Communicated to/tagged owners of respective clients potentially impacted by these changes.
  • Updated any related documentation

@kushalmalani kushalmalani self-assigned this Jun 23, 2023
@codecov
Copy link

codecov bot commented Jun 23, 2023

Codecov Report

Patch coverage: 87.50% and project coverage change: -0.02 ⚠️

Comparison is base (79aacd6) 87.53% compared to head (cdbfeb2) 87.52%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1279      +/-   ##
==========================================
- Coverage   87.53%   87.52%   -0.02%     
==========================================
  Files         110      110              
  Lines       13020    13057      +37     
==========================================
+ Hits        11397    11428      +31     
- Misses        949      952       +3     
- Partials      674      677       +3     
Impacted Files Coverage Δ
cloud/deployment/fromfile/fromfile.go 97.72% <78.94%> (-1.09%) ⬇️
cloud/deployment/workerqueue/workerqueue.go 98.27% <93.10%> (-0.50%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@neel-astro neel-astro left a comment

Choose a reason for hiding this comment

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

functionally looks ok to me. Once any of us has some free cycles (hopefully 🙏 ), we could look to tackle the lining exceptions added in our codebase

@@ -184,10 +184,12 @@ func CreateOrUpdate(inputFile, action string, client astro.Client, coreClient as
// It returns an error if getting default options fail.
// It returns an error if worker-queue options are not valid.
// It returns an error if node pool id could not be found for the worker type.
func getCreateOrUpdateInput(deploymentFromFile *inspect.FormattedDeployment, clusterID, workspaceID, action string, existingDeployment *astro.Deployment, nodePools []astrocore.NodePool, client astro.Client) (astro.CreateDeploymentInput, astro.UpdateDeploymentInput, error) {
func getCreateOrUpdateInput(deploymentFromFile *inspect.FormattedDeployment, clusterID, workspaceID, action string, existingDeployment *astro.Deployment, nodePools []astrocore.NodePool, client astro.Client) (astro.CreateDeploymentInput, astro.UpdateDeploymentInput, error) { //nolint
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I think at some point we might have to move to using a struct instead of accepting such a large number of inputs. Also might have look at breaking down such large functions, since we have already put linting exception at few places

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree. This has been on my mind too.

@kushalmalani kushalmalani merged commit a969d8b into main Jun 23, 2023
@kushalmalani kushalmalani deleted the fix-concurrency-check branch June 23, 2023 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants