profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/protochron/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

protochron/automacon-2016-talk 2

Kubernetes Cluster Operations at DigitalOcean

protochron/aurora 1

Mirror of Apache Aurora

protochron/Colonists-vs-Pirates 1

A Plants vs. Zombies-like game for the Games and Virtual Environments class at The University of Idaho.

protochron/COTS-Server 1

A simple server to manage JSON messages sent from Android-powered robots. Uses EventMachine and MongoDB.

protochron/exvcf 1

An Elixir library for working with VCF files

protochron/fogbugz_timesheet 1

A very light wrapper around the Fogbugz API in Ruby

jfarrell/graphite-ng 0

Next generation graphite server

protochron/argo 0

Container-native workflows for Kubernetes.

protochron/aws-alb-ingress-controller 0

AWS ALB Ingress Controller for Kubernetes

protochron/aws-sdk-ruby 0

The official AWS SDK for Ruby.

issue commentdigitalocean/doctl

Make doctl available as a Flatpak

First time contributor. Would this be okay to work on?

XOmniverse

comment created time in a day

pull request commentdigitalocean/omniauth-digitalocean

Support Omniauth 2.0

Awesome thanks! 💪

excid3

comment created time in a day

pull request commentdigitalocean/omniauth-digitalocean

Support Omniauth 2.0

@excid3 Most of our team members are out today and tomorrow, so we'll cut a release for this on Monday. Thanks again!

excid3

comment created time in a day

push eventdigitalocean/omniauth-digitalocean

Chris Oliver

commit sha 8865a6f8af3cee344565237b36bf9fe5ab37c189

Support Omniauth 2.0

view details

Ben Tranter

commit sha e072f77603099e191e1d933e75e5220f37a782fe

Merge pull request #19 from excid3/omniauth-2-0 Support Omniauth 2.0

view details

push time in a day

PR merged digitalocean/omniauth-digitalocean

Support Omniauth 2.0

This updates the OmniAuth dependency to 2.0 which fixes security issues with 1.x.

https://github.com/omniauth/omniauth/releases/tag/v2.0.0

+1 -1

0 comment

1 changed file

excid3

pr closed time in a day

pull request commentdigitalocean/doctl

Allow node-pool args to be empty

Hey, @Retler - Thanks a ton for this sweet PR! 😄

Would you please shoot me an email when you get a chance? mcowley at digitalocean dot com 🎉

Retler

comment created time in a day

PR opened digitalocean/omniauth-digitalocean

Support Omniauth 2.0

This updates the OmniAuth dependency to 2.0 which fixes security issues with 1.x.

https://github.com/omniauth/omniauth/releases/tag/v2.0.0

+1 -1

0 comment

1 changed file

pr created time in a day

issue commentdigitalocean/godo

Method to delete an authorized application?

Any updates?

csandanov

comment created time in a day

push eventdigitalocean/doctl

Dana Elhertani

commit sha 0c8595f82f164f51c9bf9feae5ac794a6439d769

edit timeout

view details

push time in 3 days

Pull request review commentdigitalocean/doctl

adding the --wait flag to the apps create command

 func RunAppsCreateDeployment(c *CmdConfig) error { 	return c.Display(displayers.Deployments{deployment}) } -// waitForAppDeploymentRunning waits for a app deployment to be running.-func waitForAppDeploymentRunning(apps do.AppsService, appID string, deploymentID string) (*godo.Deployment, error) {-	failCount := 0+func waitForActiveDeployment(apps do.AppsService, appID string, deploymentID string) error {+	const maxAttempts = 1800

Oh! I get it. Thanks for explaining.

danaelhe

comment created time in 3 days

Pull request review commentdigitalocean/doctl

adding the --wait flag to the apps create command

 func RunAppsCreateDeployment(c *CmdConfig) error { 	return c.Display(displayers.Deployments{deployment}) } -// waitForAppDeploymentRunning waits for a app deployment to be running.-func waitForAppDeploymentRunning(apps do.AppsService, appID string, deploymentID string) (*godo.Deployment, error) {-	failCount := 0+func waitForActiveDeployment(apps do.AppsService, appID string, deploymentID string) error {+	const maxAttempts = 1800

In the version using a ticker, 1800 was the max number of seconds (it breaks on i * interval > timeout). Moving to a loop, this is now the number of times that we go through the loop. With the 10 second sleep at the end of the loop, maxAttempts should be 1800 / 10 for a half hour timeout.

danaelhe

comment created time in 3 days

push eventdigitalocean/doctl

Dana Elhertani

commit sha 6d33972c5eb53cd43651d99cabb7a672fb5fad4e

decreasing timeout to 30 minutes

view details

push time in 3 days

Pull request review commentdigitalocean/doctl

adding the --wait flag to the apps create command

 func RunAppsCreateDeployment(c *CmdConfig) error { 	return c.Display(displayers.Deployments{deployment}) } -// waitForAppDeploymentRunning waits for a app deployment to be running.-func waitForAppDeploymentRunning(apps do.AppsService, appID string, deploymentID string) (*godo.Deployment, error) {-	failCount := 0+func waitForActiveDeployment(apps do.AppsService, appID string, deploymentID string) error {+	const maxAttempts = 10 * 6 * 30

oh 30 minutes is more reasonable hahaha. Will do.

danaelhe

comment created time in 3 days

Pull request review commentdigitalocean/doctl

adding the --wait flag to the apps create command

 func RunAppsCreateDeployment(c *CmdConfig) error { 	return c.Display(displayers.Deployments{deployment}) } -// waitForAppDeploymentRunning waits for a app deployment to be running.-func waitForAppDeploymentRunning(apps do.AppsService, appID string, deploymentID string) (*godo.Deployment, error) {-	failCount := 0+func waitForActiveDeployment(apps do.AppsService, appID string, deploymentID string) error {+	const maxAttempts = 10 * 6 * 30

Think we might want something a bit shorter here. 1800 attempts at 10 seconds each is 5 hours. Maybe something like 30 minutes?

danaelhe

comment created time in 3 days

PR opened digitalocean/doctl

adding the --wait flag to the apps create command

(reopened PR to disregard 400+ vendor files committed)

per github issue #970 - adding a wait flag for doctl apps create command. The integration test is taking 30 seconds to complete. This causes a timeout error- if timeout is removed it works. Looking for a second pair of eyes to help determine why the test takes so long.

applies changes suggested from previous pr such as:

  • replaced ticker with for loop (thanks @bentranter)
  • clearer error messages
+210 -57

0 comment

3 changed files

pr created time in 3 days

create barnchdigitalocean/doctl

branch : add_wait_to_apps

created branch time in 3 days

pull request commentdigitalocean/doctl

adding the --wait flag to the apps create command

going to open another PR without the 400+ dependencies

danaelhe

comment created time in 3 days

PR closed digitalocean/doctl

adding the --wait flag to the apps create command

per github issue #970 - adding a wait flag for doctl apps create command. The integration test is taking 30 seconds to complete. This causes a timeout error- if timeout is removed it works. Looking for a second pair of eyes to help determine why the test takes so long.

+35195 -17697

8 comments

465 changed files

danaelhe

pr closed time in 3 days

Pull request review commentdigitalocean/doctl

adding the --wait flag to the apps create command

 require ( 	github.com/gobwas/glob v0.2.3 	github.com/golang/mock v1.4.4 	github.com/google/uuid v1.1.2-	github.com/gorilla/websocket v1.4.1+	github.com/gorilla/websocket v1.4.2 	github.com/imdario/mergo v0.3.6 // indirect-	github.com/magiconair/properties v1.8.1 // indirect-	github.com/mattn/go-colorable v0.0.9 // indirect-	github.com/mattn/go-isatty v0.0.4 // indirect+	github.com/mattn/go-colorable v0.1.8 // indirect+	github.com/mattn/go-isatty v0.0.13 // indirect 	github.com/mitchellh/copystructure v1.0.0 	github.com/natefinch/pie v0.0.0-20170715172608-9a0d72014007 	github.com/opencontainers/image-spec v1.0.1 // indirect 	github.com/opencontainers/runc v1.0.0-rc90 // indirect 	github.com/pelletier/go-toml v1.6.0 // indirect+	github.com/russross/blackfriday/v2 v2.1.0 // indirect 	github.com/sclevine/spec v1.3.0 	github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644-	github.com/sirupsen/logrus v1.7.0 // indirect-	github.com/spf13/cobra v0.0.3+	github.com/sirupsen/logrus v1.8.1 // indirect+	github.com/spf13/cobra v1.1.3

i agree, gonna keep this out for now.

danaelhe

comment created time in 3 days

Pull request review commentdigitalocean/doctl

adding the --wait flag to the apps create command

 func RunAppsCreateDeployment(c *CmdConfig) error { 	return c.Display(displayers.Deployments{deployment}) } -// waitForAppDeploymentRunning waits for a app deployment to be running.-func waitForAppDeploymentRunning(apps do.AppsService, appID string, deploymentID string) (*godo.Deployment, error) {-	failCount := 0+func waitForActiveDeployment(apps do.AppsService, appID string, deploymentID string) error {+	tickerInterval := 10 //10s+	timeout := 1800      //1800s, 30min+	n := 0 	printNewLineSet := false-	for i := 0; ; i++ {-		if i != 0 {++	ticker := time.NewTicker(time.Duration(tickerInterval) * time.Second)+	for range ticker.C {+		if n*tickerInterval > timeout {+			ticker.Stop()+			break+		}++		if n != 0 { 			fmt.Fprint(os.Stderr, ".") 			if !printNewLineSet { 				printNewLineSet = true 				defer fmt.Fprintln(os.Stderr) 			} 		} -		deployment, err := apps.GetDeployment(appID, deploymentID)-		if err == nil {-			failCount = 0-		} else {-			// Allow for transient API failures-			failCount++-			if failCount >= maxAPIFailures {-				return nil, err+		if deploymentID == "" {+			app, err := apps.Get(appID)+			if err != nil {+				return fmt.Errorf(("Error trying to read app deployment state: " + err.Error())) 			}-		} -		if deployment == nil {-			time.Sleep(1 * time.Second)-			continue-		}+			if app.InProgressDeployment != nil {+				deploymentID = app.InProgressDeployment.ID+			}+		} else {+			deployment, err := apps.GetDeployment(appID, deploymentID)+			if err != nil {+				ticker.Stop()+				return fmt.Errorf(fmt.Sprintf("Error trying to read app deployment state: " + err.Error()))

thanks for the tip!

danaelhe

comment created time in 3 days

Pull request review commentdigitalocean/doctl

adding the --wait flag to the apps create command

 func TestRunAppsDelete(t *testing.T) { 	}) } -func TestRunAppsCreateDeployment(t *testing.T) {

ok cool, i'll bring it back the in my next commit along with the rest of the changes.

danaelhe

comment created time in 3 days

Pull request review commentdigitalocean/doctl

adding the --wait flag to the apps create command

 func RunAppsCreateDeployment(c *CmdConfig) error { 	return c.Display(displayers.Deployments{deployment}) } -// waitForAppDeploymentRunning waits for a app deployment to be running.-func waitForAppDeploymentRunning(apps do.AppsService, appID string, deploymentID string) (*godo.Deployment, error) {-	failCount := 0+func waitForActiveDeployment(apps do.AppsService, appID string, deploymentID string) error {+	tickerInterval := 10 //10s+	timeout := 1800      //1800s, 30min+	n := 0 	printNewLineSet := false-	for i := 0; ; i++ {-		if i != 0 {++	ticker := time.NewTicker(time.Duration(tickerInterval) * time.Second)+	for range ticker.C {+		if n*tickerInterval > timeout {+			ticker.Stop()+			break+		}++		if n != 0 { 			fmt.Fprint(os.Stderr, ".") 			if !printNewLineSet { 				printNewLineSet = true 				defer fmt.Fprintln(os.Stderr) 			} 		} -		deployment, err := apps.GetDeployment(appID, deploymentID)-		if err == nil {-			failCount = 0-		} else {-			// Allow for transient API failures-			failCount++-			if failCount >= maxAPIFailures {-				return nil, err+		if deploymentID == "" {+			app, err := apps.Get(appID)+			if err != nil {+				return fmt.Errorf(("Error trying to read app deployment state: " + err.Error())) 			}-		} -		if deployment == nil {-			time.Sleep(1 * time.Second)-			continue-		}+			if app.InProgressDeployment != nil {+				deploymentID = app.InProgressDeployment.ID+			}+		} else {+			deployment, err := apps.GetDeployment(appID, deploymentID)+			if err != nil {+				ticker.Stop()+				return fmt.Errorf(fmt.Sprintf("Error trying to read app deployment state: " + err.Error()))
				return err

Same thing here. Also one thing to note is that you don't need to use fmt.Sprintf with fmt.Errorf, you could just use:

return fmt.Errorf("Error trying to read app deployment state: %s", err.Error())
danaelhe

comment created time in 3 days

Pull request review commentdigitalocean/doctl

adding the --wait flag to the apps create command

 func RunAppsCreateDeployment(c *CmdConfig) error { 	return c.Display(displayers.Deployments{deployment}) } -// waitForAppDeploymentRunning waits for a app deployment to be running.-func waitForAppDeploymentRunning(apps do.AppsService, appID string, deploymentID string) (*godo.Deployment, error) {-	failCount := 0+func waitForActiveDeployment(apps do.AppsService, appID string, deploymentID string) error {+	tickerInterval := 10 //10s+	timeout := 1800      //1800s, 30min+	n := 0 	printNewLineSet := false-	for i := 0; ; i++ {-		if i != 0 {++	ticker := time.NewTicker(time.Duration(tickerInterval) * time.Second)+	for range ticker.C {+		if n*tickerInterval > timeout {+			ticker.Stop()+			break+		}++		if n != 0 { 			fmt.Fprint(os.Stderr, ".") 			if !printNewLineSet { 				printNewLineSet = true 				defer fmt.Fprintln(os.Stderr) 			} 		} -		deployment, err := apps.GetDeployment(appID, deploymentID)-		if err == nil {-			failCount = 0-		} else {-			// Allow for transient API failures-			failCount++-			if failCount >= maxAPIFailures {-				return nil, err+		if deploymentID == "" {+			app, err := apps.Get(appID)+			if err != nil {+				return fmt.Errorf(("Error trying to read app deployment state: " + err.Error()))
				return err

We could just return the err directly here and handle the messaging further up the stack. Looking at how the error is checked in RunAppsCreateDeployment, the output becomes a bit repetitive:

 App deployment couldn't enter `running` state: Error trying to read app deployment state: <actual error>
danaelhe

comment created time in 3 days

Pull request review commentdigitalocean/doctl

adding the --wait flag to the apps create command

 func TestRunAppsDelete(t *testing.T) { 	}) } -func TestRunAppsCreateDeployment(t *testing.T) {-	withTestClient(t, func(config *CmdConfig, tm *tcMocks) {-		appID := uuid.New().String()-		deployment := &godo.Deployment{-			ID:   uuid.New().String(),-			Spec: &testAppSpec,-			Services: []*godo.DeploymentService{{-				Name:             "service",-				SourceCommitHash: "commit",-			}},-			Cause: "Manual",-			Progress: &godo.DeploymentProgress{-				PendingSteps: 1,-				RunningSteps: 0,-				SuccessSteps: 0,-				ErrorSteps:   0,-				TotalSteps:   1,--				Steps: []*godo.DeploymentProgressStep{{-					Name:      "name",-					Status:    "pending",-					StartedAt: time.Now(),-				}},-			},-			CreatedAt: time.Now(),-			UpdatedAt: time.Now(),-		}--		tm.apps.EXPECT().CreateDeployment(appID, true).Times(1).Return(deployment, nil)--		config.Args = append(config.Args, appID)-		config.Doit.Set(config.NS, doctl.ArgAppForceRebuild, true)--		err := RunAppsCreateDeployment(config)-		require.NoError(t, err)-	})-}--func TestRunAppsCreateDeploymentWithWait(t *testing.T) {-	withTestClient(t, func(config *CmdConfig, tm *tcMocks) {-		appID := uuid.New().String()-		deployment := &godo.Deployment{-			ID:   uuid.New().String(),-			Spec: &testAppSpec,-			Services: []*godo.DeploymentService{{-				Name:             "service",-				SourceCommitHash: "commit",-			}},-			Cause: "Manual",-			Phase: godo.DeploymentPhase_PendingDeploy,-			Progress: &godo.DeploymentProgress{-				PendingSteps: 1,-				RunningSteps: 0,-				SuccessSteps: 0,-				ErrorSteps:   0,-				TotalSteps:   1,--				Steps: []*godo.DeploymentProgressStep{{-					Name:      "name",-					Status:    "pending",-					StartedAt: time.Now(),-				}},-			},-			CreatedAt: time.Now(),-			UpdatedAt: time.Now(),-		}-		activeDeployment := &godo.Deployment{-			ID:   uuid.New().String(),-			Spec: &testAppSpec,-			Services: []*godo.DeploymentService{{-				Name:             "service",-				SourceCommitHash: "commit",-			}},-			Cause: "Manual",-			Phase: godo.DeploymentPhase_Active,-			Progress: &godo.DeploymentProgress{-				PendingSteps: 1,-				RunningSteps: 0,-				SuccessSteps: 0,-				ErrorSteps:   0,-				TotalSteps:   1,

Can't add a code suggestion to deleted code apparently, but this should still pass. Just need to update the response to have: SuccessSteps: 1, due to the change in how we determine a successfully finished deployment,

danaelhe

comment created time in 3 days

Pull request review commentdigitalocean/doctl

adding the --wait flag to the apps create command

 func TestRunAppsDelete(t *testing.T) { 	}) } -func TestRunAppsCreateDeployment(t *testing.T) {-	withTestClient(t, func(config *CmdConfig, tm *tcMocks) {-		appID := uuid.New().String()-		deployment := &godo.Deployment{-			ID:   uuid.New().String(),-			Spec: &testAppSpec,-			Services: []*godo.DeploymentService{{-				Name:             "service",-				SourceCommitHash: "commit",-			}},-			Cause: "Manual",-			Progress: &godo.DeploymentProgress{-				PendingSteps: 1,-				RunningSteps: 0,-				SuccessSteps: 0,-				ErrorSteps:   0,-				TotalSteps:   1,--				Steps: []*godo.DeploymentProgressStep{{-					Name:      "name",-					Status:    "pending",-					StartedAt: time.Now(),-				}},-			},-			CreatedAt: time.Now(),-			UpdatedAt: time.Now(),-		}--		tm.apps.EXPECT().CreateDeployment(appID, true).Times(1).Return(deployment, nil)--		config.Args = append(config.Args, appID)-		config.Doit.Set(config.NS, doctl.ArgAppForceRebuild, true)--		err := RunAppsCreateDeployment(config)-		require.NoError(t, err)-	})-}--func TestRunAppsCreateDeploymentWithWait(t *testing.T) {-	withTestClient(t, func(config *CmdConfig, tm *tcMocks) {-		appID := uuid.New().String()-		deployment := &godo.Deployment{-			ID:   uuid.New().String(),-			Spec: &testAppSpec,-			Services: []*godo.DeploymentService{{-				Name:             "service",-				SourceCommitHash: "commit",-			}},-			Cause: "Manual",-			Phase: godo.DeploymentPhase_PendingDeploy,-			Progress: &godo.DeploymentProgress{-				PendingSteps: 1,-				RunningSteps: 0,-				SuccessSteps: 0,-				ErrorSteps:   0,-				TotalSteps:   1,--				Steps: []*godo.DeploymentProgressStep{{-					Name:      "name",-					Status:    "pending",-					StartedAt: time.Now(),-				}},-			},-			CreatedAt: time.Now(),-			UpdatedAt: time.Now(),-		}-		activeDeployment := &godo.Deployment{-			ID:   uuid.New().String(),-			Spec: &testAppSpec,-			Services: []*godo.DeploymentService{{-				Name:             "service",-				SourceCommitHash: "commit",-			}},-			Cause: "Manual",-			Phase: godo.DeploymentPhase_Active,-			Progress: &godo.DeploymentProgress{-				PendingSteps: 1,-				RunningSteps: 0,-				SuccessSteps: 0,-				ErrorSteps:   0,-				TotalSteps:   1,--				Steps: []*godo.DeploymentProgressStep{{-					Name:      "name",-					Status:    "pending",-					StartedAt: time.Now(),-				}},-			},-			CreatedAt: time.Now(),-			UpdatedAt: time.Now(),-		}--		tm.apps.EXPECT().CreateDeployment(appID, false).Times(1).Return(deployment, nil)-		tm.apps.EXPECT().GetDeployment(appID, deployment.ID).Times(1).Return(activeDeployment, nil)

This would now be expected to be called twice:

tm.apps.EXPECT().GetDeployment(appID, deployment.ID).Times(2).Return(activeDeployment, nil)
danaelhe

comment created time in 3 days

Pull request review commentdigitalocean/doctl

adding the --wait flag to the apps create command

 func TestRunAppsDelete(t *testing.T) { 	}) } -func TestRunAppsCreateDeployment(t *testing.T) {

These changes don't seem to effect this test. Seems to still pass for me. Probably worth keeping it around even with the new integration test.

danaelhe

comment created time in 3 days

pull request commentdigitalocean/doctl

adding the --wait flag to the apps create command

I'm never sure if I should commit the changes made to the vendor files. Is this kosher?

Committing the changes to the vendor files is correct if you are intending to update the dependencies. Unless that's needed for this PR, I'd rather not.

I agree, I'll keep it out of scope for this PR and revert the changes.

danaelhe

comment created time in 3 days

push eventdigitalocean/doctl

Dana Elhertani

commit sha c291f6ac2dbcd3a4af875e9045f84ae161542149

removed TestRunAppsCreateDeploymentWithWait bc there's integration test coverage

view details

push time in 3 days

push eventdigitalocean/doctl

Dana Elhertani

commit sha a977598a3b2e63a3c5d699fd0a5f9270d115da8a

Revert "replaced ticker with for loop (thanks @bentranter)" This reverts commit 620dee44d3f29e1c77f0aba2b123622bf0143335.

view details

push time in 3 days

pull request commentdigitalocean/doctl

adding the --wait flag to the apps create command

I'm never sure if I should commit the changes made to the vendor files. Is this kosher?

Committing the changes to the vendor files is correct if you are intending to update the dependencies. Unless that's needed for this PR, I'd rather not.

danaelhe

comment created time in 3 days