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

model_version_control.md is out of date; local repositories don't work #19822

Closed
RussTedrake opened this issue Jul 20, 2023 · 5 comments · Fixed by #19876
Closed

model_version_control.md is out of date; local repositories don't work #19822

RussTedrake opened this issue Jul 20, 2023 · 5 comments · Fixed by #19876
Assignees
Labels
component: build system Bazel, CMake, dependencies, memory checkers, linters priority: medium type: bug

Comments

@RussTedrake
Copy link
Contributor

What happened?

I'm trying to add models to Robotlocomotion/models following the instructions in model_version_control.md, but I think perhaps the steps have changed? Simply using local_repository_overload gives me the error:

ERROR: /Users/russt/drake/multibody/parsing/BUILD.bazel:59:8: no such target '@drake_models//:drake_repository_metadata.json': target 'drake_repository_metadata.json' not declared in package '' defined by /private/var/tmp/_bazel_russt/9c100c86c1cc4c543d01c45f7a63d5c6/external/drake_models/BUILD.bazel (Tip: use `query "@drake_models//:*"` to see all the targets in that package) and referenced by '//multibody/parsing:drake_models_json'

@jwnimmer-tri confirmed that "It's generated from tools/workspace/github.bzl. I'll need to do a real fix, but for now I think you could try remove the data citation in BUILD, and nerf GetDrakeModelsRemoteParams() in the code to return a default-constructed object instead of using the json.

Version

No response

What operating system are you using?

No response

What installation option are you using?

No response

Relevant log output

No response

@RussTedrake RussTedrake added type: bug priority: high component: build system Bazel, CMake, dependencies, memory checkers, linters labels Jul 20, 2023
@jwnimmer-tri
Copy link
Collaborator

The other work-around is to avoid local_repository_override and instead change repository = "RobotLocomotion/models" to be repository = "MyUser/models", laundering the local changes through push/pull to GitHub.

@RussTedrake
Copy link
Contributor Author

Good to know that would work. I already considered that step 2, and could use that for now.

@jwnimmer-tri
Copy link
Collaborator

I think something like this would disable the checksum validation, to at least slightly smooth out that workflow:

--- a/tools/workspace/github.bzl
+++ b/tools/workspace/github.bzl
@@ -298,10 +298,7 @@ def _sha256(sha256):
     Args:
         sha256: expected SHA-256 hash of the archive to be downloaded.
     """
-    if not sha256:
-        sha256 = "0" * 64
-
-    return sha256
+    return None
 
 def _strip_prefix(repository, commit, extra_strip_prefix):
     """Compute the strip prefix for a downloaded archive of the provided

@RussTedrake
Copy link
Contributor Author

Reducing priority, since the work-around mean it is not an immediate blocker.

@RussTedrake
Copy link
Contributor Author

Related: Looks like I must have missed a step in #19771; building the python bindings now warns about

DEBUG: /home/russt/drake/tools/install/install.bzl:75:14: @//examples/manipulation_station:install_data installing file external/drake_models/manipulation_station/bin.mtl which is not in current package
DEBUG: /home/russt/drake/tools/install/install.bzl:75:14: @//examples/manipulation_station:install_data installing file external/drake_models/manipulation_station/bin.obj which is not in current package
DEBUG: /home/russt/drake/tools/install/install.bzl:75:14: @//examples/manipulation_station:install_data installing file external/drake_models/manipulation_station/bin.png which is not in current package
DEBUG: /home/russt/drake/tools/install/install.bzl:75:14: @//examples/manipulation_station:install_data installing file external/drake_models/manipulation_station/table_wide.mtl which is not in current package
DEBUG: /home/russt/drake/tools/install/install.bzl:75:14: @//examples/manipulation_station:install_data installing file external/drake_models/manipulation_station/table_wide.obj which is not in current package
DEBUG: /home/russt/drake/tools/install/install.bzl:75:14: @//examples/manipulation_station:install_data installing file external/drake_models/manipulation_station/table_wide.png which is not in current package
DEBUG: /home/russt/drake/tools/install/install.bzl:75:14: @//examples/manipulation_station:install_data installing file external/drake_models/manipulation_station/shelves.mtl which is not in current package
DEBUG: /home/russt/drake/tools/install/install.bzl:75:14: @//examples/manipulation_station:install_data installing file external/drake_models/manipulation_station/shelves.obj which is not in current package
DEBUG: /home/russt/drake/tools/install/install.bzl:75:14: @//examples/manipulation_station:install_data installing file external/drake_models/manipulation_station/shelves.png which is not in current package

But I can't see what step I might have missed...

I will update the issue title with the real victory condition: an updated model_version_control.md that actually works.

@RussTedrake RussTedrake changed the title Need a developer workflow to generate drake_repository_metadata.json for RobotLocomotion/models model_version_control.md is out of date; local repositories don't work and new install artifacts are marked as "foreign" Jul 23, 2023
RussTedrake added a commit to RussTedrake/drake that referenced this issue Jul 23, 2023
Follow-up to RobotLocomotion#19771. Related to RobotLocomotion#19822.

The workflow for drake_models has changed. I should not have installed them.
rpoyner-tri pushed a commit that referenced this issue Jul 24, 2023
Follow-up to #19771. Related to #19822.

The workflow for drake_models has changed. I should not have installed them.
@jwnimmer-tri jwnimmer-tri changed the title model_version_control.md is out of date; local repositories don't work and new install artifacts are marked as "foreign" model_version_control.md is out of date; local repositories don't work Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: build system Bazel, CMake, dependencies, memory checkers, linters priority: medium type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants