Skip to content

scripts/develop.sh first run #258

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

Closed
defelmnq opened this issue Dec 17, 2024 · 3 comments · Fixed by coder/coder#15903
Closed

scripts/develop.sh first run #258

defelmnq opened this issue Dec 17, 2024 · 3 comments · Fixed by coder/coder#15903
Labels
help wanted Extra attention is needed tech-debt

Comments

@defelmnq
Copy link

Problem

Currently, after creating a new workspace in the dogfood instance - the ./scripts/develop.sh script - allowing us to run coder in it - is not reliably working.

Config

I created a simple workspace :

  • Not Nix instance (still happens with Nix instances too.)

Logs

First try :

go: downloading github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475
go: downloading github.com/go-ini/ini v1.67.0
go: downloading github.com/charmbracelet/lipgloss v1.0.0
go: downloading github.com/charmbracelet/x/ansi v0.4.5
../../../../rbac/object_gen.go:1:1: expected 'package', found 'EOF'
../../../rbac/object_gen.go:1:1: expected 'package', found 'EOF'
prog.go:15:2: no required module provides package github.com/coder/coder/v2/coderd/database/pubsub: go.mod file not found in current directory or any parent directory; see 'go help modules'
prog.go:13:2: no required module provides package go.uber.org/mock/mockgen/model: go.mod file not found in current directory or any parent directory; see 'go help modules'
2024/12/17 15:26:32 Loading input failed: exit status 1
coderd/database/pubsub/psmock/doc.go:4: running "mockgen": exit status 1
make: *** [Makefile:599: coderd/database/pubsub/psmock/psmock.go] Error 1
make: *** Waiting for unfinished jobs....
# github.com/coder/coder/v2/coderd/rbac
coderd/rbac/object_gen.go:1:1: syntax error: package statement must be first
make: *** [Makefile:587: coderd/database/dump.sql] Error 1
coder@vincentdev-broken:~/coder$ 

Second try :

Faced this error - but still the process continued :

go: downloading golang.org/x/tools v0.28.0
go: downloading github.com/dlclark/regexp2 v1.11.4
go: downloading github.com/go-sourcemap/sourcemap v2.1.3+incompatible
go: downloading golang.org/x/sync v0.10.0
generate
2024/12/17 15:29:54 ERROR parsing package, suggest running 'go get tailscale.com/derp' where calling the go generator to include the referenced package. error="/home/coder/coder/codersdk/healthsdk/healthsdk.go:11:2: could not import tailscale.com/derp (invalid package name: \"\")" pkg=github.com/coder/coder/v2/codersdk/healthsdk directory=github.com/coder/coder/v2/codersdk/healthsdk
2024/12/17 15:29:54 ERROR parsing package, suggest running 'go get tailscale.com/net/netcheck' where calling the go generator to include the referenced package. error="/home/coder/coder/codersdk/healthsdk/healthsdk.go:12:2: could not import tailscale.com/net/netcheck (invalid package name: \"\")" pkg=github.com/coder/coder/v2/codersdk/healthsdk directory=github.com/coder/coder/v2/codersdk/healthsdk
2024/12/17 15:29:54 ERROR parsing package, suggest running 'go get tailscale.com/tailcfg' where calling the go generator to include the referenced package. error="/home/coder/coder/codersdk/healthsdk/healthsdk.go:13:2: could not import tailscale.com/tailcfg (invalid package name: \"\")" pkg=github.com/coder/coder/v2/codersdk/healthsdk directory=github.com/coder/coder/v2/codersdk/healthsdk
2024/12/17 15:29:54 ERROR parsing package, suggest running 'go get tailscale.com/net/interfaces' where calling the go generator to include the referenced package. error="/home/coder/coder/codersdk/healthsdk/interfaces.go:6:2: could not import tailscale.com/net/interfaces (invalid package name: \"\")" pkg=github.com/coder/coder/v2/codersdk/healthsdk directory=github.com/coder/coder/v2/codersdk/healthsdk
2024/12/17 15:29:55 ERROR failed to add enum list Experiments: node "Experiments" already exists
2024/12/17 15:29:55 ERROR failed to add enum list Entitlements: node "Entitlements" already exists
Formatted 1 file in 13ms. Fixed 1 file.
npm notice
npm notice New major version of npm available! 10.9.2 -> 11.0.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.0.0
npm notice To update run: npm install -g npm@11.0.0
npm notice
+ pnpm install 
Lockfile is up to date, resolution step is skipped
Packages: +1
+
Progress: resolved 1, reused 0, downloaded 1, added 1, done

And will eventually work and run. I also had situations where I had to restart another time.

@coder-labeler coder-labeler bot added help wanted Extra attention is needed tech-debt labels Dec 17, 2024
@Emyrk
Copy link
Member

Emyrk commented Dec 17, 2024

The second is fixed here: coder/coder#15899

@defelmnq
Copy link
Author

@Emyrk also shared that https://github.com/coder/coder/blame/a3cf00a96e1da232aa7980314e29e49067765c03/Makefile#L661 is probably something to investigate for the first one.

Emyrk added a commit to coder/coder that referenced this issue Dec 18, 2024
Closes coder/internal#258

---------

Co-authored-by: Cian Johnston <cian@coder.com>
@Emyrk
Copy link
Member

Emyrk commented Dec 18, 2024

@defelmnq yea, this problem is likely in a few spots.

We should do what @johnstcn suggested: coder/coder#15903 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed tech-debt
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants