airbytehq / airbyte

The leading data integration platform for ETL / ELT data pipelines from APIs, databases & files to data warehouses, data lakes & data lakehouses. Both self-hosted and Cloud-hosted.
https://airbyte.com
Other
15.88k stars 4.07k forks source link

Reset logs when re/deploying Airbyte. #4235

Open davinchia opened 3 years ago

davinchia commented 3 years ago

Tell us about the problem you're trying to solve

Today we do not perform checks whether logs already exist in the log bucket. This leads us to two error cases: 1) Application logs from previous runs get lumped into logs for the current run. Mostly inconvenient than anything else since users can scroll down to the latest log lines. 2) If the db is also reset, jobs can be assigned job paths where jobs already reside in. Also mostly inconvenient than anything else since users can scrolls down to the latest log lines.

Describe the solution you’d like

Either: 1) Empty the relevant paths (app-logging and job-logging) when we start. 2) Move the logs to another location.

Solution #1 seems fine to me.

jrhizor commented 3 years ago

If we do #1 we should just clear the known logs directory/prefix, not the whole bucket.

davinchia commented 3 years ago

Good point. Edited.

colleen-love commented 2 years ago

This can be done manually while upgrading pretty easily. This is for those who are using the default minio logging setup. Just make sure to delete the minio pvc before checking out the new version of airbyte and upgrading.

$ kubectl delete deployments airbyte-db airbyte-scheduler airbyte-server airbyte-temporal airbyte-webapp airbyte-minio
deployment.apps "airbyte-db" deleted
deployment.apps "airbyte-scheduler" deleted
deployment.apps "airbyte-server" deleted
deployment.apps "airbyte-temporal" deleted
deployment.apps "airbyte-webapp" deleted
deployment.apps "airbyte-minio" deleted
$ kubectl delete pvc airbyte-minio-pv-claim
persistentvolumeclaim "airbyte-minio-pv-claim" deleted
$ git checkout tags/{tag_name}
$ kubectl apply -k kube/overlays/stable