Skip to content

Conversation

@hunsche
Copy link
Contributor

@hunsche hunsche commented Oct 16, 2025

This PR resolves a ModuleNotFoundError in the run indexer tests CI job by removing the external PyYAML dependency from infra/helper.py.

The original feature was reverted because helper.py was used in a minimal CI environment that does not include third-party libraries, causing the build to fail.

This fix refactors the Project class to manually parse project.yaml for the language and base_os_version properties using basic string operations. This approach preserves the required functionality while eliminating the dependency, ensuring compatibility with all CI environments.

The fix was verified by successfully running the index_build_test in an environment where PyYAML was uninstalled.

@hunsche hunsche requested review from oliverchang and vitaliset and removed request for oliverchang October 16, 2025 18:18
@hunsche hunsche changed the title Revert "Revert "feat(infra): Add base_os_version to support parallel builds"" fix(helper): Remove PyYAML dependency to resolve CI failures Oct 16, 2025
@hunsche
Copy link
Contributor Author

hunsche commented Oct 16, 2025

/gcbrun trial_build.py zlib bad_example --fuzzing-engines libfuzzer --sanitizers address

Removes the PyYAML dependency from infra/helper.py to fix a
ModuleNotFoundError in the indexer build tests, which run in a
minimal environment.

The language and base_os_version properties in the Project class
were refactored to manually parse project.yaml using regex,
restoring CI compatibility without losing functionality.
@hunsche hunsche force-pushed the revert-14144-revert-14128-feat/base-os-version branch from 3534042 to e1504a1 Compare October 16, 2025 18:58
@hunsche
Copy link
Contributor Author

hunsche commented Oct 16, 2025

/gcbrun trial_build.py zlib bad_example --fuzzing-engines libfuzzer --sanitizers address

@hunsche hunsche merged commit b14bd67 into master Oct 16, 2025
19 checks passed
@hunsche hunsche deleted the revert-14144-revert-14128-feat/base-os-version branch October 16, 2025 19:56
@oliverchang
Copy link
Collaborator

Thanks! Note that helper.py is intended to be dependency-less, because it should be runnable by anybody just by checking out the OSS-Fuzz repo.

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.

4 participants