Troubleshoot
If you need further assistance setting up GitOps, feel free to reach us.
Issue not created
- Bytebase only observes merge event. If the file is pushed to the branch directly, it will be ignored.
- Migration file must follow the path and naming convention.
- Bytebase has configured a proper External URL and the URL is network accessible from VCS.
Bytebase observes the VCS merge event via webhook. The created webhook link is on the top of the Git connector setting page.
Check the webhook running history to debug the reason.
Empty repository list
When you add GitOps connector to your project, make sure the configured Git Provider user has admin access to the repository. You can verify this by calling the VCS API directly:
-
Then filter the repository having
permissions.admin
.
Duplicate version
This usually happens if a version has been successfully applied, and you are trying to modify the existing file having that version string. This is a typical sequence causing the error:
- You create a new migration
00890_my_feature.sql
and merge it. - The merge event creates a Bytebase issue.
- You successfully roll out the issue and thus apply migration version
00890
to the database. - You want make some changes to
my_feature
. Thus you change the existing00890_my_feature.sql
and merge it. - The merge event creates another Bytebase issue.
- Once you attempt to roll out the issue, you will receive the duplicate version error. Because version
00890
has already been applied.
Modifying existing file is only OK if the migration hasn't been completed successfully yet. This is a OK sequence:
- You create a new migration
00890_my_feature.sql
and merge it. - The merge event creates a Bytebase issue.
- You realize the error before attempting the rollout, or you attempt the rollout and it fails.
- You correct the error by making changes to
00890_my_feature.sql
and merge it again. - The merge event creates another Bytebase issue.
- You successfully roll out the issue and thus apply migration version
00890
to the database. - You close the first issue. (You can also do this proactively after step 3).
GitLab
Failed to create webhook xxx, status code: 422
If you configure External URL with the private IP such as 10.0.0.0/8
, 172.16.0.0/12
, 192.168.0.0/16
, you will need to enable Allow requests to the local network from webhooks and integrations first.
INVALID_ARGUMENT: failed to fetch repositories
If your GitLab is before 12.2, then the personal access token won't work and you need to use the OAuth token to configure the GitLab Provider