-
Notifications
You must be signed in to change notification settings - Fork 57
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
revert golang-http and keep golang-middleware #81
Conversation
Thank you for your contribution. unfortunately, one or more of your commits are missing the required "Signed-off-by:" statement. Signing off is part of the Developer Certificate of Origin (DCO) which is used by this project. Read the DCO and project contributing guide carefully, and amend your commits using the git CLI. Note that this does not require any cryptography, keys or special steps to be taken. 💡 Shall we fix this?This will only take a few moments. First, clone your fork and checkout this branch using the git CLI. Next, set up your real name and email address:
Finally, run one of these commands to add the "Signed-off-by" line to your commits. If you only have one commit so far then run: Check that the message has been added properly by running "git log". |
Thank you for your contribution. unfortunately, one or more of your commits are missing the required "Signed-off-by:" statement. Signing off is part of the Developer Certificate of Origin (DCO) which is used by this project. Read the DCO and project contributing guide carefully, and amend your commits using the git CLI. Note that this does not require any cryptography, keys or special steps to be taken. 💡 Shall we fix this?This will only take a few moments. First, clone your fork and checkout this branch using the git CLI. Next, set up your real name and email address:
Finally, run one of these commands to add the "Signed-off-by" line to your commits. If you only have one commit so far then run: Check that the message has been added properly by running "git log". |
@@ -2,4 +2,9 @@ module handler | |||
|
|||
go 1.18 | |||
|
|||
require github.com/openfaas/templates-sdk/go-http v0.0.0-20220408082716-5981c545cb03 |
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.
this part is copied from this repository times
happy to discuss this, if giving path makes download faster
@@ -32,7 +32,7 @@ RUN mkdir -p /go/src/handler/function/static | |||
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go test ./... -cover | |||
|
|||
WORKDIR /go/src/handler | |||
RUN CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} \ |
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.
removed CGO_ENABLED from here for consistency with other dockerfiles
template/golang-http/Dockerfile
Outdated
@@ -6,12 +6,11 @@ ARG BUILDPLATFORM | |||
ARG TARGETOS | |||
ARG TARGETARCH | |||
|
|||
RUN apk --no-cache add git | |||
RUN apk --no-cache add build-base |
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.
CGO_ENABLED = 1 doesn't build, added build-base
Thank you for your contribution. unfortunately, one or more of your commits are missing the required "Signed-off-by:" statement. Signing off is part of the Developer Certificate of Origin (DCO) which is used by this project. Read the DCO and project contributing guide carefully, and amend your commits using the git CLI. Note that this does not require any cryptography, keys or special steps to be taken. 💡 Shall we fix this?This will only take a few moments. First, clone your fork and checkout this branch using the git CLI. Next, set up your real name and email address:
Finally, run one of these commands to add the "Signed-off-by" line to your commits. If you only have one commit so far then run: Check that the message has been added properly by running "git log". |
Signed-off-by: F. Talha Altinel <talhaaltinel@hotmail.com> ensure up-to-date alpine images make no changes on go.work tidy go.mod put static dirs back in Dockerfile fallback to old cleanup_vendor_modulestxt shell script add build-base for CGO tidy up add git back Signed-off-by: F. Talha Altinel <talhaaltinel@hotmail.com>
replace handler/function => ./function | ||
|
||
require ( | ||
github.com/openfaas/templates-sdk v0.0.0-20200723092016-0ebf61253625 |
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 we want to use the current sha here instead of reverting this value, this keeps the template-sdk up-to-date
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.
yea makes perfect sense, only thing I was not sure about is the difference between 2020 and 2022 in this repository in terms of reliability. Will do the change
can be closed, no longer required, golang-http will be using the interface for the golang-HTTP template. build-base is no longer required due to https://docs.openfaas.com/cli/build/#10-apply-build-options |
Description
Keeping golang-http same as @LucasRoesler 's suggestion and reverting workspaces but keeping workspaces for golang-middlewares
How Has This Been Tested?
git clone https://github.com/LucasRoesler/golang-http-template-examples cd golang-http-template-examples rm go.work faas-cli template pull https://github.com/MrWormHole/golang-http-template faas-cli build
How are existing users impacted? What migration steps/scripts do we need?
examples no longer download dependencies from the internet after go mod vendor 👍
also added build base due to CGO_ENABLED=1 causing build failure
https://pkgs.alpinelinux.org/package/v3.3/main/x86/build-base
if this PR is accepted, it closes #74 @LucasRoesler @alexellis
Checklist:
I have:
git commit -s