Skip to content

Conversation

@yoannmoinet
Copy link
Member

@yoannmoinet yoannmoinet commented Dec 15, 2025

What and why?

  • Add an alpha apps plugin that zips built assets and uploads them to Datadog storage with optional dry-run and identifier override.
  • Extend core helpers with gzipped multipart uploads, origin headers, repository URL sanitization, and APPS intake env overrides to support the new workflow.
  • Wire the apps plugin into the factory and published bundler packages while keeping alpha plugins hidden from the root README.
  • Align sourcemap uploads and git timing with the new helpers and logging style.

How?

  • Collect bundler outputs plus optional include globs, dedupe them, archive with JSZip, and upload via the apps-intake endpoint with retries/dry-run summaries.
  • Derive app identifiers from package.json or git remote (with sensitive info stripped)
  • Allow full intake URL overrides via DATADOG_APPS_INTAKE_URL/DATADOG_SITE.
  • Introduce createGzipFormData and getOriginHeaders for compressed multipart requests and reuse them in sourcemap sending.
  • Export the new options/types across bundler plugins and adjust README generation to skip packages marked hideFromRootReadme.

@yoannmoinet yoannmoinet changed the title Yoann/apps plugin Apps plugin Dec 15, 2025
@datadog-official
Copy link

datadog-official bot commented Dec 15, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: bfccddc | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@yoannmoinet yoannmoinet marked this pull request as ready for review December 16, 2025 22:15
log.error(red('Unable to determine the git remote to compute the app identifier.'));
}

const identifier = buildIdentifier(repository, name);

Choose a reason for hiding this comment

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

I wonder if we should be worried about conflicts when the repository url isn't defined and the package name conflicts across two apps. I don't think it needs to be solved now but maybe we should think through this scenario in one of the RFCs.

Copy link
Member Author

@yoannmoinet yoannmoinet Jan 5, 2026

Choose a reason for hiding this comment

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

Very good point, we could make it mandatory to have a remote url.
At least for now.

const { errors: uploadErrors, warnings: uploadWarnings } = await uploadArchive(
archive,
{
apiKey: context.auth.apiKey,

Choose a reason for hiding this comment

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

Separately from the PR we should think through how we want to handle auth. I kind of like how dd-auth works.

Copy link
Member Author

@yoannmoinet yoannmoinet Jan 5, 2026

Choose a reason for hiding this comment

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

How does dd-auth work? (make it through DM in slack)

yoannmoinet and others added 5 commits January 23, 2026 16:36
- Change form data fields from 'identifier'/'archive' to 'name'/'bundle'
- Add name field to UploadContext type
- Add name configuration option to AppsOptions
- Update validation to handle name field

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Change resolveIdentifier to return { identifier, name } object
- Update main plugin to use config values with fallback to resolved values
- Only call resolveIdentifier if either value is missing
- Update error messages to mention both identifier and name

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
yoannmoinet and others added 4 commits January 23, 2026 17:44
- Update test context to include name field
- Change assertions from identifier/archive to name/bundle
- Update test description to reflect new field names

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Update tests to expect { identifier, name } object
- Add assertions for both identifier and name fields
- Verify MD5 hash format for identifier and name value

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add 6 new test cases covering different name option scenarios:
- Use name from config when provided (overrides resolved value)
- Use identifier from config when provided (overrides resolved value)
- Use both identifier and name from config (skips resolution)
- Fail when only identifier provided but name cannot be resolved
- Fail when only name provided but identifier cannot be resolved
- Update integration test to include both identifier and name

This ensures proper handling of all configuration combinations and
validates that config values take precedence over resolved values.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add apps.name section to table of contents
- Include name field in TypeScript configuration example
- Document apps.name option with default value and usage
- Explain when to use static name vs package.json name

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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.

3 participants