openSUSE / openSUSE-release-tools

Tools to aid in staging and release work for openSUSE/SUSE
GNU General Public License v2.0
59 stars 92 forks source link

WIP: tests: OBSLocal: do not pick up __name__ when updating existing config #3121

Closed g7 closed 2 weeks ago

g7 commented 3 weeks ago

The __name__ option is added by OscConfigParser automatically, and it contains the section name.

When updating the configuration in FactoryWorkflow.remote_config_set(), __name__ would be fetched as part of the existing configuration that needs to be updated and would in turn be submitted again.

Since osc 1.8.0, having duplicate options is not supported [0]. Let's skip __name__ when updating the mock configuration, as it's an internal option that we don't want to touch anyway.

[0] https://github.com/openSUSE/osc/commit/360a94c4a3745dfe59863c6a112acf8bcf38840d

Vogtinator commented 3 weeks ago

When updating the configuration in FactoryWorkflow.remote_config_set(), name would be fetched as part of the existing configuration that needs to be updated and would in turn be submitted again.

Shouldn't it replace the existing one instead of duplicating it?

Vogtinator commented 3 weeks ago

Arguably config.items() shouldn't return the somewhat internal (?) __name__ entry at all

Vogtinator commented 3 weeks ago

https://github.com/openSUSE/osc/pull/1601

g7 commented 3 weeks ago

ok, thanks :) Not sure about the implications of that, so I will keep this PR around as a draft

g7 commented 2 weeks ago

osc change has been merged, closing this.