René's URL Explorer Experiment


Title: Support per-function requierments with shared code · Issue #767 · serverless/serverless-python-requirements · GitHub

Open Graph Title: Support per-function requierments with shared code · Issue #767 · serverless/serverless-python-requirements

X Title: Support per-function requierments with shared code · Issue #767 · serverless/serverless-python-requirements

Description: Is there an existing issue for this? I have searched existing issues, it hasn't been reported yet Use case description See: #734 Besides it being a bug report, it describes the use case, also see: #168 #435 Currently I find the behavior ...

Open Graph Description: Is there an existing issue for this? I have searched existing issues, it hasn't been reported yet Use case description See: #734 Besides it being a bug report, it describes the use case, also see: ...

X Description: Is there an existing issue for this? I have searched existing issues, it hasn't been reported yet Use case description See: #734 Besides it being a bug report, it describes the use case, also s...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support per-function requierments with shared code","articleBody":"### Is there an existing issue for this?\r\n\r\n- [ ] I have searched existing issues, it hasn't been reported yet\r\n\r\n### Use case description\r\n\r\nSee: https://github.com/serverless/serverless-python-requirements/issues/734\r\n\r\nBesides it being a bug report, it describes the use case, also see:\r\nhttps://github.com/serverless/serverless-python-requirements/issues/168\r\nhttps://github.com/serverless/serverless-python-requirements/issues/435\r\n\r\nCurrently I find the behavior of per function requirements odd, because to me it seems it;s basically a more performant? implementation of https://www.serverless.com/framework/docs/guides/compose\r\n\r\nAs it uses the module as the entry point and thus you can not use shared code.\r\n\r\nProject structure:\r\n```\r\n- serverless.yml\r\n- application/**\r\n- domain/**\r\n- infrastructure/**\r\n- web\r\n  - api.py\r\n  - requirements.txt\r\n- events\r\n  - handler.py\r\n  - requirements.txt\r\n```\r\n\r\nserverless.yml:\r\n```\r\nservice: service\r\n\r\nprovider:\r\n  name: aws\r\n  runtime: python3.9\r\n\r\nfunctions:\r\n  RESTAPI:\r\n    handler: api.handler\r\n    module: web\r\n    package:\r\n      patterns:\r\n        - 'web/**'\r\n  EventConsumer:\r\n    handler: handler\r\n    module: events\r\n    package:\r\n      patterns:\r\n        - 'events/**'\r\n\r\npackage:\r\n  individually: true\r\n  patterns:\r\n    - '!*'\r\n    - '!*/**'\r\n    - 'application/**'\r\n    - 'domain/**'\r\n    - 'infrastructure/**'\r\n\r\nplugins:\r\n  - serverless-python-requirements\r\n\r\n```\r\n\r\nSo currently packaging this results in the following artifacts:\r\n```\r\n- events\r\n  - requirements/**\r\n  - requirements.txt\r\n- web\r\n  - requirements/**\r\n  - requirements.txt\r\n- cloudformation-template.json\r\n- events-service-stage-EventConsumer.zip\r\n- EventConsumer.zip\r\n- RESTAPI.zip\r\n- serverless-state.json\r\n- web-service-stage-RESTAPI.zip\r\n```\r\n\r\nThe RESTAPI zip file contains:\r\n```\r\n- application/**\r\n- domain/**\r\n- infrastructure/**\r\n- web/**\r\n```\r\nso the files and folderz defined in package patterns.\r\n\r\nand the web-service-stage-RESTAPI zip file contains the web requirements and the contents of the web folder in our project.\r\n\r\nWhen deploying the zips with the fully qualified name get deployed. Thus you can not share code, because as it is specified in the documentation, the module folder becomes the root of the zip of the function.\r\n\r\nCurrently there is a workaround that people are using the vendor option if only one folder is shared, but this approach does not work for multiple folders\r\n\r\n### Proposed solution (optional)\r\n\r\nSo a general idea would be to combine the zip named as the fully qualified function name and the zip named as the function excluding the folder named as the module. But here there could be an issue if there would be no patterns supplied in the root package field.\r\n\r\nSo I would propose that the merging/copying would only happen if there are patterns defined in the root package field and also including an extra field in custom pythonRequirements or maybe inside the function definitions, something along the lines of includeNonModuleFiles to ensure no breaking changes.\r\n\r\nI'm wondering if this is possible or if there are any issues with this approach? Have not looked at the code yet, so no idea if my approach would be feasible. Also is this a use case that this plugin would even want to support?","author":{"url":"https://github.com/markonose","@type":"Person","name":"markonose"},"datePublished":"2023-04-21T11:46:07Z","url":"https://github.com/serverless/serverless-python-requirements/issues/767"}

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:366eaff8-2161-ce03-131a-7a3766bafa17
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC708:21169F:4ED69:687D5:6B04301B
html-safe-nonced2ce083efd16ad95f25e62af9c88b4784d319eb5d7ee0b3c75df84ca6f821691
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzA4OjIxMTY5Rjo0RUQ2OTo2ODdENTo2QjA0MzAxQiIsInZpc2l0b3JfaWQiOiIxOTczMzYwNjQxOTEzOTI1NjU5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmace6ef00fa1ffe3b5215f15fd4d195bb24d2feefb60e150bcf6463dedaa1a77d6a
hovercard-subject-tagissue:1678388909
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/767/issue_layout
twitter:imagehttps://opengraph.githubassets.com/bd875232d9a26339e10cac13f342bc8e0ce18e6b00d46b20599a0fa06191275f/serverless/serverless-python-requirements/issues/767
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/bd875232d9a26339e10cac13f342bc8e0ce18e6b00d46b20599a0fa06191275f/serverless/serverless-python-requirements/issues/767
og:image:altIs there an existing issue for this? I have searched existing issues, it hasn't been reported yet Use case description See: #734 Besides it being a bug report, it describes the use case, also see: ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemarkonose
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/767#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fserverless%2Fserverless-python-requirements%2Fissues%2F767
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%2F767
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/767
Reloadhttps://github.com/serverless/serverless-python-requirements/issues/767
Reloadhttps://github.com/serverless/serverless-python-requirements/issues/767
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
Support per-function requierments with shared codehttps://github.com/serverless/serverless-python-requirements/issues/767#top
https://github.com/markonose
markonosehttps://github.com/markonose
on Apr 21, 2023https://github.com/serverless/serverless-python-requirements/issues/767#issue-1678388909
#734https://github.com/serverless/serverless-python-requirements/issues/734
#168https://github.com/serverless/serverless-python-requirements/issues/168
#435https://github.com/serverless/serverless-python-requirements/issues/435
https://www.serverless.com/framework/docs/guides/composehttps://www.serverless.com/framework/docs/guides/compose
https://github.com/markonose
markonosehttps://github.com/markonose
on Apr 23, 2023https://github.com/serverless/serverless-python-requirements/issues/767#issuecomment-1519093772
https://github.com/doulighan
doulighanhttps://github.com/doulighan
on Jul 17, 2023https://github.com/serverless/serverless-python-requirements/issues/767#issuecomment-1638875622
https://github.com/alka1000
alka1000https://github.com/alka1000
on Jul 17, 2023https://github.com/serverless/serverless-python-requirements/issues/767#issuecomment-1638898066
https://github.com/martinezpl
martinezplhttps://github.com/martinezpl
on Jan 25, 2024https://github.com/serverless/serverless-python-requirements/issues/767#issuecomment-1910041087
Sign up for freehttps://github.com/signup?return_to=https://github.com/serverless/serverless-python-requirements/issues/767
Sign in to commenthttps://github.com/login?return_to=https://github.com/serverless/serverless-python-requirements/issues/767
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.