Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dbus): refresh AvailableProducts property #1282

Closed
wants to merge 4 commits into from

Conversation

imobachgs
Copy link
Contributor

@imobachgs imobachgs commented Jun 3, 2024

The HTTP/JSON API uses a proxy to access the products interface. When the language changes, the AvailableProducts property is silently updated (not really updated because it gets calculated each time we try to access it).

The proxy does not know that this property changed and returns the old value. We can:

  • Stop caching those values (in the HTTP/JSON API).
  • Fix the D-Bus service to report that the AvailableProducts changed (this one).
  • Decide that AvailableProperties is a method instead of a property.

This PR is a tentative fix I have not tried in a real ISO.

To do

  • After logging in, the wrong translations still appear.
  • Fix unit tests

@imobachgs imobachgs marked this pull request as draft June 3, 2024 15:54
@imobachgs imobachgs closed this Jun 4, 2024
@imobachgs imobachgs deleted the fix-products-i18n branch June 4, 2024 05:44
@imobachgs imobachgs restored the fix-products-i18n branch June 4, 2024 05:46
@imobachgs imobachgs reopened this Jun 4, 2024
@imobachgs imobachgs force-pushed the fix-products-i18n branch 2 times, most recently from 9be959d to 6b5f5a6 Compare June 4, 2024 06:14
@coveralls
Copy link

coveralls commented Jun 4, 2024

Coverage Status

coverage: 70.914% (-0.004%) from 70.918%
when pulling 862aae2 on fix-products-i18n
into 7b4db54 on master.

@mvidner
Copy link
Contributor

mvidner commented Jun 12, 2024

Testing this in a container...
It kind of works, the product descriptions are shown in the new language, but only if I change the language from the main page.
If I change it in the Product page, it stays in the old language even after going back and forth, or changing the product.

@imobachgs
Copy link
Contributor Author

Thanks for testing. It is still a work in progress, but I will work on that after the new UI is merged.

@imobachgs imobachgs closed this Jun 21, 2024
@imobachgs imobachgs deleted the fix-products-i18n branch June 21, 2024 16:48
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.

3 participants