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

Merge Main into Production for May 2024 Release #58

Closed
wants to merge 129 commits into from
Closed

Conversation

MaggieFero
Copy link
Collaborator

This is to merge main into production, both in prep for the May 2024 release and because Snyk appears to be scanning our production branch instead of main, so vulnerabilities are not appearing to be resolved.

SMillerDev and others added 30 commits November 14, 2023 14:18
- custom storages
- tar.gz within bucket using s3_tar
- slightly changes export directory structure
- major problems still outstanding re delivering s3 files to end users
- remove test export files
- check in emblackened files
- use signed url for s3 downloads
- re-arrange tar.gz file to match original
- delete all working files after tarring
- import from s3 export

TODO

- check local export and import
- fix error when avatar missing
- deal with multiple s3 storage options (e.g. Azure)
pulls Mouse's fix for imagefile serialization
As of 0.1.13, the s3-tar library uses an environment variable
(`S3_ENDPOINT_URL`) to determine the AWS endpoint. See:
https://github.com/xtream1101/s3-tar/blob/0.1.13/s3_tar/utils.py#L25-L29.

To save BookWyrm admins from having to set it (e.g., through `.env`)
when they are already setting `AWS_S3_ENDPOINT_URL`, we create a Session
class that unconditionally uses that URL, and feed it to S3Tar.
also undoes a line space change in settings.py to make the PR cleaner
Subclass boto3.Session to use AWS_S3_ENDPOINT_URL
Explicitly give codeql-analysis action the security-events: write permission so it still works even when the default GitHub Actions token is set to read-only.
* Bump versions

* Bump back Pillow due to test failure

* Bump setuptools
Reapplying the additional permission added to this fork in commit aaa31b4, which was reverted as part of our last sync to main. We want to keep this permission so we can get security alerts from the CodeQL Action.
The Pillow version bump recommended here is going to require other code changes, and shouldn't be handled as part of a bulk maintenance-task merge. I'd like to see if we can take the rest of these security upgrades without it, though.
Adding opentelemetry-instrumentation>=0.41b0 as snyk recommended broke out opentelemetry-instrumentation-* packages, so this time I removed the dependency snyk had added and instead bumped the versions on our opentelemetry-instrumentation-*s
The opentelemetry-sdk at 1.16.0 had a dependency that conflicted with the versions required by opentelemetry-instrumentation-* packages at versions we'd like to upgrade to for security reasons, so we'll need to upgrade opentelemetry-sdk too.
dependabot bot and others added 24 commits April 18, 2024 15:51
Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.9.2 to 3.9.4.
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](aio-libs/aiohttp@v3.9.2...v3.9.4)

---
updated-dependencies:
- dependency-name: aiohttp
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
As outlined in bookwyrm-social#3354, a use `Move` fails if the user is moving from a BookWyrm server to another BookWrym server.
This is because:

1. the original code did not announce changes to alsoKnownAs;
2. the original code always checked the locally saved profile rather than refetching the remote data;

This commit fixes both these problems by forcing `MoveUser` to always perform a "refresh" of the local data from the remote, and by saving the user with broadcast=True when updating alsoKnownAs ids.
Otherwise the quotes end up in the strings.
…ot/pip/aiohttp-3.9.4

Bump aiohttp from 3.9.2 to 3.9.4
Correctly handle serving BookWyrm on custom port
Explicitly give codeql-analysis action the security-events: write permission so it still works even when the default GitHub Actions token is set to read-only.
* Bump versions

* Bump back Pillow due to test failure

* Bump setuptools
…2009743df

[Snyk] Security upgrade sqlparse from 0.4.4 to 0.5.0
…5bf2cc504

[Snyk] Fixes for Opentelemetry-related vulnerabilities: 

opentelemetry-api==1.22.0
opentelemetry-exporter-otlp-proto-grpc==1.22.0
opentelemetry-instrumentation-celery==0.43b0
opentelemetry-instrumentation-django==0.43b0
opentelemetry-instrumentation-psycopg2==0.43b0
opentelemetry-sdk==1.22.0
@MaggieFero
Copy link
Collaborator Author

Note that I hand-resolved 190 merge conflicts here, so the odds that I broke something are extremely high.

The following vulnerabilities are fixed by pinning transitive dependencies:
- https://snyk.io/vuln/SNYK-PYTHON-REQUESTS-6928867
…ca9cf0824

[Snyk] Security upgrade requests from 2.31.0 to 2.32.0
@MaggieFero
Copy link
Collaborator Author

Closing this; the issues we were running into were due to discrepancies between main and production in upstream. After discussion and debugging with @phildini , we're pretty sure that our previous merge strategy kept hitting issues due to these discrepancies. Work is underway in the upstream repo to simplify branch structure, but until that is finished we will pull to our main and production from the respective upstreams, and will not merge our main to production at all.

Our security upgrades will go directly into our production so we can try them in our prod before recommending upstream, and feature development work will go into our main, from our main to upstream main, from upstream main to upstream production, and from upstream production to our production.

@MaggieFero MaggieFero closed this May 24, 2024
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.

9 participants