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

[email protected] #2260

Merged
merged 8 commits into from
Jun 15, 2024
Merged

Conversation

armandomontanez
Copy link
Contributor

@armandomontanez armandomontanez commented Jun 13, 2024

First commit to add Pigweed's rules_libusb module to the BCR. We work from Gerrit, which does not have stable tarball hashes, so releases are provided via GCS.

@bazel-io
Copy link
Member

Hello @bazelbuild/bcr-maintainers, modules without existing maintainers (rules_libusb) have been updated in this PR. Please review the changes.

@armandomontanez
Copy link
Contributor Author

Current failure is:

BcrValidationResult.FAILED: The source URL of [email protected] (https://storage.googleapis.com/storage/v1/b/pigweed-bazel-tarballs/o/rules_libusb-8745211641617303569-f5c0af2f037b6e8405b4158b5e3041675da8e522.tar.gz?alt=media) doesn't match any of the module's source repositories ['https://pigweed.googlesource.com/pigweed/rules_libusb/'].

Is there a way we can allowlist this particular instance? The only alternative is expressing this dependency as a git_repository, which isn't ideal. We have an automated builder that creates these, the first number is the buildbucket ID and the second is the commit hash of interest.

Separately, it appears the tools are choking on the URL and ignore the archive_type hint:

Traceback (most recent call last):
--
  | File "./tools/bcr_validation.py", line 407, in <module>
  | sys.exit(main())
  | File "./tools/bcr_validation.py", line 396, in main
  | validator.validate_module(name, version, args.skip_validation)
  | File "./tools/bcr_validation.py", line 301, in validate_module
  | self.verify_module_dot_bazel(module_name, version)
  | File "./tools/bcr_validation.py", line 217, in verify_module_dot_bazel
  | shutil.unpack_archive(str(archive_file), output_dir)
  | File "/usr/lib/python3.8/shutil.py", line 1237, in unpack_archive
  | raise ReadError("Unknown archive format '{0}'".format(filename))
  | shutil.ReadError: Unknown archive format '/tmp/tmppdhe8g_g/rules_libusb-8745211641617303569-f5c0af2f037b6e8405b4158b5e3041675da8e522.tar.gz?alt=media'

@armandomontanez
Copy link
Contributor Author

Nice, now it's just stuck on the unknown archive format:

shutil.ReadError: Unknown archive format '/tmp/tmptdjdzfta/rules_libusb-8745211641617303569-f5c0af2f037b6e8405b4158b5e3041675da8e522.tar.gz?alt=media'

Unfortunately, if I drop the ?alt=media then it fetches the wrong thing. The https://storage.cloud.google.com version of the URL also fetches the wrong thing.

@armandomontanez
Copy link
Contributor Author

Sent out #2261 to work around the current failure.

@armandomontanez
Copy link
Contributor Author

Should be ready for another look now, everything that has run is passing.

@Wyverald Wyverald added the presubmit-auto-run Presubmit jobs will be triggered for new changes automatically without reviewer's approval label Jun 14, 2024
@Wyverald
Copy link
Member

Sorry, looks like there are more places in the BCR presubmit script that need patching :S

@armandomontanez
Copy link
Contributor Author

Filed https://pwbug.dev/347353308 to track failing workflows. I'll cut a second release candidate after I've had a chance to verify other environments after RC1 merges.

@Wyverald Wyverald merged commit e3f6174 into bazelbuild:main Jun 15, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
presubmit-auto-run Presubmit jobs will be triggered for new changes automatically without reviewer's approval
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants