Error in test_policy

Hi!

In local it returns no problem, but when I push the changes, the test_policy returns the following error. Any advise or clue?

Traceback (most recent call last):
File “build/modules/test-policy/main.py”, line 174, in
main()
File “build/modules/test-policy/main.py”, line 163, in main
if not is_solution_type_valid(last_commit, policies, repo):
File “build/modules/test-policy/main.py”, line 74, in is_solution_type_valid
username: str = repo.active_branch.name
File “/nix/store/q1jlwp6q9m9zd5c0g0hzbi436r87iydy-GitPython3.1.3/site-packages/git/repo/base.py”, line 705, in active_branch
return self.head.reference
File “/nix/store/q1jlwp6q9m9zd5c0g0hzbi436r87iydy-GitPython3.1.3/site-packages/git/refs/symbolic.py”, line 272, in _get_reference
raise TypeError("%s is a detached symbolic reference as it points to %r" % (self, sha))
TypeError: HEAD is a detached symbolic reference as it points to ‘792a257d4f6137672af1db1307ab04fd0465416f’

Looks like you’re on a very old version of the repo. Please rebase you branch and try again.

I’m having the same problem, after doing a git rebase and even erasing my branch.

imagen

@favorite-want Can you please attach the job pipeline. Thanks.

https://gitlab.com/autonomicmind/challenges/-/pipelines/163622615

@favorite-want As you can see here: https://gitlab.com/autonomicmind/challenges/-/branches

Your branch is 6 commits behind master.

Try to debug your rebase attempt, something might have gone wrong.

I keep having the same problem after updating the local master and doing a merge with my local branch. I checked on GitLab and my branch is zero commits behind master.

PD test_policy was successful in the local build.

https://gitlab.com/autonomicmind/challenges/-/pipelines/163657987/failures

@favorite-want Your solution name does not comply with the rules.

Please read this: https://gitlab.com/autonomicmind/challenges/-/wikis/Structure

1 Like