Skip to content
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

chore: introduce support for NPM_DEPLOY config for MFEs wrt uploading JS source maps to Datadog #4

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

adamstankiewicz
Copy link
Member

@adamstankiewicz adamstankiewicz commented Jun 11, 2024

The datadog-ci command, installed via the @datadog/datadog-ci NPM package appears to be missing in the current implementation of the FrontendDeployer on a recent test of the stage deployment pipeline:

/bin/sh: 1: ./node_modules/.bin/datadog-ci: not found
b'Deploy frontend: Uploading source maps to Datadog for app frontend-app-learner-portal-enterprise.'
b'Deploy frontend: Could not upload source maps to Datadog for app frontend-app-learner-portal-enterprise.'

This issue is likely due to the @datadog/datadog-ci NPM package only getting installed during FrontendBuilder, such that when FrontendDeployer is run, the previously installed NPM package exposing the datadog-ci command is no longer installed since it's a separate environment from the FrontendBuilder.

Given this issue, this PR proposes setting a NPM_DEPLOY config setting in edx-internal's common MFE configuration, defining NPM packages to be installed for the purpose of deployment. For now, this would only be @datadog/datadog-ci, but could be expanded for future use cases as well.

The alternative considered was having FrontendBuilder install the @datadog/datadog-ci NPM package directly (hardcoded in edx/tubular). However, this approach was decided against in favor of the more generalized NPM_DEPLOY defined via edx-internal's common MFE configuration instead, for parity with NPM_PRIVATE and NPM_ALIASES.

NPM_PRIVATE are private packages that the build application relies on; similarly, NPM_ALIASES are installed packages that are aliased via package.json definitions.

NPM_DEPLOY differs because the packages listed here are not relevant to the built application; only in support of the deployment.

Related PRs:

@adamstankiewicz adamstankiewicz marked this pull request as ready for review June 11, 2024 17:56
@adamstankiewicz adamstankiewicz merged commit aef7176 into master Jun 11, 2024
4 checks passed
@adamstankiewicz adamstankiewicz deleted the ags/datadog-sourcemaps-pt2 branch June 11, 2024 18:22
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.

2 participants