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

Make sure that we always fetch latest commit sha #175

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

pawelbeza
Copy link
Contributor

When we update the service definition we don't want to copy sha from the previous deployment but rather fetch the latest one. For that we need to zero git sha in deployment definiton which will trigger fetching latest change.

@@ -0,0 +1,9 @@
package koyeb
Copy link
Contributor Author

Choose a reason for hiding this comment

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

normally would call utils but just following convention of one large package

@@ -165,6 +165,11 @@ $> koyeb service update myapp/myservice --env PORT=8001 --env '!DEBUG'`,
updateDef = latestDeploy.GetDeployments()[0].Definition
}

// zero the sha to make sure that the latest sha is fetched
if updateDef.Git != nil {
updateDef.Git.Sha = AsPointer("")
Copy link
Contributor

Choose a reason for hiding this comment

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

instead of the utils package, can you use koyeb.PtrString?

@pawelbeza pawelbeza force-pushed the pawel/always-fetch-latest-commit branch from f1a6fe3 to 29fe8db Compare January 15, 2024 16:51
When we update the service definition we don't want to copy sha from
the previous deployment but rather fetch the latest one. For that
we need to zero git sha in deployment definiton which will trigger
fetching latest change.
@pawelbeza pawelbeza force-pushed the pawel/always-fetch-latest-commit branch from 29fe8db to 927b475 Compare January 15, 2024 16:52
@brmzkw brmzkw merged commit b60af67 into master Jan 15, 2024
2 checks passed
@brmzkw brmzkw deleted the pawel/always-fetch-latest-commit branch January 15, 2024 16:55
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