-
Notifications
You must be signed in to change notification settings - Fork 216
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
Treat 403s from Flickr as dead links #1201
Conversation
api/catalog/api/utils/check_dead_links/provider_status_mappings.py
Outdated
Show resolved
Hide resolved
services: | ||
es: | ||
# Memory limit for ES, as it tends to be a memory hoarder | ||
mem_limit: 4294967296 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This option is removed in newer docker compose file versions.1
Specifying the value in high-level units is also possible if you still want to keep it.
mem_limit: 4294967296 | |
mem_limit: 4gb |
Footnotes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be happy to remove it, but I assume some people rely on this to prevent ES from sucking up their RAM? We're still on compose file version 2.4 for now:
Line 1 in 2ecb187
version: "2.4" |
When we update the compose format, maybe then we can remove it? I don't want to cause a disruption for others with this PR in the mean time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krysal there was an open issue with higher units not working, so we had to resort to specifying the value as a plain number.
Personally I have no intention of bumping the Docker Compose config up to v3, none of the features we need are absent in v2 and none of the features added to v3 are useful to us.
@sarayourfriend I'd like to get @AetherUnbound's input on this as another Linux user but for macOS folks using Docker Desktop, the memory limit for the system as a whole can be configured from the settings UI.
Can we make this "opt-in" rather than "opt-out"? Impossible to run ES locally for me without removing this
19ec605
to
69cbfdc
Compare
Co-authored-by: Krystle Salazar <[email protected]>
services: | ||
es: | ||
# Memory limit for ES, as it tends to be a memory hoarder | ||
mem_limit: 4294967296 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krysal there was an open issue with higher units not working, so we had to resort to specifying the value as a plain number.
Personally I have no intention of bumping the Docker Compose config up to v3, none of the features we need are absent in v2 and none of the features added to v3 are useful to us.
@sarayourfriend I'd like to get @AetherUnbound's input on this as another Linux user but for macOS folks using Docker Desktop, the memory limit for the system as a whole can be configured from the settings UI.
@@ -8,6 +8,8 @@ IS_PROD := env_var_or_default("PROD", env_var_or_default("IS_PROD", "")) | |||
# `PROD_ENV` can be "ingestion_server" or "catalog" | |||
PROD_ENV := env_var_or_default("PROD_ENV", "") | |||
IS_CI := env_var_or_default("CI", "") | |||
DC_USER := env_var_or_default("DC_USER", "opener") | |||
ENABLE_DC_OVERRIDES := env_var_or_default("OPENVERSE_ENABLE_DC_OVERRIDES", "true") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not in favour of splitting the Docker Compose config into a regular and an override file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we can remove the memory limit entirely, then I'd also prefer not to have an overrides file, but I can't get any mem_limit value to work on my local, even set as high as 32 GB. Docker always kills the container.
FWIW, can you share why you dislike an overrides file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just means you have to read in two places to read to mentally piece together a full config. I'm not vetoing it, just expressing displeasure that we had to use this approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krysal there was an open issue with higher units not working, so we had to resort to specifying the value as a plain number.
Ah, that is sad to hear. It's really frustrating when these differences of OS happens, but related to that and the next quote:
Personally I have no intention of bumping the Docker Compose config up to v3, none of the features we need are absent in v2 and none of the features added to v3 are useful to us.
I assume that newer versions have better compatibility between different OS, specially for working with docker compose
v2 which we are promoting to go for, so I don't think we should stuck in v2, but that is a tasks por another issue for sure.
# Memory limit for ES, as it tends to be a memory hoarder | ||
# Set this value to an empty string to remove the limit | ||
# https://docs.docker.com/compose/compose-file/compose-file-v2/#cpu-and-other-resources | ||
mem_limit: ${ES_MEM_LIMIT:-4294967296} # 4 GiB in bytes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this problem only affects your setup (which is likely because it's not been brought up before) the better option would be for you to set the ES_MEM_LIMIT
on your machine to a very high number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved Docker Compose changes because nothing else works. Tried ES_MEM_LIMIT
set to both a higher value and a blank string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dead link handling changes LGTM. The discussion around the docker-compose changes makes sense to me.
Fixes
Fixes #1200 by @sarayourfriend
Requested Olga specifically as she's looked into this before. Requested Staci the most knowledgeable of us all about Flickr as a provider.
Description
Adds a way of transparently handling status check differences per-provider. The default behaviour remains the same, but this allows us to assign different sets of "unknown" and "live" statuses per-provider.
I had to remove the memory limit from ES for myself as it was not possible to use an environment variable to disable it. I changed the approach to use compose file overrides instead and conditionally include the overrides file. The default is to include it, but setting
OPENVERSE_ENABLE_DC_OVERRIDES
in your environment to anything other than"true"
will disable it.Testing Instructions
Can't really test it locally as you'd have to force some Flickr links to 403. Check the new unit tests and make sure they cover things comprehensively. Make some regular requests to your local API for good measure.
To test the changes to the docker-compose, run
just dc version
and confirm that the echoed commandjust
is running includes-f docker-compose.overrides.yml
. Now setOPENVERSE_ENABLE_DC_OVERRIDES="false"
into your environment and runjust dc version
again and confirm that the overrides docker compose file is not included in the command.Checklist
Update index.md
).main
) ora parent feature branch.
errors.
Developer Certificate of Origin
Developer Certificate of Origin