Skip to content

V1.3#51

Merged
xiangshen-dk merged 10 commits intoGoogleCloudPlatform:mainfrom
xiangshen-dk:v1.3
Mar 9, 2026
Merged

V1.3#51
xiangshen-dk merged 10 commits intoGoogleCloudPlatform:mainfrom
xiangshen-dk:v1.3

Conversation

@xiangshen-dk
Copy link
Copy Markdown
Collaborator

No description provided.

xiangshen-dk and others added 10 commits March 9, 2026 11:35
- Add 'annotations: true' to plugin.json
- Add proper plugin description
- Add annotations = {} to DataSource class
- Add 'OAuth Passthrough' auth type to authTypes array
- Add oauthPassThru and universeDomain fields to DataSourceOptionsExt
- Overhaul ConfigEditor with auth type selector dropdown
- Conditionally show ConnectionConfig for JWT/GCE only
- Add universe domain input field
- Add default project field (required for OAuth passthrough)
- Hide impersonation section for OAuth passthrough
- Show access token input only for accessToken auth type
- Update module.ts with DataSourceSecureJsonData type parameter
- Add testDatasource() override in datasource.ts to catch HTML error pages
- Add fetchError state and sanitizeFetchError helper in QueryEditor
- Wrap getProjects() with .catch() to display errors
- Show error banner in QueryEditor when fetch fails
…rojects pagination (backend)

- Rewrite cloudtrace/client.go:
  - Add universeDomain parameter to all client constructors
  - Add universeDomainOpts helper for universe domain support
  - Add NewClientWithPassThrough for OAuth browser credentials
  - Switch from REST v1 resourcemanager.ProjectsService to gRPC v3 ProjectsClient
  - Update ListProjects to use SearchProjects iterator for full pagination
  - Add rClient.Close() to Close method
- Update plugin.go:
  - Add oauthPassThrough and universeDomain fields to CloudTraceDatasource struct
  - Add OAuthPassThru, UniverseDomain to config struct
  - Add oauthPassThruAuthentication constant
  - Handle OAuth passthrough auth type (per-request client in QueryData/CheckHealth/CallResource)
  - Add sanitizeErrorMessage with htmlLikePattern regex for HTML error sanitization
  - Add CreateOauthClient method
  - Update query method to accept client parameter
  - Return proper HTTP 502 error responses in CallResource
  - Return CheckHealthResult errors instead of raw fmt.Errorf
- Add sanitizeErrorMessage tests (plain, HTML page, doctype, content-type, Go angle-brackets)
- Add cloud.google.com/go/resourcemanager dependency
- Replace @grafana/toolkit with modern webpack-based build setup
  (webpack, swc, eslint, jest, typescript)
- Add .config/ directory with webpack config, jest config, tsconfig,
  bundler utilities, type declarations, and jest mocks
- Add jest.config.js and jest-setup.js at project root
- Update package.json scripts: build/dev/test/lint now use webpack/jest
- Update tsconfig.json to extend .config/tsconfig.json
- Update engines to require Node >= 20
- Fresh yarn.lock with all new dependencies

This resolves the eslint-plugin-jsdoc engine compatibility error
that occurred with Node 22+.
- Upgrade Go version from 1.24 to 1.25.7 (matches logging plugin)
- Upgrade grafana-plugin-sdk-go from v0.274.0 to v0.290.0
- Update transitive dependencies (otel, grpc, protobuf, etc.)
- All tests pass
@xiangshen-dk xiangshen-dk merged commit 078f8e4 into GoogleCloudPlatform:main Mar 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant