Commit Graph
21 Commits
Author SHA1 Message Date
zhangwenjian 60db31e0e8 chore⬆️: go-admin-core v2.8.0 -> v2.10.0
Picks up two releases at once:

  - v2.9.0: app.Register normalizes Manifest.Requires the way it already
    normalized Code, so the dependency list stored in sys_app.requires is
    spelled the same way as the app codes beside it; and a version
    component beginning with '+' is reported as a signed component rather
    than as a build-metadata suffix.
  - v2.10.0: builds with Go 1.27, which this repository already declares,
    and fixes a %S verb in the listener's shutdown log.

All three modules move together: example/app-order requires core directly
and test/e2e-apporder does indirectly. No other requirement changes.
2026-09-24 18:14:51 +08:00
zhangwenjian 1169cb3e87 chore⬆️: build with Go 1.27
govulncheck reports seven standard-library vulnerabilities against go1.26.5
that this code actually reaches, and none against go1.27.1.

It also clears the way for the next go-admin-core release, which declares
go 1.27.1: a module cannot require a dependency whose language version is
newer than its own. Doing it in its own commit keeps that upgrade to a
one-line dependency bump.

All three modules in the tree move together. test/e2e-apporder requires the
main module, so leaving it behind fails the moment the main module declares a
newer version - "updates to go.mod needed", before a test runs.
example/app-order only requires go-admin-core and would still have resolved,
but it was declaring 1.25.13, two releases back and out of support.

The workflows pin the Go version explicitly instead of reading go.mod, and
the four READMEs state it under environmental requirements, so those move
with it too.

No dependency changes - go mod tidy leaves every go.sum untouched.
2026-09-23 17:25:51 +08:00
zhangwenjian 1f56b956d2 test✅: build the end-to-end binary once, and assert from one list
Three tests each called newEnv, and newEnv built the binary, so the same
binary was linked three times - about 17 seconds of the run, measured. A
binary is read-only and there is nothing to isolate between tests; each test
still gets its own directory and its own database. The package now builds it
on the first test that needs one and removes it in TestMain. The suite goes
from 39 seconds to 9.

The three assertion blocks listed the same six queries, two or three times
each, differing only in the counts expected - so renaming a table meant
finding three places. They now share one list, with a flag for the uninstall's
"all of them at zero". The reinstall check gets stronger on the way past: it
was three of the six and is now all six.

The per-call sql.Open in count and exec stays. It looks like waste and is not:
the binary under test writes the same file, and a connection held open across
a run of it is a second writer for nothing. The shared part is factored out;
the opening is still per call, and the comment now says why.
2026-09-11 08:21:36 +08:00
zhangwenjian 3a5afeb518 test✅: install and uninstall the example application end to end
Everything under `migrate install` was covered with an injected engine and a
hand-built schema, which is where the shapes belong. What none of it could
catch is the wiring: whether an application's init() reaches both registries,
whether the installer finds a manifest through app.Snapshot, whether the
seeder writes what the uninstaller goes looking for, and whether the command
exits non-zero when a migration fails - which a deployment reads to decide
whether to start the new version.

This builds a go-admin binary with the example application linked in, migrates
a real database with it, and drives the whole sequence: framework migrations
only, install, install again, put a row in the application's own table,
uninstall, reinstall.

It lives in its own module. A tagged import in the main module would still be
resolved by `go mod tidy`, which considers every build tag and would go
looking for github.com/go-admin-team/example-app-order on the network - a
repository that does not exist, because the example is a directory inside this
one. That was checked rather than assumed: tidy fails there with "Repository
not found". A build tag of `ignore` is skipped by tidy but cannot be turned on
either, because the standard library uses it for files that are not meant to
build at all. A separate module with replace directives is invisible to the
main module's tidy, its build, its tests and checksilent, and needs no
go.work.

Three degradations turn it red: the example application not registering a
manifest, the uninstall not clearing sys_migration - where the reinstall then
seeds nothing and the assertion reads "menus = 0, want 4" - and the seeder not
recording its grants, where the uninstall then leaves every policy behind.
2026-09-09 16:40:15 +08:00
zhangwenjian ed74623a73 test✅: add an end-to-end load test harness
Skipped unless GOADMIN_BENCH_ADDR points at a running server, so `go test
./...` is unaffected.

Reports latency percentiles rather than an average, which is what capacity
planning needs, and a status-code distribution - that last part is how the rate
limiter's 200-on-rejection was found, since throughput alone looked excellent
while nothing reached a handler.

Includes a routing-floor control case. When a business endpoint matches it, the
measurement has stopped describing the endpoint and started describing the
transport, or the load generator when both share a machine.
2026-08-28 19:42:38 +08:00
linwenxiang 25d8364bf4 修改,兼容go-admin sdk方案 2021-03-09 19:12:49 +08:00
zhangwenjian fa07a57d22 feat : update actions gen 2020-09-10 02:14:48 +08:00
zhangwenjian c69a7d9fd9 feat: format reference 2020-08-28 00:02:53 +08:00
zhangwenjian 8c554d7ee7 clear:formatting code 2020-07-23 12:03:17 +08:00
zhangwenjian fe1ceb4332 fix:Fix the previous page components '/' 2020-07-18 14:22:14 +08:00
wenjianzhang 8a1614f64d feat:Extraction of configuration parameters 2020-07-06 13:53:15 +08:00
zhangwenjian b77f4b5a1b feat: add global & logger 2020-06-19 22:09:49 +08:00
zhangwenjian 7db16d04dd fix[models.Response]: fixed models.Response Invalid definition (#118) 2020-06-12 00:13:33 +08:00
zhangwenjian 5374394cfd fix[table.TableName]: fixed table.TableName to table.TBName 2020-06-11 15:55:11 +08:00
zhangwenjian aee307dfa0 Ignore error validation 2020-05-17 00:27:19 +08:00
zhangwenjian 8faff5384f 添加js模板,页面模板,去掉数据库数据初始化,去掉sql文件中没用语句 2020-05-01 14:25:14 +08:00
zhangwenjian 1df55e75e5 update 2020-04-13 00:30:58 +08:00
wenjianzhang cbfe9af070 Merge branch 'master' into dev 2020-04-01 15:05:17 +08:00
zhangwenjian 4bb5c883f6 gen 2020-04-01 14:39:47 +08:00
zhangwenjian b32d3dae85 update 2020-03-23 23:49:37 +08:00
zhangwenjian e027e6a259 update project path 2020-03-18 23:09:37 +08:00