Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@fabiofelix
Copy link
Contributor

@fabiofelix fabiofelix commented Oct 16, 2025

EnricherFactory feeds enrichers with the same config reference, which causes wrong functioning.
For example, if an UrbanPipeline has more than one loader and more than one enricher, all the enrichers will share the same configuration - the last one defined in the UrbanPipeline.

With the present modification, EnricherFactory sends a copy of its internal configuration to each enricher. This way, each enricher has a different configuration.


📚 Documentation preview 📚: https://UrbanMapper--81.org.readthedocs.build/en/81/

@fabiofelix fabiofelix requested a review from soniacq October 16, 2025 22:01
@fabiofelix fabiofelix added bug Something isn't working enricher labels Oct 16, 2025
@fabiofelix fabiofelix self-assigned this Oct 16, 2025
Copy link
Member

@simonprovost simonprovost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing @fabiofelix! Good catch. I’m approving the PR 🎉

Just a quick one in case you find it interesting. Would you believe it would be nice to add a unit test to check if the config is properly set with two loaders during enriching? This way, it’ll be caught if it’s removed by any means later on.

I’m not requesting the change but rather let you decide so, but if it’s all good, let me merge today, please @ me :)

Cheers

@fabiofelix
Copy link
Contributor Author

Yes @simonprovost, we could create an issue to add this type of test, not just for enrichers, but for any other factory that could suffer from the same bug.

@simonprovost simonprovost merged commit 39f2640 into main Oct 17, 2025
12 checks passed
@simonprovost simonprovost requested review from simonprovost and removed request for soniacq October 17, 2025 16:18
@simonprovost
Copy link
Member

@soniacq it was a very tiny PR so I took the liberty to merge without second review, hope it's all fine ✅

@simonprovost
Copy link
Member

Thanks a bunch @fabiofelix ! ⭐

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enricher

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants