pulp_rpm icon indicating copy to clipboard operation
pulp_rpm copied to clipboard

Use new approach to binding fixtures

Open pedro-psb opened this issue 2 years ago • 5 comments

I would like to have a similar bindings API as we have now in pulpcore (after this change).

As a developer, this approach feels more ergonomic. Other benefits should be equivalent to those discussed in the linked PR.

pedro-psb avatar Mar 15 '24 14:03 pedro-psb

The only thing to hold you back is that this might be an unwarranted request to bump the pulpcore dependency.

mdellweg avatar Mar 15 '24 14:03 mdellweg

I'm not sure if I understand why it would cause an unwarranted bump request. Do you mean it would require pulpcore bumping because we would import BindingsNamespace (thus requiring a version where it exists)? We can do a try-catch and hardcode that class on exception, it looks like the code is simple enough for us to do that.

But anyway, any good plan to get around that?

pedro-psb avatar Mar 15 '24 17:03 pedro-psb

I'm not sure if I understand why it would cause an unwarranted bump request. Do you mean it would require pulpcore bumping because we would import BindingsNamespace (thus requiring a version where it exists)? We can do a try-catch and hardcode that class on exception, it looks like the code is simple enough for us to do that.

But anyway, any good plan to get around that?

You nailed it. That's exactly what i was pointing at. Is it a good idea to require more recent pulpcore in order to use more recent testing features only? And maybe it is.

mdellweg avatar Mar 18 '24 11:03 mdellweg

Is it a good idea to require more recent pulpcore in order to use more recent testing features only?

I really can't tell if its a good idea or not. But to avoid the risk of any trouble this might cause, how about just copying BindingNamespace over? Assuming it is the only dependency required, it's a very simple one.

pedro-psb avatar Mar 28 '24 19:03 pedro-psb

We're already using the new pulpcore bindings fixtures after pulpcore 3.55 bump (here), so I guess its safe to proceed with this.

pedro-psb avatar Jun 21 '24 14:06 pedro-psb