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

[git-metadata] Make exported function upload to gitdb #1213

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

rpelliard
Copy link
Contributor

Currently, the datadog-ci git-metadata upload command both:

  • synchronises GitDB
  • uploads a payload with tracked files to the legacy sourcemap intake

But the uploadGitCommitSha function that is exported and used in the serverless plugin (here: https:/DataDog/serverless-plugin-datadog/blob/51b7844efd6224d1a4fb5c1215453aac3038f915/src/index.ts#L302) only upload to the sourcemap intake.

We want all upload tooling to synchronize GitDB, and eventually deprecate the sourcemap store for Git metadata.

This PR updates the exported function to also synchronize GitDB.

Comment on lines +57 to +58
// no-op logger
const log = new Logger((s: string) => {}, LogLevel.INFO)
Copy link
Contributor Author

@rpelliard rpelliard Feb 28, 2024

Choose a reason for hiding this comment

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

The output of the serverless plugin is minimalistic when everything goes well (see below), so I think we want to avoid spitting a lot of debug/info logs.
image

We may also reconsider this in the future and allow passing a custom logger as parameter, but it doesn't seem needed for now.

Note that in case of errors, an exception will be throwned and logged by the serverless plugin to the command output:
image

@rpelliard rpelliard marked this pull request as ready for review February 28, 2024 12:40
@rpelliard rpelliard requested a review from a team as a code owner February 28, 2024 12:40
@rpelliard rpelliard merged commit 17e3c7f into master Feb 29, 2024
14 checks passed
@rpelliard rpelliard deleted the ronan/lib-sync-gitdb branch February 29, 2024 09:56
@Drarig29 Drarig29 added the source-code-integration Related to [git-metadata] label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source-code-integration Related to [git-metadata]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants