Skip to content

Conversation

@Dreamsorcerer
Copy link
Contributor

Revert some changes for #29901.

Old behaviour before those changes (and again, after this PR):
Nextcloud calls set('theme', '') etc. Because the existing config has the same values, it does not attempt to write anything to the config file. If the config file would get changed, then it gives an error if the read-only option is set.

Regression behaviour:
The same call is made and immediately errors despite the fact that the config file will not be changed.

The set()/delete() methods are clearly written in a way that they skip writing changes if the value is already the same, but the previous changes make a check before those checks, thus erroring when there are no changes to write. The same PR also adds this check to writeData(), which is called by both of these methods, making them redundant.

@Dreamsorcerer Dreamsorcerer mentioned this pull request Mar 6, 2024
8 tasks
@solracsf solracsf requested a review from mejo- March 7, 2024 23:15
@solracsf solracsf added the 3. to review Waiting for reviews label Mar 7, 2024
Copy link
Member

@mejo- mejo- left a comment

Choose a reason for hiding this comment

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

Looks sensible to me, given that checkReadOnly() is called again in writeData() anyway.

@Dreamsorcerer
Copy link
Contributor Author

Updated the commit message, I don't think the other failures are related to my change (maybe my fork was old though, so I've rebased).

@Dreamsorcerer Dreamsorcerer changed the title Fix regression with updating read-only config fix: regression with updating read-only config Mar 12, 2024
@Dreamsorcerer
Copy link
Contributor Author

Any chance of getting this in for 29?

@come-nc come-nc added this to the Nextcloud 30 milestone Apr 2, 2024
@come-nc
Copy link
Contributor

come-nc commented Apr 2, 2024

/backport to stable29

@come-nc
Copy link
Contributor

come-nc commented Apr 2, 2024

/backport to stable28

@come-nc
Copy link
Contributor

come-nc commented Apr 2, 2024

/backport to stable27

@Dreamsorcerer
Copy link
Contributor Author

Looks like something got stuck on the CI, so this still hasn't merged yet..

@mejo- mejo- force-pushed the patch-2 branch 2 times, most recently from 2ed85ea to e746156 Compare April 18, 2024 08:41
@mejo-
Copy link
Member

mejo- commented Apr 18, 2024

I guess the cypress tests fail due to the parent branch living in a forked repository.

@Dreamsorcerer
Copy link
Contributor Author

I guess the cypress tests fail due to the parent branch living in a forked repository.

Looks like my previous PRs were merged with these failing, so I'm guessing that making them required checks is probably not the right option while it doesn't work in forks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants