-
Notifications
You must be signed in to change notification settings - Fork 23
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
REALMC-10870: deploy draft after making deps and hosting changes #224
Conversation
Pushing changes | ||
Deploying draft | ||
Deployment complete`, | ||
Pushing changes`, | ||
"An error occurred while uploading hosting assets: failed to add /404.html: something bad happened", | ||
"An error occurred while uploading hosting assets: failed to add /index.html: something bad happened", | ||
} { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that deployment waits for dependencies and hosting assets, the "Deploying draft" and "Deployment complete" message will not appear if an error occurs for either (dependencies or hosting assets).
Would a separate "Deployment failed" message be appropriate here instead? or is the error message enough by itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added Nick to this review as well to get his thoughts on this as well. Did you manage to figure out why this used to work properly some times?
internal/commands/push/command.go
Outdated
@@ -372,6 +367,16 @@ func (cmd *Command) Handler(profile *user.Profile, ui terminal.UI, clients cli.C | |||
} | |||
} | |||
|
|||
if len(appDiffs) > 0 || dependenciesDiffs.Len() > 0 && hostingDiffs.Size() > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if len(appDiffs) > 0 || dependenciesDiffs.Len() > 0 && hostingDiffs.Size() > 0 { | |
if len(appDiffs) > 0 || dependenciesDiffs.Len() > 0 || hostingDiffs.Size() > 0 { |
internal/commands/push/command.go
Outdated
@@ -266,31 +266,26 @@ func (cmd *Command) Handler(profile *user.Profile, ui terminal.UI, clients cli.C | |||
return nil | |||
} | |||
|
|||
if len(appDiffs) > 0 { | |||
var draft realm.AppDraft | |||
if len(appDiffs) > 0 || dependenciesDiffs.Len() > 0 && hostingDiffs.Size() > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was my bad, but we should change this to:
if len(appDiffs) > 0 || dependenciesDiffs.Len() > 0 && hostingDiffs.Size() > 0 { | |
if len(appDiffs) > 0 || dependenciesDiffs.Len() > 0 || hostingDiffs.Size() > 0 { |
@@ -807,9 +799,9 @@ Successfully pushed app up: eggcorn-abcde | |||
assert.Equal(t, `Determining changes | |||
Creating draft | |||
Pushing changes | |||
Installed dependencies | |||
Deploying draft | |||
Deployment complete |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we already have a test that confirms that the dependencies were properly deployed? In this test we just mock. the ImportDependenciesFn
function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this test verifies that the dependencies are deployed:
t.Run("should successfully import a zip node_modules archive", func(t *testing.T) { |
I was looking through the splunk logs to see why the command worked on dev and not on prod. I noticed that the order of calls to endpoints differed between the two as such: DEV: (dev splunk)
PROD: (prod splunk)
I'm not sure why they differ but it looks like dev deploys after dealing with dependencies/diff whereas prod deploys before. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just a minor thing from my end.
internal/commands/push/command.go
Outdated
@@ -266,31 +266,26 @@ func (cmd *Command) Handler(profile *user.Profile, ui terminal.UI, clients cli.C | |||
return nil | |||
} | |||
|
|||
if len(appDiffs) > 0 { | |||
var draft realm.AppDraft | |||
if len(appDiffs) > 0 || dependenciesDiffs.Len() > 0 || hostingDiffs.Size() > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized that at this point we already know that one of these is true since we'll return early on line 231 if this wasn't true. So there is no need for this if statement.
internal/commands/push/command.go
Outdated
@@ -372,6 +367,16 @@ func (cmd *Command) Handler(profile *user.Profile, ui terminal.UI, clients cli.C | |||
} | |||
} | |||
|
|||
if len(appDiffs) > 0 || dependenciesDiffs.Len() > 0 || hostingDiffs.Size() > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same goes for this if statement.
@jandersongo any updates on this? We'll want this issue fixed before releasing this project. |
Actually, something unusual is happening. Before thanksgiving, I tried to reproduce the error with @makesitgo but it was somehow resolved (the dependencies were properly showing up after pushing a new app)? I also contacted the user who filed the HELP ticker and they said, |
5cc98ba
to
2e262e2
Compare
Closing this ticket on account of successful manual testing