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

Continue after folders migration errors #23

Merged
merged 6 commits into from
Aug 28, 2023

Conversation

bonclay7
Copy link
Member

What does this PR do?

🛑 Please open an issue first to discuss any significant work and flesh out details/direction - we would hate for your time to be wasted. Consult the CONTRIBUTING guide for submitting pull-requests.

Motivation

Currently, when we run the migrator twice or if folders already exist, the migration will stop. This keep in memory the source reference and allows migration to continue and attempt dashboards migration

A bit of #21

More

  • Yes, I ran pre-commit run -a with this PR
  • Yes, I added unit tests for new code added (as much as possible)

Note: Not all the PRs require unit tests

Additional Notes

@bonclay7
Copy link
Member Author

Creating temporary API key for g-a4
Creating temporary API key for g-c1

Migrating data sources:
Data source: Prometheus ws-c32b1e35-2c70-430b-ba88-015ca441f399
	warning: status: 409, body: {"message":"data source with the same name already exists","traceID":""}
✔ Migrated 0 data sources

Migrating folders:
Folder: Folders-Test
Folder: Prom-3
	error: Prom-3 [status: 412, body: {"message":"the folder has been changed by someone else","status":"version-mismatch"}]
Folder: Prometheus
	error: Prometheus [status: 412, body: {"message":"the folder has been changed by someone else","status":"version-mismatch"}]
Folder: Test-UID
	error: Test-UID [status: 412, body: {"message":"the folder has been changed by someone else","status":"version-mismatch"}]
✔ Migrated 1 folders

Migrating dashboards:
Dashboard: /d/WBVPPq34z/prom
	warning: status: 412, body: {"message":"The dashboard has been changed by someone else","status":"version-mismatch"}
✔ Migrated 0 dashboards

Skipping alert rules migration

Removing temporary API key for g-c1

Removing temporary API key for g-a4

@bonclay7 bonclay7 changed the title fix: Continue after folders migration errors Continue after folders migration errors Aug 28, 2023
@bonclay7 bonclay7 merged commit ac4b8bf into main Aug 28, 2023
1 check passed
@bonclay7 bonclay7 deleted the fix/continue-after-folder-errors branch August 28, 2023 20:15
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.

1 participant