Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[feat] Add synthetics plugin#153

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
yoannmoinet wants to merge19 commits intomaster
base:master
Choose a base branch
Loading
fromyoann/s8s-dev-server
Draft

Conversation

@yoannmoinet
Copy link
Member

@yoannmoinetyoannmoinet commentedMar 26, 2025
edited
Loading

Stacked on

Related to

What and why?

Add a Synthetics plugin.

It will be used in collaboration withdatadog-ci for a new "Build and test" workflow:

  1. Rundatadog-ci synthetics build-and-test (name TBD).
  2. datadog-ci will run the build command of the project passingBUILD_PLUGINS_S8S_PORT.
  3. build-plugins will recogniseBUILD_PLUGINS_S8S_PORT and will run a local dev server over theoutDir of the build, with a small api/_datadog-ci_/build-status fordatadog-ci to follow the build progression.
  4. build's complete.
  5. datadog-ci opens a tunnel.
  6. datadog-ci trigger a test batch using the local assets from the build through theresourceUrlSubstitutionRegexes configuration.

More details

The local server offers two routes (in addition to the file server over the out directory):

  1. /_datadog-ci_/build-status responding with:
{"status":"running"|"success"|"fail","outDir":"/..."// Absolute path of the build's outDir."publicPath":"/"// Assets' public path if available.}
  1. /_datadog-ci_/kill kills the server.

TODO

  • Add documentation fors8s.

@yoannmoinetyoannmoinet changed the base branch frommaster toyoann/move-dev-serverMarch 26, 2025 15:58
@yoannmoinetyoannmoinet marked this pull request as ready for reviewMarch 27, 2025 10:18
Copy link

CopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull Request Overview

This PR introduces a new Synthetics plugin that enables the local development server for build-time testing and integrates with datadog-ci for build status reporting.

  • Added Synthetics plugin implementation across various bundler plugins.
  • Updated exports and factory configuration to include SyntheticsTypes.
  • Introduced plugin validation, routes for build status and server shutdown, and comprehensive test coverage.

Reviewed Changes

Copilot reviewed 16 out of 20 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
packages/published/webpack-plugin/src/index.tsAdded SyntheticsTypes export in the plugin.
packages/published/vite-plugin/src/index.tsAdded SyntheticsTypes export in the plugin.
packages/published/rspack-plugin/src/index.tsAdded SyntheticsTypes export in the plugin.
packages/published/rollup-plugin/src/index.tsAdded SyntheticsTypes export in the plugin.
packages/published/esbuild-plugin/src/index.tsAdded SyntheticsTypes export in the plugin.
packages/plugins/synthetics/src/{validate,types,index,constants}.tsIntroduced core implementation for the new Synthetics plugin.
packages/plugins/synthetics/src/index.test.tsAdded tests validating server behavior and plugin initialization.
packages/plugins/synthetics/README.mdProvided documentation for the new Synthetics plugin.
packages/factory/src/index.tsUpdated factory exports and configuration to include the Synthetics plugin.
packages/core/src/types.tsExtended core types to support configuration for the Synthetics plugin.
README.mdUpdated root documentation to include Synthetics plugin guidelines.
Files not reviewed (4)
  • .github/CODEOWNERS: Language not supported
  • packages/factory/package.json: Language not supported
  • packages/plugins/synthetics/package.json: Language not supported
  • packages/plugins/synthetics/tsconfig.json: Language not supported
Comments suppressed due to low confidence (1)

packages/plugins/synthetics/src/index.ts:66

  • [nitpick] Multiple server shutdown calls (server.close, server.closeAllConnections, server.closeIdleConnections) occur in immediate succession, which may lead to unexpected behavior. Consider consolidating these calls or adding checks to ensure that the server shutdown process is idempotent.
server.close();

packages/plugins/custom-hooks@yoannmoinet

# Synthetics
packages/plugins/synthetics@yoannmoinet@etnbrd
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

You need to invite etienne I think:

image

yoannmoinet reacted with thumbs up emoji
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Good catch.
I'll wait for his review, see if I should instead maybe use a team (cc@etnbrd)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

You should definitely use the @DataDog/synthetics-ct team, indeed.

yoannmoinet reacted with thumbs up emoji
Copy link
Collaborator

@Ayc0Ayc0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM but i'm not versed in s8s

Copy link

@etnbrdetnbrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM, left a few questions, but nothing blocking.

Base automatically changed fromyoann/move-dev-server tomasterMarch 28, 2025 16:59
@yoannmoinet
Copy link
MemberAuthor

Putting this on hold for now.

We'll redesign a bit the feature to have the server part running ondatadog-ci's side instead ofbuild-plugins's.

While testing withweb-ui we noticed that handling sequential builds (or parallel ones even) would be very difficult to do from thebuild-plugins's PoV.

Instead, we'll havedatadog-ci run a server andbuild-plugins register its builds and reporting its status to it by calling the server's API.

Drarig29 reacted with thumbs up emoji

@yoannmoinetyoannmoinet marked this pull request as draftApril 8, 2025 08:54
@yoannmoinetyoannmoinet added the on-holdThe PR is on hold until further notice. labelMay 16, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@elbywanelbywanelbywan approved these changes

@Ayc0Ayc0Ayc0 approved these changes

+2 more reviewers

@Drarig29Drarig29Drarig29 left review comments

@etnbrdetnbrdetnbrd approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

on-holdThe PR is on hold until further notice.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@yoannmoinet@elbywan@etnbrd@Drarig29@Ayc0

[8]ページ先頭

©2009-2025 Movatter.jp