Skip to content

Migrate e2e admin-API curl calls to swctl admin commands#13889

Merged
wu-sheng merged 2 commits into
masterfrom
e2e/swctl-admin-migration
Jun 4, 2026
Merged

Migrate e2e admin-API curl calls to swctl admin commands#13889
wu-sheng merged 2 commits into
masterfrom
e2e/swctl-admin-migration

Conversation

@wu-sheng
Copy link
Copy Markdown
Member

@wu-sheng wu-sheng commented Jun 3, 2026

Replace raw curl interactions with the OAP admin-server REST host (port 17128)
across the e2e suite with the new swctl admin ... command tree
(skywalking-cli #228, commit b447211):

  • runtime-rule flows (mal / lal / cluster) → swctl admin runtime-rule ...
  • dsl-debug flows (oal / mal / lal-block / lal-statement) → swctl admin dsl-debug ...
  • ui-management → swctl admin ui-template ...
  • storage inspect / config(dump, ttl) → swctl admin inspect|config ...

--display json/yaml keeps response bodies parseable by the existing jq/yq
assertions, so the assertions are unchanged for pass-through endpoints. The
runtime-rule negative paths assert the CLI's typed error envelope
(HTTP <code> (<applyStatus>)) instead of curl -w '%{http_code}'.
config-dump.yml is regenerated as the JSON string-map that admin config dump
returns under Accept: application/json. SW_CTL_COMMIT is bumped to the
admin-capable commit. Non-admin curls (BanyanDB /api/v1/measure/data probe,
:1234 self-telemetry, alarm webhook) are intentionally kept.

  • If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
  • Update the CHANGES log.

Replace raw curl interactions with the OAP admin-server REST host (port 17128)
across the e2e suite with the new 'swctl admin ...' command tree
(skywalking-cli #228, commit b447211):

- runtime-rule flows (mal/lal/cluster) -> swctl admin runtime-rule ...
- dsl-debug flows (oal/mal/lal-block/lal-statement) -> swctl admin dsl-debug ...
- ui-management -> swctl admin ui-template ...
- storage inspect/config(dump,ttl) -> swctl admin inspect|config ...

--display json/yaml keeps response bodies parseable by the existing jq/yq
assertions; runtime-rule negative paths assert the CLI's typed error envelope
(HTTP <code> (<applyStatus>)). config-dump.yml is regenerated as the JSON
string-map that 'admin config dump' returns. Bumps SW_CTL_COMMIT to the
admin-capable commit. Non-admin curls (BanyanDB probe, self-telemetry, alarm
webhook) are intentionally kept.
@wu-sheng wu-sheng added the test Test requirements about performance, feature or before release. label Jun 3, 2026
@wu-sheng wu-sheng added this to the 11.0.0 milestone Jun 3, 2026
…ctl install)

- inspect cases: the CLI marshals typed structs through yaml.v2 (json tags
  ignored -> lowercased keys scopeid/entityid/mqeentity), which would not match
  the existing fixtures (scopeId/entityId/mqeEntity). Use '--display json | yq -P'
  so the json tags are honored and the fixtures stay unchanged.
- runtime-rule/cluster and ui-management/banyandb setups now install swctl: both
  cases newly depend on it (the flows/cases no longer use curl), but their setup
  only installed jq / yq, so a clean e2e shell would hit 'swctl: command not found'.
@wu-sheng wu-sheng requested a review from wankai123 June 4, 2026 00:17
@wu-sheng wu-sheng merged commit 8962480 into master Jun 4, 2026
1070 of 1080 checks passed
@wu-sheng wu-sheng deleted the e2e/swctl-admin-migration branch June 4, 2026 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Test requirements about performance, feature or before release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants