Git Pull is breaking #15
Labels
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Hostea/dashboard#15
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Environment:
Request Method: GET
Request URL: https://hosteadashboard.gq3tanjygy3dknrr.test.enough.community/infra/create/air-demo/
Django Version: 4.0.3
Python Version: 3.9.2
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'accounts',
'dash',
'support',
'oauth2_provider',
'payments',
'billing',
'infrastructure']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'oauth2_provider.middleware.OAuth2TokenMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback (most recent call last):
File "/srv/hosteadashboard/venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
File "/srv/hosteadashboard/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/srv/hosteadashboard/venv/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/srv/hosteadashboard/dashboard/infrastructure/views.py", line 52, in create_instance
res = create_vm_if_not_exists(instance=instance)
File "/srv/hosteadashboard/dashboard/infrastructure/utils.py", line 80, in create_vm_if_not_exists
(gitea_password, commit) = infra.add_vm(instance=instance)
File "/srv/hosteadashboard/dashboard/infrastructure/utils.py", line 323, in add_vm
self.repo.git.push(env=self.env)
File "/srv/hosteadashboard/venv/lib/python3.9/site-packages/git/cmd.py", line 639, in
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/srv/hosteadashboard/venv/lib/python3.9/site-packages/git/cmd.py", line 1184, in _call_process
return self.execute(call, **exec_kwargs)
File "/srv/hosteadashboard/venv/lib/python3.9/site-packages/git/cmd.py", line 984, in execute
raise GitCommandError(redacted_command, status, stderr_value, stdout_value)
Exception Type: GitCommandError at /infra/create/air-demo/
Exception Value: Cmd('git') failed due to: exit code(1)
cmdline: git push
stderr: 'To gitea.gq3tanjygy3dknrr.test.enough.community:/hostea/hostea
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'gitea.gq3tanjygy3dknrr.test.enough.community:/hostea/hostea'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.'
There can be race conditions where the CI will push something before the dashboard does. The window for such races is small and it should be enough to merge whatever is in master before trying to push.
https://gitea.hostea.org/Hostea/dashboard/pulls/19