-
Notifications
You must be signed in to change notification settings - Fork 8
Apps plugin #254
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Apps plugin #254
Conversation
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🔗 Commit SHA: bfccddc | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
1cae7b3 to
054f233
Compare
| log.error(red('Unable to determine the git remote to compute the app identifier.')); | ||
| } | ||
|
|
||
| const identifier = buildIdentifier(repository, name); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
- defaultHeaders - createGzipFormData
fc4fabe to
c8d4f25
Compare
- 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>
- 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>
What and why?
appsplugin that zips built assets and uploads them to Datadog storage with optional dry-run and identifier override.appsplugin into the factory and published bundler packages while keeping alpha plugins hidden from the root README.How?
package.jsonor git remote (with sensitive info stripped)DATADOG_APPS_INTAKE_URL/DATADOG_SITE.createGzipFormDataandgetOriginHeadersfor compressed multipart requests and reuse them in sourcemap sending.hideFromRootReadme.