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

fatal error resolved #61

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

adityaomar3
Copy link

After setting up the directory structure as told in docs.
Running ./app.py gives fatal error:-
"fatal: 'upstream' does not appear to be a git repository
fatal: Could not read from remote repository."

@adityaomar3
Copy link
Author

This issue is resolved and successfully checked/run on my pc, kindly review it @peterbarker

@Ryanf55
Copy link
Contributor

Ryanf55 commented Nov 25, 2023

Agree, can we get this merged? I faced the same thing on Ubuntu 22.04 following the instructions.

$ ./app.py 
/home/ryan/Dev/ros2_ws/src/CustomBuild/./app.py:13: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.dir_util import copy_tree
[2023-11-25 11:08:37,246] INFO in app: Got queue lock
[2023-11-25 11:08:37,247] INFO in app: Initial fetch
[2023-11-25 11:08:37,247] INFO in app: Running git rev-parse upstream/master in /home/ryan/Dev/ros2_ws/src/base/ardupilot
fatal: ambiguous argument 'upstream/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Traceback (most recent call last):
  File "/home/ryan/Dev/ros2_ws/src/CustomBuild/./app.py", line 544, in <module>
    checkout_branch(get_default_branch_name(), s_dir=sourcedir, fetch_and_reset=True)
  File "/home/ryan/Dev/ros2_ws/src/CustomBuild/./app.py", line 144, in checkout_branch
    if not on_branch(targetBranch):
  File "/home/ryan/Dev/ros2_ws/src/CustomBuild/./app.py", line 127, in on_branch
    git_hash_target = get_git_hash(branch)
  File "/home/ryan/Dev/ros2_ws/src/CustomBuild/./app.py", line 124, in get_git_hash
    return subprocess.check_output(['git', 'rev-parse', branch], cwd=sourcedir, encoding='utf-8', shell=False).rstrip()
  File "/usr/lib/python3.10/subprocess.py", line 421, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', 'rev-parse', 'upstream/master']' returned non-zero exit status 128.

With the change, it seems to break the builds though when you try building it adds --.

[2023-11-25 11:29:45,654] INFO in app: [Errno 2] No such file or directory: '/home/ryan/Dev/ros2_ws/src/base/builds/copter:CubeOrange:--\nupstream/selected_features.json'

Upon testing locally, it seems there's numerous problems with the custom build server regarding remotes and assuming you have an upstream.

@shiv-tyagi
Copy link
Collaborator

Currently, we only support upstream as remote and we assume that it is added in the base repository.

This change doesn't look right to me.

@Ryanf55
Copy link
Contributor

Ryanf55 commented Nov 25, 2023

Yea, upon further testing, it seems invalid. The instructions are missing the part about adding the upstream remote. I'll issue a proper fix.

@Ryanf55
Copy link
Contributor

Ryanf55 commented Nov 25, 2023

#62 is the proper fix for this; nothing is wrong with the code. It was just missing docs.

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.

None yet

3 participants