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

fatal: unable to rename temporary pack file: Invalid cross-device link #1088

Open
jmayday opened this issue Oct 16, 2023 · 3 comments
Open
Labels
bug Something isn't working source-code-integration Related to [git-metadata]

Comments

@jmayday
Copy link

jmayday commented Oct 16, 2023

Bug description

I've added Bitbucket step uploading Git metadata. This is step configuration:

script:
  - curl -L --fail "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_linux-x64" --output "./datadog-ci" && chmod +x ./datadog-ci
  - export DATADOG_API_KEY=$DD_API_KEY DATADOG_SITE=datadoghq.eu
  - ./datadog-ci git-metadata upload

And this is step output

+ ./datadog-ci git-metadata upload

Uploading list of tracked files...

Reporting commit ... from repository http://.....

1160 tracked file paths will be reported.

Successfully uploaded tracked files in 0.607 seconds.

Syncing GitDB...

fatal: unable to rename temporary pack file: Invalid cross-device link

Failed generation of packfiles in tmpdir: Error: Command failed: git pack-objects --compression=9 --max-pack-size=3m /tmp/dd-packfiles-JIBJTw/4707

fatal: unable to rename temporary pack file: Invalid cross-device link

Generating them in /opt/atlassian/pipelines/agent/build instead

Successfully synced git DB in 1.046 seconds.

✅ Uploaded in 1.759 seconds.

So I don't have a clue if this succeeded or not. Neither I don't know what the error is about.
Update: I see that commit has been uploaded, it's visible on https://app.datadoghq.eu/source-code/repositories

When I'm viewing stacktrace on Datadog UI, there is still that notification "Missing link to repository:

Tag your telemetry to enable the Source Code Integration and see links to your repository"

I don't know if this is because of above fatal errors from git/datadog-ci commands, or this is because of misconfiguration.
PS. I've added those 2 docker labels already (to both application and datadog-agent containers as DD documentation seemed unclear for me): org.opencontainers.image.revision, org.opencontainers.image.source

Command

git-metadata

@jmayday jmayday added the bug Something isn't working label Oct 16, 2023
@github-actions github-actions bot added the source-code-integration Related to [git-metadata] label Oct 16, 2023
@lraucy
Copy link
Contributor

lraucy commented Oct 16, 2023

Hello @jmayday,

Thank you for the details.
The output of the command is actually misleading here: those fatal errors are "caught" and the command is generating the necessary files in another tmp folder. From the command POV, everything looks fine. I've added a card in our backlog to make the command output less confusing.

Now, it looks like despite this successful upload, you still don't have links to your repository.
This can happen when your telemetry is not correctly linked. With the information available here, it is hard for me to tell what could be the cause: could you open a support ticket and provide information about the service you are trying to configure, the language, link to an error when the issue is not working properly, and the link to this GitHub issue?
This would help us with the investigation.

To answer your question regarding the docker labels, they only need to be added to your application's container.

@jmayday
Copy link
Author

jmayday commented Oct 16, 2023

So application's container should have docker labels (but no DD_TAGS), and datadog-agent container should have DD_TAGS env variable (but no docker labels), correct?

@lraucy
Copy link
Contributor

lraucy commented Oct 18, 2023

So application's container should have docker labels (but no DD_TAGS), and datadog-agent container should have DD_TAGS env variable (but no docker labels), correct?

Actually the application container should have docker labels OR have DD_TAGS injected into it. The datadog-agent doesn't need any configuration for source-code-integration to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working source-code-integration Related to [git-metadata]
Projects
None yet
Development

No branches or pull requests

2 participants