Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 08 19:37
    sebastian-burlacu opened #1534
  • May 13 09:10
    1divya commented #1428
  • May 13 09:04
    1divya commented #1428
  • May 13 09:01
    1divya commented #1428
  • May 05 20:23
    pdause commented #1533
  • Apr 16 17:34
    caeril opened #1533
  • Apr 04 11:42
    alexgeek commented #1528
  • Apr 03 16:19
    alexgeek commented #1528
  • Apr 03 16:19
    alexgeek commented #1528
  • Mar 30 19:15
    bejayoharen opened #1532
  • Mar 27 16:47
    notzippy closed #1531
  • Mar 27 16:47
    notzippy commented #1531
  • Mar 27 16:46
    notzippy closed #1528
  • Mar 27 16:46
    notzippy commented #1528
  • Mar 27 16:39
    notzippy closed #1529
  • Mar 25 23:02
    Dmdv opened #1531
  • Mar 24 12:19
    jsdecena commented #1528
  • Mar 24 08:48
    ptman commented #1528
  • Mar 24 02:06
    jsdecena commented #1528
  • Mar 12 20:02
    notzippy commented #1373
Paul
@ptman:kapsi.fi
[m]
docker can autostart
systemd can autostart
supervisord is an option
use whichever you find easiest
shadtaylor
@shadtaylor
got it thansk
thanks
Garrett Flanders
@flanyanero
I would like to use revel to implement subdomain level routing. But it appears as though I can't create multiple "routers" to handle that (like labstack Echo does). Does anyone know of an example or how to do that?
would be great to finally get this added
Steve
@notzippy
@ericmoon This is fixed now
Steve
@notzippy
Issue was that go 1.16 actively removes packages from go.mod if they are not in the source tree. Not really a fan of this but what can you do ?
The fix was to add a dependency to the missing module in the init.go file like
import (
    "github.com/revel/revel"
    _ "github.com/revel/modules"

)
Caeril the Cowardly
@caeril
New revel project doesn't want to run on account of a module reference to github.com/myesui/uuid which doesn't exist
Caeril the Cowardly
@caeril
IS there any straightforward way of suppressing this "Downloading related packages" boot procedure?
Paul
@ptman:kapsi.fi
[m]
@caeril don't run from source
Make a build
Lasse Martin Jakobsen
@Pungyeon

Hello everyone, I'm completely new here and also fairly new to Revel in general. However, I've stumbled across some rather strange behaviour, which I was hoping that you could perhaps explain for me. I am running the revel test -a {PATH} command, using Revel cmd 1.0.0. However, due to working with legacy code, I have to use GO111MODULES=off. This seems to work for me fine locally, but in our Jenkins CI, something is going very wrong.

I get an initial error, which simply states that a package failed to import:

11:15:53 Downloading related packages ...ERROR 09:15:53 command_config.go:250: Failed to import package                 error="exit status 1" gopath=/var/lib/jenkins/workspace/go-api-pull-requests/go_upgrade_revel GO-ROOT=/opt/go1.14.9/go output="go: modules disabled by GO111MODULE=off; see 'go help modules'\n"

Please note the go-path gopath=/var/lib/jenkins/workspace/go-api-pull-requests/go_upgrade_revel. Immediately after this, I get the following log messages and errors:

11:15:53 WARN  09:15:53  build.go:216: Detected missing packages, importing them packages=1 
11:15:53 ERROR 09:15:53  build.go:222: Failed to import                         package=github.com/COMPANY/go-api/app/tmp 
11:15:53 ERROR 09:15:53  build.go:396: Failed to parse build errors             error="can't load package: package github.com/COMPANY/go-api/app/tmp: cannot find package \"github.com/COMPANY/go-api/app/tmp\" in any of:\n\t/opt/go1.14.9/go/src/github.com/COMPANY/go-api/app/tmp (from $GOROOT)\n\t/var/lib/jenkins/go/src/github.com/COMPANY/go-api/app/tmp (from $GOPATH)\n" 
11:15:53 ERROR 09:15:53  revel.go:107: Unable to execute                        error="Error building: [error Go Compilation Error: See console for build error.]"

In the above error message, the error details specify that it cannot find the app/tmp folder, in the GOPATH /var/lib/jenkins/go/src/github.com/COMPANY/go-api , which is not the GOPATH specified previously.

Where is revel getting this GOPATH from and is there a way of ensuring that this GOPATH is the same as the one logged in the first log message?

Thanks in advance!

Lasse Martin Jakobsen
@Pungyeon
It turns out this was a rather strange problem. Because we are migrating to go modules, we already have a go.mod file. The CMD seems to use this as indication for the configuration property Vendored. For some reason, this caused the build cmd to use the wrong GOPATH, not exactly sure why... though?
Caeril the Cowardly
@caeril

@ptman:kapsi.fi

@caeril don't run from source

I mean sure, I can build on every change, but this slows down development considerably. Shouldn't revel run just work?

Oh wait no, build also results in the same error.
mycroft_
@mycroft_:matrix.org
[m]

Hi everyone, I am testing out Swagger for our project using Revel framework. Revel constantly rebuilds the app for every changes (one of them is main.go). I'd like to ask if there's a way to modify the content of main.go?? I've been adding annotations in the template of main.go but it doesn't generates on rebuild.

Thank you in advance!

Paul
@ptman:kapsi.fi
[m]
revel clean will remove it
and then revel run will regenerate it
mycroft_
@mycroft_:matrix.org
[m]
Got it! Thank you.
Laur1nMartins
@Laur1nMartins
Hello :) Has anyone used revel as a microservice with multiple different revel programs? If yes what was used to manage the instances?
Paul
@ptman:kapsi.fi
[m]
I didn't
I think microservices don't really make much sense
we only use them for optional and custom integrations
in which case it's so simple that revel wasn't needed and I just did a simple net/http with json en/decoding
but for managing services, I recommend docker and systemd
if you get to a scale where that isn't convenient, look at k8s
Laur1nMartins
@Laur1nMartins
Scale is not the issue. My problem is uptime. I wanted to reduce the probability that a single error in an external module crashes the whole monolithic revel server. Sure systemd will restart it but having a separate program for each module seems like a good idea in that regard?
Paul
@ptman:kapsi.fi
[m]
you mean like a C segfault?
because otherwise you must prevent errors with panic/recover and handling errors
Laur1nMartins
@Laur1nMartins
In my two years of using go and revel i had a few things that crashed the whole server. Mostly packages i use like pdfcpu.
Paul
@ptman:kapsi.fi
[m]
weird
for us it has been solid for 5 years
oh sure, goroutines panic
but never the whole thing
Laur1nMartins
@Laur1nMartins
I did not intend to say that this is revels fault. Mostly is was me not using bounds of arrays correct or like i said external libs that crash the whole server.
Paul
@ptman:kapsi.fi
[m]
sure
you can also spawn a pdfcpu process as a separate process
Laur1nMartins
@Laur1nMartins
Also i wanted to enable others to integrate stuff into the microservice manager that are not revel applications or even go applications. If anyone has experience with this please let me know :) even just to tell me why it is not a good idea.
Paul
@ptman:kapsi.fi
[m]
read/write from stdin/stdout
if it crashes, you get an error
but I would probably write a minimal service using net/http