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 docker-all timeout when run locally. #539

Closed
rilma opened this issue Apr 18, 2024 · 1 comment · Fixed by #540
Closed

make docker-all timeout when run locally. #539

rilma opened this issue Apr 18, 2024 · 1 comment · Fixed by #540
Labels

Comments

@rilma
Copy link
Contributor

rilma commented Apr 18, 2024

Description

  • Version: v2.14.0
  • Database: None
  • Operating System: Ubuntu 20.4 LTS

Steps To Reproduce

When make docker-all is invoked locally, it gets the following errors:

ERRO Running error: context loading failed: failed to load packages: timed out to load packages: context deadline exceeded 
ERRO Timeout exceeded: try increasing it by passing --timeout option

It looks like requires enabling --timeout flag in the make fix target.

Expected Behavior
make docker-all should complete satisfactorily in the local environment (executing go test implementation as part of make docker-all invocation).

@dossy
Copy link
Collaborator

dossy commented Apr 18, 2024

Since the lint rule already includes --timeout 5m when invoking golangci-lint, it probably needs to be included when invoking golangci-lint with --fix, too. 👍️

dossy pushed a commit that referenced this issue Apr 18, 2024
This PR aims for solving this
[issue](#539).
After launching `make docker-all` in local environment, the execution of
tests, as explained in README, is satisfactorily. Sharing snippet below:

```sh
WARN[0000] /workspaces/dbmate/docker-compose.yml: `version` is obsolete 
[+] Creating 7/0
 ✔ Container dbmate-clickhouse-1             Running                                                                                             0.0s 
 ✔ Container dbmate-bigquery-1               Running                                                                                             0.0s 
 ✔ Container dbmate-mysql-1                  Running                                                                                             0.0s 
 ✔ Container dbmate-zookeeper-1              Running                                                                                             0.0s 
 ✔ Container dbmate-postgres-1               Running                                                                                             0.0s 
 ✔ Container dbmate-clickhouse-cluster-01-1  Running                                                                                             0.0s 
 ✔ Container dbmate-clickhouse-cluster-02-1  Running                                                                                             0.0s 
golangci-lint run --fix --timeout 5m
rm -rf dist
go build -o dist/dbmate -tags netgo,osusergo,sqlite_omit_load_extension,sqlite_json -ldflags '-s -extldflags "-static"'  .
dist/dbmate -e CLICKHOUSE_TEST_URL wait
dist/dbmate -e MYSQL_TEST_URL wait
dist/dbmate -e POSTGRES_TEST_URL wait
go test -p 1 -tags netgo,osusergo,sqlite_omit_load_extension,sqlite_json -ldflags '-s -extldflags "-static"'  ./...
ok      github.com/amacneil/dbmate/v2   0.013s
ok      github.com/amacneil/dbmate/v2/pkg/dbmate        52.774s
ok      github.com/amacneil/dbmate/v2/pkg/dbutil        0.003s
ok      github.com/amacneil/dbmate/v2/pkg/driver/bigquery       2.810s
ok      github.com/amacneil/dbmate/v2/pkg/driver/clickhouse     10.232s
ok      github.com/amacneil/dbmate/v2/pkg/driver/mysql  4.892s
ok      github.com/amacneil/dbmate/v2/pkg/driver/postgres       47.109s
ok      github.com/amacneil/dbmate/v2/pkg/driver/sqlite 0.648s
```
@dossy dossy linked a pull request Apr 18, 2024 that will close this issue
@dossy dossy closed this as completed Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants