Jackson Greig
05/21/2025, 11:28 PMkapa.ai
05/21/2025, 11:28 PMkapa.ai
05/21/2025, 11:29 PMdbt source freshness results are being uploaded multiple times, possibly due to a retry or a misconfiguration in your CI/CD pipeline. - There is a step in your workflow that triggers the upload more than once for the same invocation, for example, if the upload command is run after both dbt run and dbt source freshness, or if the pipeline is re-running failed steps without cleaning up previous artifacts. To resolve this: 1. Check your pipeline steps: Ensure that the upload command (e.g., edr run-operation upload-source-freshness) is only executed once per unique dbt source freshness run. Avoid running it multiple times for the same invocation. 2. Clean up artifacts: If your pipeline reuses the target/sources.json file from a previous run, make sure to clean or overwrite it before each new run to avoid re-uploading old results. 3. Review concurrency: If you have concurrent jobs or retries, ensure they are not causing duplicate uploads for the same invocation ID. Concurrency issues have been noted as a source of similar problems in other contexts with Elementary and dbt integrations [Concurrency issue discussion](https://slack.com/archives/C02CTC89LAX/p1672768342230909). If you continue to see this error and your pipeline is correctly configured to avoid duplicate uploads, it may be helpful to review your logs (edr.log and dbt.log) for more context or share them with the Elementary support team for further troubleshooting. If you need more specific guidance, please provide details about your pipeline steps and any relevant logs. The knowledge sources do not mention a direct fix for this exact error message, but the above steps are consistent with known causes and best practices for similar issues.Jackson Greig
05/21/2025, 11:31 PMJackson Greig
05/21/2025, 11:31 PMkapa.ai
05/21/2025, 11:31 PMkapa.ai
05/21/2025, 11:31 PMedr run-operation upload-source-freshness command is only executed once for each unique run of dbt source freshness. If your workflow or job is retried, or if the same sources.json file is reused, this error can occur. 2. Job Structure: The error can happen if your workflow is split into separate jobs (not just steps), because the target/sources.json file generated by dbt source freshness may persist and be reused, causing Elementary to see it as a duplicate upload. It's recommended to keep both the dbt source freshness and the edr run-operation upload-source-freshness commands in the same job, so the context and files are fresh and unique for each run. This is supported by community advice: > "My hunch is that the problem is that you split the flow into 2 different jobs (dbt and elementary). Can you try and merge them into one job with multiple steps?" [Source](https://slack.com/archives/C02CTC89LAX/p1691621340641759) 3. Clean Artifacts: Ensure that the target/sources.json file is cleaned or overwritten before each run, so you are not re-uploading results from a previous invocation. 4. Continue-on-error: While you have continue-on-error: true, this will allow the workflow to proceed even if the upload fails, but it does not resolve the root cause. It's better to address the duplication issue directly. Summary of what to do: - Keep both commands in the same job (not separate jobs). - Ensure the target/sources.json is not reused across runs. - Only run the upload command once per dbt source freshness execution. If you follow these steps and still encounter the error, please provide more details about your workflow structure or any additional logs for further troubleshooting. Let me know if you need help restructuring your workflow YAML!