Repository navigation
Add tenant ids and remove olso - #149
LeoZhangZXZ wants to merge 3 commits into
Conversation
Injects a tenant_ids list (distinct project IDs from initiator and target) into every event before notifying, so that downstream consumers (log-router, OpenSearch) can route and filter events per tenant without having to know which field carries the relevant project ID. Falls back to ['Default'] when neither initiator nor target carries a project_id (e.g. anonymous probes or cross-domain administrative calls).
| 'project_id', None) | ||
| if target_project and target_project not in ids: | ||
| ids.append(target_project) | ||
| return ids if ids else ['Default'] |
There was a problem hiding this comment.
This doesn't work. Default is not a blanket project id. It's a real project in openstack. It has meaning. Thus this is putting irrelevant events into a project without meaning.
This also doesn't work because it makes domain events with no project fail. Domain events are reasonable events and contain no project. In the case of the log-router, they would be routed to the admin tier, but not to an actual project. They are not on the project level.
|
This should be a single PR for what it does. No and clause. Tenant ids and removing oslo are entirely separate issues that each require their own narrow, scoped pr. This PR also does other things not listed in the title. This discards domain events which is not listed as a change, but is reflected in how the return works. There's an unused import of urlparse. But even further, this can't even go in like this. We don't control the services taking the library. they will take it automatically on the next deploy. This creates a collision with what is already occuring in the logstash. So these are very specific things that need deep consideration on timing, and detail. Even the oslo one, I am not sure, I need to do much more research into the specifics to validate it would be okay accepting both situations at random deploy times. |
|
One more point to make, this is also an open source package used by tons of other people, thousands. So we really have to consider what this means for people who don't have any of this. We would need versioning, or some sort of plan. We will break every consumer in multiple ways doing this. |
|
I am going to close this PR as is, we need to have detailed conversation and planning regarding this topic. |
No description provided.