Skip to content

Remove SYNAPSE_USE_FROZEN_DICTS environment variable#18123

Merged
MadLittleMods merged 4 commits intodevelopfrom
madlittlemods/use-frozen-dicts-default
Mar 18, 2025
Merged

Remove SYNAPSE_USE_FROZEN_DICTS environment variable#18123
MadLittleMods merged 4 commits intodevelopfrom
madlittlemods/use-frozen-dicts-default

Conversation

@MadLittleMods
Copy link
Copy Markdown
Contributor

@MadLittleMods MadLittleMods commented Jan 31, 2025

Remove SYNAPSE_USE_FROZEN_DICTS environment variable

I got rid of the SYNAPSE_USE_FROZEN_DICTS environment variable because it will be overridden by the Synapse worker apps anyway and if we want to support SYNAPSE_USE_FROZEN_DICTS, it should be in synapse/config/server.py. It's also not documented so I'm assuming no one is using it anyway.

Spawning from looking at the frozen dict stuff during the review of #18103 (comment)

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct
    (run the linters)

Comment on lines -56 to -62
# Whether we should use frozen_dict in FrozenEvent. Using frozen_dicts prevents
# bugs where we accidentally share e.g. signature dicts. However, converting a
# dict to frozen_dicts is expensive.
#
# NOTE: This is overridden by the configuration by the Synapse worker apps, but
# for the sake of tests, it is set here while it cannot be configured on the
# homeserver object itself.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Moved this to a comment doc so the information appears on hover.

# for the sake of tests, it is set here while it cannot be configured on the
# homeserver object itself.

USE_FROZEN_DICTS = strtobool(os.environ.get("SYNAPSE_USE_FROZEN_DICTS", "0"))
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I got rid of the SYNAPSE_USE_FROZEN_DICTS environment variable because it will be overridden by the Synapse worker apps anyway and if we want to support SYNAPSE_USE_FROZEN_DICTS, it should be in synapse/config/server.py. It's also not documented so I'm assuming no one is using it anyway.

@MadLittleMods MadLittleMods marked this pull request as ready for review February 3, 2025 16:52
@MadLittleMods MadLittleMods requested a review from a team as a code owner February 3, 2025 16:52
@MadLittleMods MadLittleMods merged commit d61bdff into develop Mar 18, 2025
39 checks passed
@MadLittleMods MadLittleMods deleted the madlittlemods/use-frozen-dicts-default branch March 18, 2025 10:53
@MadLittleMods
Copy link
Copy Markdown
Contributor Author

Thanks for the review @reivilibre 🐗

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Mar 27, 2025
Fixes high severity vulnerability *exploited in the wild*!


# Synapse 1.127.1 (2025-03-26)

## Security
- Fix [CVE-2025-30355](https://www.cve.org/CVERecord?id=CVE-2025-30355) / [GHSA-v56r-hwv5-mxg6](GHSA-v56r-hwv5-mxg6). **High severity vulnerability affecting federation. The vulnerability has been exploited in the wild.**



# Synapse 1.127.0 (2025-03-25)

No significant changes since 1.127.0rc1.




# Synapse 1.127.0rc1 (2025-03-18)

### Features

- Update [MSC4140](matrix-org/matrix-spec-proposals#4140) implementation to no longer cancel a user's own delayed state events with an event type & state key that match a more recent state event sent by that user. ([\#17810](element-hq/synapse#17810))

### Improved Documentation

- Fixed a minor typo in the Synapse documentation. Contributed by @karuto12. ([\#18224](element-hq/synapse#18224))

### Internal Changes

- Remove undocumented `SYNAPSE_USE_FROZEN_DICTS` environment variable. ([\#18123](element-hq/synapse#18123))
- Fix detection of workflow failures in the release script. ([\#18211](element-hq/synapse#18211))
- Add caching support to media endpoints. ([\#18235](element-hq/synapse#18235))



### Updates to locked dependencies

* Bump anyhow from 1.0.96 to 1.0.97. ([\#18201](element-hq/synapse#18201))
* Bump bcrypt from 4.2.1 to 4.3.0. ([\#18207](element-hq/synapse#18207))
* Bump bytes from 1.10.0 to 1.10.1. ([\#18227](element-hq/synapse#18227))
* Bump http from 1.2.0 to 1.3.1. ([\#18245](element-hq/synapse#18245))
* Bump sentry-sdk from 2.19.2 to 2.22.0. ([\#18205](element-hq/synapse#18205))
* Bump serde from 1.0.218 to 1.0.219. ([\#18228](element-hq/synapse#18228))
* Bump serde_json from 1.0.139 to 1.0.140. ([\#18202](element-hq/synapse#18202))
* Bump ulid from 1.2.0 to 1.2.1. ([\#18246](element-hq/synapse#18246))
yingziwu added a commit to yingziwu/synapse that referenced this pull request Apr 13, 2025
No significant changes since 1.127.0rc1.

- Update [MSC4140](matrix-org/matrix-spec-proposals#4140) implementation to no longer cancel a user's own delayed state events with an event type & state key that match a more recent state event sent by that user. ([\#17810](element-hq/synapse#17810))

- Fixed a minor typo in the Synapse documentation. Contributed by @karuto12. ([\#18224](element-hq/synapse#18224))

- Remove undocumented `SYNAPSE_USE_FROZEN_DICTS` environment variable. ([\#18123](element-hq/synapse#18123))
- Fix detection of workflow failures in the release script. ([\#18211](element-hq/synapse#18211))
- Add caching support to media endpoints. ([\#18235](element-hq/synapse#18235))

* Bump anyhow from 1.0.96 to 1.0.97. ([\#18201](element-hq/synapse#18201))
* Bump bcrypt from 4.2.1 to 4.3.0. ([\#18207](element-hq/synapse#18207))
* Bump bytes from 1.10.0 to 1.10.1. ([\#18227](element-hq/synapse#18227))
* Bump http from 1.2.0 to 1.3.1. ([\#18245](element-hq/synapse#18245))
* Bump sentry-sdk from 2.19.2 to 2.22.0. ([\#18205](element-hq/synapse#18205))
* Bump serde from 1.0.218 to 1.0.219. ([\#18228](element-hq/synapse#18228))
* Bump serde_json from 1.0.139 to 1.0.140. ([\#18202](element-hq/synapse#18202))
* Bump ulid from 1.2.0 to 1.2.1. ([\#18246](element-hq/synapse#18246))
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.

2 participants