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

display: run configure script after populating the config #188

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

Saviq
Copy link
Collaborator

@Saviq Saviq commented Jun 17, 2024

Otherwise the file doesn't get the DO NOT EDIT header and things don't work as expected.

Fixes #187

Otherwise the file doesn't get the `DO NOT EDIT` header and things don't
work as expected.

Fixes #187
@Saviq Saviq requested a review from a team as a code owner June 17, 2024 13:15
@AlanGriffiths
Copy link
Contributor

Does this actually do the best thing?

The dance between run-daemon, configure and initialise-display-config already looks fragile. And executing configure to get the side effect of rewriting $SNAP_DATA/frame.display seems to add complexity to that.

It looks like the elif grep "DO NOT EDIT THIS FILE BY HAND"... clause in the configure script is the better place to handle this case. (By removing the file regardless of the header.)

@Saviq
Copy link
Collaborator Author

Saviq commented Jun 17, 2024

Does this actually do the best thing?

The dance between run-daemon, configure and initialise-display-config already looks fragile. And executing configure to get the side effect of rewriting $SNAP_DATA/frame.display seems to add complexity to that.

On the one hand, yes - on the other, configure should be idempotent, and safe… it already ran on refresh / installation just before this script. If we're not confident in it, that needs fixing.

I could just rewrite the file directly in the initialise- script, but that risks them going out of sync…

It looks like the elif grep "DO NOT EDIT THIS FILE BY HAND"... clause in the configure script is the better place to handle this case. (By removing the file regardless of the header.)

That would cause custom configuration (predating the display key) to be overwritten on the first run of the configure script e.g. on refresh. And we need to backport the fix to the 22 track.

Copy link
Contributor

@AlanGriffiths AlanGriffiths left a comment

Choose a reason for hiding this comment

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

OK

@AlanGriffiths AlanGriffiths added this pull request to the merge queue Jun 17, 2024
Merged via the queue into main with commit f7b633e Jun 17, 2024
3 checks passed
@AlanGriffiths AlanGriffiths deleted the MIRENG-560-fix-display-population branch June 17, 2024 14:15
Saviq pushed a commit that referenced this pull request Jun 17, 2024
Otherwise the file doesn't get the `DO NOT EDIT` header and things don't
work as expected.

Fixes #187
Saviq pushed a commit that referenced this pull request Jun 17, 2024
Otherwise the file doesn't get the `DO NOT EDIT` header and things don't
work as expected.

Fixes #187
github-merge-queue bot pushed a commit that referenced this pull request Jun 18, 2024
Otherwise the file doesn't get the `DO NOT EDIT` header and things don't
work as expected.

Fixes #187
AlanGriffiths added a commit that referenced this pull request Sep 23, 2024
Otherwise the file doesn't get the `DO NOT EDIT` header and things don't
work as expected.

Fixes #187
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.

display: populates display config value with stale configuration
2 participants