René's URL Explorer Experiment


Title: Not defining a global provider.runtime breaks dockerizePip: true · Issue #781 · serverless/serverless-python-requirements · GitHub

Open Graph Title: Not defining a global provider.runtime breaks dockerizePip: true · Issue #781 · serverless/serverless-python-requirements

X Title: Not defining a global provider.runtime breaks dockerizePip: true · Issue #781 · serverless/serverless-python-requirements

Description: Are you certain it's a bug? Yes, it looks like a bug Are you using the latest plugin release? Yes, I'm using the latest plugin release Is there an existing issue for this? I have searched existing issues, it hasn't been reported yet Issu...

Open Graph Description: Are you certain it's a bug? Yes, it looks like a bug Are you using the latest plugin release? Yes, I'm using the latest plugin release Is there an existing issue for this? I have searched existing ...

X Description: Are you certain it's a bug? Yes, it looks like a bug Are you using the latest plugin release? Yes, I'm using the latest plugin release Is there an existing issue for this? I have searched e...

Opengraph URL: https://github.com/serverless/serverless-python-requirements/issues/781

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Not defining a global provider.runtime breaks dockerizePip: true","articleBody":"### Are you certain it's a bug?\r\n\r\n- [X] Yes, it looks like a bug\r\n\r\n### Are you using the latest plugin release?\r\n\r\n- [X] Yes, I'm using the latest plugin release\r\n\r\n### Is there an existing issue for this?\r\n\r\n- [X] I have searched existing issues, it hasn't been reported yet\r\n\r\n### Issue description\r\n\r\nWe have a project that uses different runtimes per function:\r\n`function1`: `docker`\r\n`function2`: `python3.9`\r\n\r\nBecause of this, in the `provider` section, we did not define a `runtime` setting, as we did this on an individual `function` level.\r\n(`package.individually` was set to `true`)\r\nWhen deploying this stack it caused no issue at all, untill we needed to set the `dockerizePip` to `true`\r\n\r\nDoing this caused the following error to appear:\r\n```\r\n× Stack application-dev failed to deploy (2s)\r\nEnvironment: linux, node 18.16.1, framework 3.33.0 (local), plugin 6.2.3, SDK 4.3.2\r\nCredentials: Local, environment variables\r\nDocs:        docs.serverless.com\r\nSupport:     forum.serverless.com\r\nBugs:        github.com/serverless/serverless/issues\r\n\r\nError:\r\nRunning \"docker run --rm -v /home/vsts/.cache/serverless-python-requirements/312994c1479362d239d9d5bf26421488a6a04688248779b8d3d3ec9ec8d32241_x86_64_slspyc:/var/task:z -v /home/vsts/.cache/serverless-python-requirements/downloadCacheslspyc:/var/useDownloadCache:z public.ecr.aws/sam/build-undefined:latest-x86_64 /bin/sh -c chown -R 0\\:0 /var/useDownloadCache && python -m pip install -t /var/task/ -r /var/task/requirements.txt --cache-dir /var/useDownloadCache && chown -R 1001\\:122 /var/task && chown -R 1001\\:122 /var/useDownloadCache\" failed with: \"Unable to find image 'public.ecr.aws/sam/build-undefined:latest-x86_64' locally\r\ndocker: Error response from daemon: repository public.ecr.aws/sam/build-undefined not found: name unknown: The repository with name 'build-undefined' does not exist in the registry with id 'sam'.\r\nSee 'docker run --help'.\"\r\nerror Command failed with exit code 1.\r\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\r\n\r\n``` \r\n\r\nTracing back the error caused me to look where `public.ecr.aws/sam/build-` was used in the repository.\r\nIt led me [here](https://github.com/serverless/serverless-python-requirements/blob/e8b2e51c265792046bacc3946f22f7bd842c60e6/index.js#L103)\r\nAs in our usecase `serverless.service.provider.runtime` was not set on a project lvl, it caused the code to replace this with the string `undefined`.\r\n\r\nThis image ofcourse does not exist, causing the docker command to crash out.\r\nSetting the `provider.runtime` string to `python3.9` fixes this issue.\r\n\r\n### Service configuration (serverless.yml) content\r\n\r\n```yaml\r\nservice: application\r\n\r\nframeworkVersion: '3'\r\n\r\npackage:\r\n  individually: true\r\n  patterns:\r\n    - '!./**/**'\r\n    - .requirements.zip\r\n\r\nprovider:\r\n  name: aws\r\n  stage: ${sls:stage}\r\n  timeout: 900 \r\n  memorySize: 2048\r\n\r\n  # if you do not define it here, it breaks the dockerizePip: true\r\n  # remove the comment on the below line to fix the error\r\n  # runtime: python3.9\r\n\r\n  environment:\r\n    ENV: ${sls:stage}\r\n    DEPLOYED: TRUE\r\n\r\n  # Lambda needs access to S3, secretsmanager, dynamodb and logs\r\n  iam:\r\n    role:\r\n      statements:\r\n        - Effect: Allow\r\n          Action:\r\n            - \"s3:*\"\r\n          Resource: \"*\"\r\n\r\n        - Effect: Allow\r\n          Action:\r\n            - \"secretsmanager:GetSecretValue\"\r\n          Resource: \"*\"\r\n\r\n        - Effect: Allow\r\n          Action:\r\n            - \"dynamodb:*\"\r\n          Resource: \"*\"\r\n\r\n        - Effect: Allow\r\n          Action:\r\n            - \"logs:*\"\r\n          Resource: \"*\"\r\n\r\n  # Serverless stores our docker image of the app in ECR\r\n  ecr:\r\n    images:\r\n      appimage_scrape:\r\n        path: ./\r\n        file: scrape.dockerfile\r\n\r\nplugins:\r\n  - serverless-python-requirements\r\n\r\ncustom:\r\n  pythonRequirements:\r\n    usePoetry: true\r\n    dockerizePip: true\r\n    requirePoetryLockFile: true\r\n    zip: true\r\n    slim: true\r\n    strip: false\r\n    \r\n\r\nfunctions:\r\n  ma_scrape:\r\n    environment:\r\n      ENV: ${sls:stage}\r\n    image:\r\n      name: appimage_scrape\r\n    events:\r\n      # Invoke Lambda function every day at 6:15h UTC from Mon-Fri\r\n      - schedule: cron(15 6 ? * MON-FRI *)\r\n\r\n  ma_clean:\r\n    handler: src.handler.run_clean\r\n    runtime: python3.9\r\n    environment:\r\n      ENV: ${sls:stage}\r\n    events:\r\n      - s3:\r\n          bucket: ${self:service}-${sls:stage}-databucket\r\n          event: s3:ObjectCreated:*\r\n          rules:\r\n            - prefix: raw/\r\n          existing: true\r\n          forceDeploy: true\r\n    package:\r\n      patterns:\r\n        - src/application/clean/**\r\n        - src/application/common/**\r\n        - src/handler.py\r\n\r\n  ma_score:\r\n    handler: src.handler.run_score\r\n    runtime: python3.9\r\n    environment:\r\n      ENV: ${sls:stage}\r\n    events:\r\n      - s3:\r\n          bucket: ${self:service}-${sls:stage}-databucket\r\n          event: s3:ObjectCreated:*\r\n          rules:\r\n            - prefix: clean/\r\n            - suffix: info.json\r\n          existing: true\r\n          forceDeploy: true\r\n    package:\r\n      patterns:\r\n        - src/application/score/**\r\n        - src/application/common/**\r\n        - src/handler.py\r\n\r\n  ma_match:\r\n    handler: src.handler.run_match\r\n    runtime: python3.9\r\n    environment:\r\n      ENV: ${sls:stage}\r\n    events:\r\n      # Invoke Lambda function every day at 6:45h UTC from Mon-Fri\r\n      - schedule: cron(45 6 ? * MON-FRI *)\r\n    \r\n    package:\r\n      patterns:\r\n        - src/application/match/**\r\n        - src/application/common/**\r\n        - src/handler.py\r\n\r\n  ma_send:\r\n    handler: src.handler.run_send\r\n    runtime: python3.9\r\n    environment:\r\n      ENV: ${sls:stage}\r\n    events:\r\n      # Invoke Lambda function every day at 7h UTC from Mon-Fri\r\n      - schedule: cron(0 7 ? * MON-FRI *)\r\n    \r\n    package:\r\n      patterns:\r\n        - src/application/send/**\r\n        - src/application/common/**\r\n        - src/handler.py\r\n```\r\n\r\n\r\n### Command name and used flags\r\n\r\nserverless deploy --verbose --region eu-west-1 --stage dev\r\n\r\n### Command output\r\n\r\n```shell\r\n$ /home/vsts/work/1/s/node_modules/.bin/serverless deploy --verbose --region eu-west-1 --stage dev\r\n\r\nDeploying application to stage dev (eu-west-1)\r\n\r\nAdding Python requirements helper to .\r\nGenerating requirements.txt from poetry.lock\r\nParsed requirements.txt from pyproject.toml in /home/vsts/work/1/s/.serverless/requirements.txt\r\nInstalling requirements from \"/home/vsts/.cache/serverless-python-requirements/312994c1479362d239d9d5bf26421488a6a04688248779b8d3d3ec9ec8d32241_x86_64_slspyc/requirements.txt\"\r\nDocker Image: public.ecr.aws/sam/build-undefined:latest-x86_64\r\nUsing download cache directory /home/vsts/.cache/serverless-python-requirements/downloadCacheslspyc\r\nRunning docker run --rm -v /home/vsts/.cache/serverless-python-requirements/312994c1479362d239d9d5bf26421488a6a04688248779b8d3d3ec9ec8d32241_x86_64_slspyc\\:/var/task\\:z -v /home/vsts/.cache/serverless-python-requirements/downloadCacheslspyc\\:/var/useDownloadCache\\:z public.ecr.aws/sam/build-undefined\\:latest-x86_64 /bin/sh -c 'chown -R 0\\\\:0 /var/useDownloadCache && python -m pip install -t /var/task/ -r /var/task/requirements.txt --cache-dir /var/useDownloadCache && chown -R 1001\\\\:122 /var/task && chown -R 1001\\\\:122 /var/useDownloadCache'...\r\n\r\n× Stack application-dev failed to deploy (2s)\r\nEnvironment: linux, node 18.16.1, framework 3.33.0 (local), plugin 6.2.3, SDK 4.3.2\r\nCredentials: Local, environment variables\r\nDocs:        docs.serverless.com\r\nSupport:     forum.serverless.com\r\nBugs:        github.com/serverless/serverless/issues\r\n\r\nError:\r\nRunning \"docker run --rm -v /home/vsts/.cache/serverless-python-requirements/312994c1479362d239d9d5bf26421488a6a04688248779b8d3d3ec9ec8d32241_x86_64_slspyc:/var/task:z -v /home/vsts/.cache/serverless-python-requirements/downloadCacheslspyc:/var/useDownloadCache:z public.ecr.aws/sam/build-undefined:latest-x86_64 /bin/sh -c chown -R 0\\:0 /var/useDownloadCache && python -m pip install -t /var/task/ -r /var/task/requirements.txt --cache-dir /var/useDownloadCache && chown -R 1001\\:122 /var/task && chown -R 1001\\:122 /var/useDownloadCache\" failed with: \"Unable to find image 'public.ecr.aws/sam/build-undefined:latest-x86_64' locally\r\ndocker: Error response from daemon: repository public.ecr.aws/sam/build-undefined not found: name unknown: The repository with name 'build-undefined' does not exist in the registry with id 'sam'.\r\nSee 'docker run --help'.\"\r\nerror Command failed with exit code 1.\r\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\r\nerror Command failed with exit code 1.\r\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\r\nyarn run v1.22.19\r\nwarning package.json: No license field\r\n```\r\n\r\n\r\n### Environment information\r\n\r\n```shell\r\nFramework Core: 3.33.0 (local)\r\nPlugin: 6.2.3\r\nSDK: 4.3.2\r\n\r\n\r\nserverless-python-requirements: 6.0.0\r\n```\r\n\r\n## Solution/ workaround\r\nUnder the provider section, define your runtime (like `python 3,9`)\r\n","author":{"url":"https://github.com/ToneVDB","@type":"Person","name":"ToneVDB"},"datePublished":"2023-07-24T10:58:36Z","url":"https://github.com/serverless/serverless-python-requirements/issues/781"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c23a293b-466f-b32e-1867-e53cf0bd9ced
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8938:319373:C1BD6:10ABBF:6B04330F
html-safe-noncecb19f1fd447bc8a720963a7f406e5dfeb9c29a3045ec970d1c7dc17609e66602
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTM4OjMxOTM3MzpDMUJENjoxMEFCQkY6NkIwNDMzMEYiLCJ2aXNpdG9yX2lkIjoiNDM0NTMwNzM1MTA0NjQzNTU5OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaca2af6490f88fc55a121138c7246a787436d81d8a9c396b8ca135ee1e8f8ebd85
hovercard-subject-tagissue:1818177805
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/serverless/serverless-python-requirements/781/issue_layout
twitter:imagehttps://opengraph.githubassets.com/13bc8f8dc213d9d2363212ad2354bcdf8a59762d4f7b58a41ebdc926ee6aead9/serverless/serverless-python-requirements/issues/781
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/13bc8f8dc213d9d2363212ad2354bcdf8a59762d4f7b58a41ebdc926ee6aead9/serverless/serverless-python-requirements/issues/781
og:image:altAre you certain it's a bug? Yes, it looks like a bug Are you using the latest plugin release? Yes, I'm using the latest plugin release Is there an existing issue for this? I have searched existing ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameToneVDB
hostnamegithub.com
expected-hostnamegithub.com
Noneb7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e
turbo-cache-controlno-preview
go-importgithub.com/serverless/serverless-python-requirements git https://github.com/serverless/serverless-python-requirements.git
octolytics-dimension-user_id13742415
octolytics-dimension-user_loginserverless
octolytics-dimension-repository_id76508594
octolytics-dimension-repository_nwoserverless/serverless-python-requirements
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id76508594
octolytics-dimension-repository_network_root_nwoserverless/serverless-python-requirements
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasec3dd496c3da6ea6b77e69c09279d2b81604654f1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/serverless/serverless-python-requirements/issues/781#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fserverless%2Fserverless-python-requirements%2Fissues%2F781
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fserverless%2Fserverless-python-requirements%2Fissues%2F781
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=serverless%2Fserverless-python-requirements
Reloadhttps://github.com/serverless/serverless-python-requirements/issues/781
Reloadhttps://github.com/serverless/serverless-python-requirements/issues/781
Reloadhttps://github.com/serverless/serverless-python-requirements/issues/781
serverlesshttps://github.com/serverless
serverless-python-requirementshttps://github.com/serverless/serverless-python-requirements
Codehttps://github.com/serverless/serverless-python-requirements
Issues177 (177)https://github.com/serverless/serverless-python-requirements/issues
Pull requests18 (18)https://github.com/serverless/serverless-python-requirements/pulls
Discussionshttps://github.com/serverless/serverless-python-requirements/discussions
Actionshttps://github.com/serverless/serverless-python-requirements/actions
Security and qualityhttps://github.com/serverless/serverless-python-requirements/security
Insightshttps://github.com/serverless/serverless-python-requirements/insights
https://github.com/serverless/serverless-python-requirements
Not defining a global provider.runtime breaks dockerizePip: truehttps://github.com/serverless/serverless-python-requirements/issues/781#top
https://github.com/ToneVDB
ToneVDBhttps://github.com/ToneVDB
on Jul 24, 2023https://github.com/serverless/serverless-python-requirements/issues/781#issue-1818177805
herehttps://github.com/serverless/serverless-python-requirements/blob/e8b2e51c265792046bacc3946f22f7bd842c60e6/index.js#L103
https://github.com/Lachlan-McEwen
Lachlan-McEwenhttps://github.com/Lachlan-McEwen
on Feb 2, 2024https://github.com/serverless/serverless-python-requirements/issues/781#issuecomment-1923549583
https://github.com/ToneVDB
ToneVDBhttps://github.com/ToneVDB
on Feb 2, 2024https://github.com/serverless/serverless-python-requirements/issues/781#issuecomment-1923563856
https://github.com/kalanchoej
kalanchoejhttps://github.com/kalanchoej
on Feb 2, 2024https://github.com/serverless/serverless-python-requirements/issues/781#issuecomment-1924625251
https://github.com/duncanista
duncanistahttps://github.com/duncanista
on Feb 3, 2024https://github.com/serverless/serverless-python-requirements/issues/781#issuecomment-1925472603
https://github.com/duncanista
duncanistahttps://github.com/duncanista
on Apr 10, 2024https://github.com/serverless/serverless-python-requirements/issues/781#issuecomment-2048468078
https://github.com/pgrzesik
pgrzesikhttps://github.com/pgrzesik
on Apr 10, 2024https://github.com/serverless/serverless-python-requirements/issues/781#issuecomment-2048474891
@duncanistahttps://github.com/duncanista
https://github.com/duncanista
duncanistahttps://github.com/duncanista
on Apr 10, 2024https://github.com/serverless/serverless-python-requirements/issues/781#issuecomment-2048543388
@pgrzesikhttps://github.com/pgrzesik
Sign up for freehttps://github.com/signup?return_to=https://github.com/serverless/serverless-python-requirements/issues/781
Sign in to commenthttps://github.com/login?return_to=https://github.com/serverless/serverless-python-requirements/issues/781
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.