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

Add pre-exit hook to fix permissions in BuildKite #624

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

frouioui
Copy link
Member

@frouioui frouioui commented Oct 15, 2024

This PR fixes a long-standing issue we have with our CI. Since we change the permission of certain files that are under the cloned directory, we may fail to clone/update the repo on the runner in a subsequent run. This is a pretty annoying issue as it fails our workflows very often.

Examples of the logs:

  [2024-10-15T05:52:34Z] $ git clone -v -- https://github.com/planetscale/vitess-operator.git .
  --
  | [2024-10-15T05:52:34Z] fatal: destination path '.' already exists and is not an empty directory.
  | [2024-10-15T05:52:34Z] ⚠️ Warning: Checkout failed! cloning git repository: exit status 128 (Attempt 1/3 Retrying in 2s)
  | [2024-10-15T05:52:34Z] # Removing /var/lib/buildkite-agent/builds/buildkite-public-i-06a8b5ff3b7b45bbd-1/planetscale/vitess-operator
  | [2024-10-15T05:52:34Z] 🚨 Error: Failed to remove "/var/lib/buildkite-agent/builds/buildkite-public-i-06a8b5ff3b7b45bbd-1/planetscale/vitess-operator" (unlinkat /var/lib/buildkite-agent/builds/buildkite-public-i-06a8b5ff3b7b45bbd-1/planetscale/vitess-operator/vtdataroot/backup/example/commerce/-: permission denied)
  | [2024-10-15T05:52:34Z] # Waiting 10 seconds
  | [2024-10-15T05:52:44Z] # Removing /var/lib/buildkite-agent/builds/buildkite-public-i-06a8b5ff3b7b45bbd-1/planetscale/vitess-operator
  | [2024-10-15T05:52:44Z] 🚨 Error: Failed to remove "/var/lib/buildkite-agent/builds/buildkite-public-i-06a8b5ff3b7b45bbd-1/planetscale/vitess-operator" (unlinkat /var/lib/buildkite-agent/builds/buildkite-public-i-06a8b5ff3b7b45bbd-1/planetscale/vitess-operator/vtdataroot/backup/example/commerce/-: permission denied)
  | [2024-10-15T05:52:44Z] # Waiting 10 seconds

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
@frouioui
Copy link
Member Author

Had to push one more commit to fix some docs that was missing from a previous PR. Context: the HPA PR was merged without being up-to-date with main, main now has a workflow that checks docs are generated correctly.

@frouioui frouioui merged commit f7c65b3 into main Oct 15, 2024
12 checks passed
@frouioui frouioui deleted the add-pre-exit-hook-to-buildkite branch October 15, 2024 19:18
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.

3 participants