Compare commits

...
Author SHA1 Message Date
Bradley Schofield 0116c1baf6 Update specs 2024-08-08 11:31:34 +09:00
Bradley Schofield 110b6f7989 Merge branch 'feat-runtime-controls-1.5.x' of https://github.com/appwrite/appwrite into feat-runtime-controls-1.5.x 2024-08-08 11:28:59 +09:00
Bradley Schofield 81efc4aff9 Update test 2024-08-08 11:28:57 +09:00
078b159942 Update src/Appwrite/Platform/Workers/Builds.php
Co-authored-by: Christy Jacob <christyjacob4@gmail.com>
2024-08-08 11:28:03 +09:00
948fbc0916 Update src/Appwrite/Utopia/Response/Model/Func.php
Co-authored-by: Christy Jacob <christyjacob4@gmail.com>
2024-08-08 11:27:49 +09:00
Bradley Schofield 2926ae281a Add missing specs and update executor 2024-08-07 17:08:51 +09:00
Bradley Schofield 9da682ec48 Merge branch '1.5.x' into feat-runtime-controls-1.5.x 2024-08-06 18:57:55 +09:00
Bradley Schofield e51f912ab1 Address Jake's comments and add 0.5 cpu spec 2024-08-06 18:54:46 +09:00
Christy JacobandGitHub 085efb02c5 Merge pull request #8445 from appwrite/fix-template-tags
Fix: template tags
2024-08-05 17:04:12 +04:00
Bradley Schofield 6415533365 Update Specifications.php 2024-08-05 18:01:28 +09:00
Bradley Schofield 19e7769d8c Merge branch '1.5.x' into feat-runtime-controls-1.5.x 2024-08-05 17:38:14 +09:00
Bradley Schofield fb474734fe Ditch using an enum, use class 2024-08-05 16:16:24 +09:00
Bradley Schofield 4c56de8348 Move specification enum into an autoloaded directory 2024-08-05 15:53:09 +09:00
Jake BarnbyandGitHub 8f608e205f Merge pull request #8463 from appwrite/fix-1.5.x-fix-domains-events
Fix queueForUsage not triggering for domain executions
2024-08-05 16:04:18 +12:00
Bradley Schofield 3a91fee41b Run Linter 2024-08-05 12:24:27 +09:00
Bradley Schofield 4801fb816a Fix Tests 2024-08-05 12:21:10 +09:00
Christy Jacob 32a1aaca24 chore: revertomposer 2024-08-03 07:49:11 +00:00
Christy Jacob 7be4196a58 chore: refactor code 2024-08-03 07:22:34 +00:00
Bradley Schofield eaef82b613 Update functions.php 2024-08-02 17:00:42 +09:00
Bradley Schofield 275ecc9f83 Fix specifications and make builds memory minimum 1024 2024-08-02 16:45:22 +09:00
Bradley Schofield f5571b4caa Add Metric Tests to Domain Executions 2024-08-02 16:24:54 +09:00
Bradley Schofield 906de6a802 Fix queueForUsage not triggering for domain executions 2024-08-02 15:28:39 +09:00
Bradley Schofield aa21a1a200 Update RuntimeSpecification.php 2024-08-02 12:05:07 +09:00
Bradley Schofield 6e5e249e09 Update specs 2024-08-01 19:24:01 +09:00
Bradley Schofield dcbf8356c0 Merge branch '1.5.x' into feat-runtime-controls-1.5.x 2024-08-01 19:23:56 +09:00
Bradley Schofield 1574bfdc9a Update functions.php 2024-08-01 18:40:36 +09:00
Bradley Schofield facb1ad174 Cleanup leftovers and use hook for determining billing stuff 2024-08-01 15:30:24 +09:00
Christy JacobandGitHub 58aa2b0571 Merge pull request #8395 from appwrite/migration-clean-cache
Clean projects cache while migrating
2024-07-31 19:31:44 +04:00
Bradley Schofield 2060d3f09c Rename everything to use specification instead of size 2024-07-31 20:27:32 +09:00
shimon 00fc34a2a4 get project db key by region 2024-07-31 13:23:51 +03:00
Bradley Schofield 198a7973c7 Implement Eldad's Suggestions 2024-07-31 15:21:07 +09:00
shimon 29e169fe95 Merge branch '1.5.x' of github.com:appwrite/appwrite into migration-clean-cache 2024-07-30 22:29:35 +03:00
Christy JacobandGitHub e31bae7644 Merge pull request #8449 from appwrite/feat-1.5.x-mbSeconds-2
Move mbSeconds into 1.5.x
2024-07-30 13:25:37 +04:00
Bradley Schofield fddfcac0ea Regenerate Specs 2024-07-30 17:57:06 +09:00
Bradley Schofield f46e210000 Move mbSeconds into 1.5.x 2024-07-30 17:53:28 +09:00
Matej Bačo 85fa7268b5 Upgrade lib version 2024-07-30 07:51:57 +00:00
Matej Bačo e33a035a81 Upgrade lib 2024-07-29 21:01:32 +02:00
Matej Bačo 35a3542a9b Merge branch '1.5.x' into fix-template-tags 2024-07-29 20:00:18 +02:00
Steven NguyenandGitHub d1fbf8f571 Merge pull request #8442 from appwrite/1.5.x-update-migrations
Update lock file with new migrations version
2024-07-29 10:58:28 -07:00
Matej Bačo cb9e5bd0ae Upgrade VCS and support 0.1.x tags 2024-07-29 19:28:15 +02:00
Christy JacobandGitHub 4809f49aeb Merge pull request #8415 from appwrite/feat-strip-mail-vars
Feat strip mail vars
2024-07-29 19:03:27 +04:00
Bradley Schofield 6590d13fca Update lock file 2024-07-29 11:14:17 +09:00
Damodar LohaniandGitHub faf184f86e Merge pull request #8431 from appwrite/fix-calculations
Fix calculations
2024-07-24 18:19:09 +05:45
Damodar LohaniandGitHub e21165f216 Fix file size calculation 2024-07-24 16:21:09 +05:45
Bradley SchofieldandGitHub cb0baee4ad Merge branch '1.5.x' into feat-runtime-controls-1.5.x 2024-07-24 12:00:17 +09:00
Binyamin Yawitz 4eee8689d3 fixes: Clean URL variables 2024-07-22 09:37:28 -04:00
Christy JacobandGitHub b98102dc46 Merge pull request #8424 from appwrite/feat-add-new-audit-events
Add new audit events
2024-07-22 13:30:56 +04:00
Bradley Schofield 7d2a65f87e Run linter and address more comments 2024-07-22 18:17:38 +09:00
Bradley Schofield f0c1a62aa2 Remove CPU/Memory from document, add envs, add tests 2024-07-22 18:12:43 +09:00
Bradley Schofield 3792f816ad Add new audit events 2024-07-22 17:03:53 +09:00
shimon 2ef358e8dc linter 2024-07-21 09:27:12 +03:00
shimon 088ef769a5 Merge branch '1.5.x' of github.com:appwrite/appwrite into migration-clean-cache 2024-07-21 09:23:33 +03:00
Binyamin Yawitz 262c9a10f7 feat: Clean mail variables 2024-07-18 18:09:39 -04:00
Christy JacobandGitHub 4ce737e914 Merge pull request #8408 from appwrite/fix-vsc-deployments-path
fix: Setting `path` for vsc function deployments
2024-07-19 01:30:26 +04:00
Binyamin Yawitz 17c708a056 fix: Setting path for vsc function deployments 2024-07-17 13:44:07 -04:00
Bradley Schofield 667b69e146 Merge branch '1.5.x' into feat-runtime-controls-1.5.x 2024-07-17 17:04:04 +09:00
Jake BarnbyandGitHub 497272622e Merge pull request #8258 from appwrite/feat-sn-implement-deployment-metric
Implement deploymentsStorage metric for projects API
2024-07-17 14:59:44 +12:00
Bradley Schofield a57cc0a18e Address Christy's comments 2024-07-16 20:00:00 +09:00
740da0342f Update app/config/runtimes/enum.php
Co-authored-by: Christy Jacob <christyjacob4@gmail.com>
2024-07-16 19:41:47 +09:00
Bradley Schofield 372ad6ce43 Update mbSeconds calculation to use cpu cores 2024-07-16 19:12:40 +09:00
Bradley Schofield 4b1d3b0dfa Run Linter 2024-07-16 19:01:31 +09:00
Bradley Schofield 5f14500e48 Use Enums instead 2024-07-16 18:59:54 +09:00
Bradley Schofield 5507233582 Update Tests 2024-07-16 14:31:18 +09:00
Bradley Schofield e3b123d559 Implement Runtime Sizes instead of individual memory and cpu 2024-07-16 14:26:53 +09:00
shimon ada1746466 clean migration project cache 2024-07-15 12:20:01 +03:00
shimon 278fdf5823 clean migration project cache 2024-07-15 12:17:10 +03:00
Jake BarnbyandGitHub 68ea4593ad Merge pull request #8385 from appwrite/feat-gb-hours-1.5.x
Implement MBSeconds Metric on 1.5.X
2024-07-15 18:27:57 +12:00
Bradley Schofield f40d0fd515 Merge branch 'feat-runtime-controls-1.5.x' into feat-gb-hours-1.5.x 2024-07-15 14:11:24 +09:00
Bradley Schofield 59b239c128 Fix synchronous executions 2024-07-15 14:11:08 +09:00
Bradley Schofield 8222aa74ca Merge branch '1.5.x' into feat-sn-implement-deployment-metric 2024-07-15 13:59:47 +09:00
Bradley Schofield a710e9bfe4 Update UsageTest.php 2024-07-15 13:57:36 +09:00
Bradley Schofield 98ae495879 Fix Tests 2024-07-15 12:54:59 +09:00
Bradley Schofield 8ef309a4aa Run Linter 2024-07-15 11:59:02 +09:00
Bradley Schofield fce118ff34 Move GBHours to 1.5.x 2024-07-12 19:02:32 +09:00
Bradley Schofield 387828e3a7 Regenerate Specs 2024-07-12 18:29:06 +09:00
Bradley Schofield 824a70f936 Move Runtime Controls PR to 1.5.x 2024-07-12 18:25:57 +09:00
Steven NguyenandGitHub d98e04cf63 Merge pull request #8381 from appwrite/improve-event-data
improve: events data
2024-07-11 16:43:37 -07:00
Steven NguyenandGitHub 60fd178ea6 Merge pull request #8266 from appwrite/chore-deploy-dotnet
Deploy dotnet
2024-07-11 14:57:23 -07:00
Binyamin Yawitz 0988fd7581 improve: events data 2024-07-11 11:03:28 -04:00
Jake BarnbyandGitHub f17a9357fb Merge pull request #8377 from appwrite/feat-update-migrations
Update Migrations to 0.5
2024-07-10 18:23:08 +12:00
Bradley Schofield d84d227c2b Update Migrations to 0.5 2024-07-10 14:59:31 +09:00
Eldad A. FuxandGitHub 169629de9a Merge pull request #8374 from appwrite/feat-remove-detailed-trace
Remove detailed trace
2024-07-09 23:03:06 -04:00
Jake Barnby e74a5cbf6e Remove detailed trace from error logs 2024-07-09 15:15:03 +12:00
Steven NguyenandGitHub c55cab7dd9 Merge pull request #8363 from appwrite/chore-bump-console-4.3.23
Bump console to version 4.3.23
2024-07-08 19:57:13 -07:00
Steven NguyenandGitHub 555579be92 Bump console to version 4.3.23 2024-07-05 18:46:59 +00:00
Steven NguyenandGitHub f32cfa6827 Merge pull request #8346 from appwrite/update-functions-api
docs: update functions api reference
2024-07-03 21:57:58 -07:00
Steven NguyenandGitHub 343052eb90 Merge pull request #8305 from appwrite/update-acct-api-reference
Documentation: Update Account API Reference
2024-07-03 21:53:33 -07:00
Torsten DittmannandGitHub 98f0f86fa6 Merge pull request #8352 from appwrite/main
Sync main into 1.5.x
2024-07-03 18:38:41 +02:00
RichardandGitHub b2468a60f0 Merge branch 'main' into update-functions-api 2024-07-03 09:05:31 -04:00
RichardandGitHub 1539fc2b7c Merge branch 'main' into update-acct-api-reference 2024-07-03 09:04:45 -04:00
Jake BarnbyandGitHub ae87033974 Merge pull request #8327 from appwrite/chore-sync-1.5.x-into-main
Sync 1.5.x into main
2024-07-03 14:31:08 +12:00
Jake BarnbyandGitHub 04ae166e54 Merge branch '1.5.x' into chore-deploy-dotnet 2024-07-03 14:05:48 +12:00
choir27 dc07b5d028 docs: update functions api reference 2024-07-01 15:35:55 -04:00
Steven NguyenandGitHub 636497304e Merge branch '1.5.x' into chore-sync-1.5.x-into-main 2024-06-25 23:47:37 +00:00
Christy JacobandGitHub 8dbf887ab1 Merge pull request #8324 from appwrite/refactor-usage-sn
Sync refactor-usage-sn into 1.5.x
2024-06-25 22:50:42 +04:00
Christy JacobandGitHub 1a860e846f Merge pull request #8264 from appwrite/fix-cache-client-expires-header
Update Expires header via cache shared api
2024-06-25 21:02:13 +04:00
Torsten DittmannandGitHub 10444ab7c6 Merge pull request #8322 from appwrite/feat-1.5.8-release-prep
Prepare 1.5.8 release
2024-06-25 17:02:27 +02:00
RichardandGitHub e030ec6e3e Merge branch 'main' into update-acct-api-reference 2024-06-25 09:10:57 -04:00
Christy JacobandGitHub b9b48e7b91 Merge pull request #8312 from appwrite/fix-test-for-cl
increase longtext
2024-06-25 15:17:29 +04:00
Christy JacobandGitHub 8e5779c168 Merge pull request #8292 from appwrite/fix-certificate-emails
Fix certificate emails
2024-06-25 13:35:43 +04:00
Steven NguyenandGitHub 0df347d670 chore: regenerate specs 2024-06-25 04:13:38 +00:00
Steven NguyenandGitHub 66bf7086e6 Add 1.5.8 to CHANGES.md 2024-06-25 04:06:28 +00:00
Steven NguyenandGitHub 556d30a9fb Bump appwrite version to 1.5.8 2024-06-25 04:04:14 +00:00
Jake BarnbyandGitHub c63b1785ed Merge pull request #8321 from appwrite/chore-bump-console-4.3.14
Bump console to version 4.3.14
2024-06-25 15:23:54 +12:00
Steven NguyenandGitHub 827ad1446b Bump console to version 4.3.14 2024-06-25 02:37:55 +00:00
Jake BarnbyandGitHub 4ad987e4ef Merge pull request #8308 from appwrite/fix-8280-expire-error-when-creating-session
Fix 'Missing required attribute "expire"' on `users.createSession()`
2024-06-25 13:43:03 +12:00
Jake BarnbyandGitHub ef203dc075 Merge pull request #8297 from appwrite/fix-subscribers
Disable validation for subquery to prevent error
2024-06-25 13:38:47 +12:00
Jake BarnbyandGitHub 83cb303f03 Merge pull request #8317 from appwrite/fix-flaky-function-test
Fix flaky function test
2024-06-25 13:35:00 +12:00
Jake BarnbyandGitHub dc9f06976c Merge pull request #8316 from appwrite/fix-flaky-cert-test
Fix flaky certificate test
2024-06-25 13:33:50 +12:00
Steven NguyenandGitHub 3a3a0594dc fix(messaging): disable validation for subquery to prevent error
If there are more than 100 targets, the validation throws an error. This
change skips the validation so no error is thrown.
2024-06-24 23:38:41 +00:00
Steven NguyenandGitHub c6489d172f chore: bump utopia-php/database and related packages
utopia-php/database version 0.50.0 includes a new skipValidation()
function we can use to skip validation when making queries.
2024-06-24 23:38:40 +00:00
Steven NguyenandGitHub 13027fac5b fix(users): update session secret to be longer
The create session endpoint created a 6 character secret which is too
short. This changes the secret to be 256 characters which is in line
with the secret for `account.createEmailPasswordSession()`.
2024-06-24 23:21:45 +00:00
Steven NguyenandGitHub 34b2e15243 fix(users): fix expire error when creating user session
Before this, the Create session API call would throw:

> Invalid document structure: Missing required attribute "expire"

This is because the `expire` attribute is required, but it was omitted
from the document. This PR ensures the `expire` attribute is set when
creating the session document.
2024-06-24 23:21:44 +00:00
Steven NguyenandGitHub 9ccf4991e3 fix(functions): fix flaky function test
The execution is async so give the function a bit more time to execute.
2024-06-24 19:15:41 +00:00
Steven NguyenandGitHub 01fc6a699a fix(health): fix flaky certificate test
There seems to be a load balancer in front of www.google.com that has
either a certificate issuer of "Google Trust Services LLC" or
"Google Trust Services". This causes the test to fail intermittently.

This PR updates the test to check for the substring
"Google Trust Services" instead of the exact string
"Google Trust Services LLC".
2024-06-24 19:02:44 +00:00
Damodar Lohani d19141fc6a sleep after password change 2024-06-24 07:49:18 +00:00
Damodar Lohani e9cfd0ac8b fix health service test 2024-06-24 06:09:39 +00:00
Damodar Lohani e5af708dbc update health certificate test 2024-06-24 06:02:54 +00:00
Damodar Lohani d33048b792 adding 10 rows 2024-06-24 05:58:29 +00:00
Damodar Lohani 92bc795d7a reset test 2024-06-24 05:07:25 +00:00
Damodar Lohani e88b7742c6 filter 2024-06-24 05:04:51 +00:00
Damodar Lohani 6cf10fa43f partial test 2024-06-24 04:47:32 +00:00
Damodar Lohani 7f8656be6f fix scheme 2024-06-24 04:46:24 +00:00
Damodar Lohani 592ada23d0 increase longtext 2024-06-24 04:45:53 +00:00
Steven NguyenandGitHub ae3bcb2efe Merge pull request #8271 from ItzNotABug/fix-7892-add-defaults-to-migrations
Add `default` to Collection Attributes in Migration
2024-06-21 08:46:46 -07:00
choir27 6a406454ba docs: update api reference 2024-06-21 10:41:46 -04:00
Christy JacobandGitHub 8764a7491a Merge pull request #8296 from appwrite/refactor-usage-sn
Sync refactor-usage-sn into 1.5.x
2024-06-21 12:09:16 +05:30
Jake BarnbyandGitHub ba43358ac4 Merge pull request #8298 from appwrite/fix-migrate-validation
Disable validation for project DBs during migration
2024-06-21 13:46:55 +12:00
Steven NguyenandGitHub 72f8b2001f fix: Disable validation for project DBs during migration
Skip the validation so that queries that typically fail can pass. This
is fine because the validation is failing on internal attributes such
as an $id for cache key with * and $id for attributes that are too long
because we prefix the $id with the internal database and collection id.
2024-06-20 23:00:49 +00:00
Christy JacobandGitHub 991a22f642 Merge pull request #8290 from appwrite/1.5.x
Sync 1.5.x into refactor-usage-sn
2024-06-21 00:38:21 +05:30
Bradley Schofield ea95e80cbf Use localised subject string 2024-06-20 17:47:16 +09:00
ItzNotABug 95e463a7ae Merge branch 'fix-7892-add-defaults-to-migrations' of https://github.com/ItzNotABug/appwrite.source into fix-7892-add-defaults-to-migrations 2024-06-20 14:15:17 +05:30
DarshanandGitHub 441811e808 Merge branch '1.5.x' into fix-7892-add-defaults-to-migrations 2024-06-20 14:15:09 +05:30
ItzNotABug ee6137db3d Merge branch 'fix-7892-add-defaults-to-migrations' of https://github.com/ItzNotABug/appwrite.source into fix-7892-add-defaults-to-migrations 2024-06-20 14:14:48 +05:30
ItzNotABug eb36ae5c61 add: default to V20 migration. 2024-06-20 14:14:21 +05:30
Bradley Schofield dbfae94552 Fix certificate emails 2024-06-20 17:28:21 +09:00
Steven NguyenandGitHub e3bc1887a4 Merge pull request #8263 from appwrite/docs-clarify-optional-url
docs: update text description in request table
2024-06-19 09:45:53 -07:00
Christy JacobandGitHub 691ce68636 Merge pull request #8249 from appwrite/update-platform
update to use latest platform with module
2024-06-19 12:21:07 +05:30
Christy JacobandGitHub c5e788c2ef Merge pull request #7888 from appwrite/feat-security-emails
New environment for certificates and security emails
2024-06-19 12:20:55 +05:30
Christy JacobandGitHub 868e57a9a3 Merge pull request #8281 from appwrite/main
Sync main into 1.5.x
2024-06-19 12:18:12 +05:30
DarshanandGitHub e0779013d0 Merge branch 'main' into fix-7892-add-defaults-to-migrations 2024-06-19 12:10:24 +05:30
RichardandGitHub 0dc553f31d Merge branch 'main' into docs-clarify-optional-url 2024-06-18 09:12:32 -04:00
Steven NguyenandGitHub 4b24848f22 Merge pull request #8236 from 2002Bishwajeet/fix-user-model
Fix: Don't set the target field if the existing target document is false
2024-06-17 17:11:27 -07:00
Steven NguyenandGitHub 2e187107da Merge pull request #8269 from appwrite/docs-fix-storage-hyperlink
docs: fix hyperlink in storage docs
2024-06-17 16:58:51 -07:00
Steven NguyenandGitHub 120b5aee47 Merge pull request #8228 from ItzNotABug/add-test-for-user-id
Add Test to Validate Headers aren't Overridden
2024-06-17 16:09:50 -07:00
ItzNotABug 4fd94fd7b1 fix: add defaults to collection attributes. 2024-06-14 15:37:30 +05:30
choir27 84d9b4befe docs: fix hyperlink in storage code snippet 2024-06-13 09:59:20 -04:00
shimon 4bedb2f52a Update Expires header via cache shared api 2024-06-13 09:40:36 +03:00
shimon 3f42b03f8e Update Expires header via cache shared api 2024-06-13 09:40:03 +03:00
Jake Barnby df6b39c9d0 Deploy dotnet 2024-06-13 15:01:41 +12:00
shimon d2a2caedbd Update Expires header via cache shared api 2024-06-12 18:42:04 +03:00
choir27 897ae1c859 docs: update text description in request table 2024-06-12 10:47:48 -04:00
Bishwajeet ParhiandGitHub eca2bbdb5d Merge branch 'main' into fix-user-model 2024-06-11 21:18:11 +05:30
Bishwajeet Parhi 190560b8ef chore: append attributes instead of replace 2024-06-11 21:17:25 +05:30
Steven NguyenandGitHub f91a8a9135 Merge pull request #8179 from navjotNSK/bug-7880-location_hk_issue
Adding hk in translations
2024-06-11 11:00:00 -04:00
Steven NguyenandGitHub 0376189dbc Merge pull request #8239 from ItzNotABug/8159-delete-expired-targets-per-project
Delete Expired Targets Per Project
2024-06-11 10:24:14 -04:00
Bradley Schofield 9113f265b7 Fix Tests 2024-06-11 06:40:37 +00:00
Bradley Schofield d8b893c7c9 Small fixes 2024-06-11 14:52:21 +09:00
Bradley Schofield 94330cd539 Update Specs 2024-06-11 14:50:03 +09:00
Bradley Schofield 98ca5faef1 Add Tests 2024-06-11 14:36:32 +09:00
Bradley Schofield 83d093805f Implement deploymentsStorage metric for projects API 2024-06-11 14:14:38 +09:00
Damodar Lohani 26413566dc fix format 2024-06-09 11:36:35 +00:00
Damodar Lohani c179e89fdf update to use latest platform with module 2024-06-09 01:03:40 +00:00
ItzNotABug a34ec72048 fix: delete expired targets per project. 2024-06-06 12:01:32 +05:30
Bishwajeet Parhi 485b8eeb8b chore: misc test assertions improvements 2024-06-05 23:53:31 +05:30
Bishwajeet Parhi cccda2a46c fix: Don't set target attribute if no existing Target found 2024-06-05 23:34:01 +05:30
Damodar Lohani f762d66c5e fix typo 2024-06-04 01:31:05 +00:00
Damodar LohaniandGitHub 66ac96580b Merge branch 'main' into feat-security-emails 2024-06-04 06:51:24 +05:45
ItzNotABug 37da4a0cd3 review comments. 2024-06-03 14:19:59 +05:30
ItzNotABug b54a599960 update test name for clarity. 2024-06-03 14:13:08 +05:30
ItzNotABug 52f5a5c40c update test. 2024-06-03 14:10:20 +05:30
ItzNotABug 1a42d118f6 add: test to validate user-id isn't overridden. 2024-06-01 19:18:35 +05:30
Navjot SinghandGitHub c07c7889d3 Merge branch 'main' into bug-7880-location_hk_issue 2024-06-01 17:29:57 +05:30
Navjot SinghandGitHub ade0472a5f Merge branch 'main' into bug-7880-location_hk_issue 2024-05-24 12:24:08 +05:30
navjotNSK fcbab74f04 All translations added. 2024-05-23 15:55:57 +05:30
navjotNSK 2621d948c6 All translations added. 2024-05-23 15:53:59 +05:30
navjotNSK c29fc5e72e hk added till cs.json 2024-05-22 16:43:40 +05:30
Damodar Lohani 14a0dd3166 Merge remote-tracking branch 'origin/main' into feat-security-emails 2024-05-06 01:04:44 +00:00
Damodar Lohani be1c147658 update console 2024-05-06 01:00:20 +00:00
Damodar Lohani b61e0f08f6 make required 2024-05-06 00:58:23 +00:00
Damodar Lohani 00c45c2507 new environment for certificates and security emails 2024-03-31 03:32:55 +00:00
149 changed files with 56020 additions and 278 deletions
+3 -2
View File
@@ -9,7 +9,8 @@ _APP_CONSOLE_COUNTRIES_DENYLIST=AQ
_APP_CONSOLE_HOSTNAMES=localhost,appwrite.io,*.appwrite.io
_APP_SYSTEM_EMAIL_NAME=Appwrite
_APP_SYSTEM_EMAIL_ADDRESS=team@appwrite.io
_APP_SYSTEM_SECURITY_EMAIL_ADDRESS=security@appwrite.io
_APP_EMAIL_SECURITY=security@appwrite.io
_APP_EMAIL_CERTIFICATES=certificates@appwrite.io
_APP_SYSTEM_RESPONSE_FORMAT=
_APP_OPTIONS_ABUSE=disabled
_APP_OPTIONS_ROUTER_PROTECTION=disabled
@@ -66,7 +67,7 @@ _APP_STORAGE_PREVIEW_LIMIT=20000000
_APP_FUNCTIONS_SIZE_LIMIT=30000000
_APP_FUNCTIONS_TIMEOUT=900
_APP_FUNCTIONS_BUILD_TIMEOUT=900
_APP_FUNCTIONS_CPUS=1
_APP_FUNCTIONS_CPUS=2
_APP_FUNCTIONS_MEMORY=1024
_APP_FUNCTIONS_INACTIVE_THRESHOLD=600
_APP_FUNCTIONS_MAINTENANCE_INTERVAL=600
+1 -1
View File
@@ -1,4 +1,4 @@
[submodule "app/console"]
path = app/console
url = https://github.com/appwrite/console
branch = 4.3.5
branch = 4.3.23
+34
View File
@@ -1,3 +1,37 @@
# Version 1.5.8
## What's Changed
### Notable changes
* Support Twilio messaging service SID in [8222](https://github.com/appwrite/appwrite/pull/8222)
* Improve cache performance in [8230](https://github.com/appwrite/appwrite/pull/8230)
* Add hk in translations in [8179](https://github.com/appwrite/appwrite/pull/8179)
* Bump console to version 4.3.14 in [8321](https://github.com/appwrite/appwrite/pull/8321)
* Update pwd abuse in [8255](https://github.com/appwrite/appwrite/pull/8255)
### Fixes
* Ensure usage is counted for errors in [8120](https://github.com/appwrite/appwrite/pull/8120)
* Fix MFA for OAuth2 only accounts in [8245](https://github.com/appwrite/appwrite/pull/8245)
* Delete Expired Targets Per Project in [8239](https://github.com/appwrite/appwrite/pull/8239)
* Don't set the target field if the existing target document is false in [8236](https://github.com/appwrite/appwrite/pull/8236)
* Disable validation for project DBs during migration in [8298](https://github.com/appwrite/appwrite/pull/8298)
* Add `default` to Collection Attributes in Migration in [8271](https://github.com/appwrite/appwrite/pull/8271)
* Fix Create bucket endpoint validator for maximum file size in [8275](https://github.com/appwrite/appwrite/pull/8275)
* Disable validation for subquery to prevent error in [8297](https://github.com/appwrite/appwrite/pull/8297)
* Fix 'Missing required attribute "expire"' on `users.createSession()` in [8308](https://github.com/appwrite/appwrite/pull/8308)
### Miscellaneous
* Bump base image from 0.9.0 to 0.9.1 in [8238](https://github.com/appwrite/appwrite/pull/8238)
* Use latest Platform and add Core module in [7936](https://github.com/appwrite/appwrite/pull/7936)
* Add Test to Validate Headers aren't Overridden in [8228](https://github.com/appwrite/appwrite/pull/8228)
* Fix hyperlink in storage docs in [8269](https://github.com/appwrite/appwrite/pull/8269)
* Update cache & database in [8285](https://github.com/appwrite/appwrite/pull/8285)
* Fix flaky certificate test in [8316](https://github.com/appwrite/appwrite/pull/8316)
* Fix flaky function test in [8317](https://github.com/appwrite/appwrite/pull/8317)
# Version 1.5.7
## What's Changed
+3 -3
View File
@@ -67,7 +67,7 @@ docker run -it --rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
--entrypoint="install" \
appwrite/appwrite:1.5.7
appwrite/appwrite:1.5.8
```
### Windows
@@ -79,7 +79,7 @@ docker run -it --rm ^
--volume //var/run/docker.sock:/var/run/docker.sock ^
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
--entrypoint="install" ^
appwrite/appwrite:1.5.7
appwrite/appwrite:1.5.8
```
#### PowerShell
@@ -89,7 +89,7 @@ docker run -it --rm `
--volume /var/run/docker.sock:/var/run/docker.sock `
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
--entrypoint="install" `
appwrite/appwrite:1.5.7
appwrite/appwrite:1.5.8
```
运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。
+3 -3
View File
@@ -75,7 +75,7 @@ docker run -it --rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
--entrypoint="install" \
appwrite/appwrite:1.5.7
appwrite/appwrite:1.5.8
```
### Windows
@@ -87,7 +87,7 @@ docker run -it --rm ^
--volume //var/run/docker.sock:/var/run/docker.sock ^
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
--entrypoint="install" ^
appwrite/appwrite:1.5.7
appwrite/appwrite:1.5.8
```
#### PowerShell
@@ -97,7 +97,7 @@ docker run -it --rm `
--volume /var/run/docker.sock:/var/run/docker.sock `
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
--entrypoint="install" `
appwrite/appwrite:1.5.7
appwrite/appwrite:1.5.8
```
Once the Docker installation is complete, go to http://localhost to access the Appwrite console from your browser. Please note that on non-Linux native hosts, the server might take a few minutes to start after completing the installation.
-1
View File
@@ -185,7 +185,6 @@ CLI::setResource('logError', function (Registry $register) {
$log->addExtra('file', $error->getFile());
$log->addExtra('line', $error->getLine());
$log->addExtra('trace', $error->getTraceAsString());
$log->addExtra('detailedTrace', $error->getTrace());
$log->setAction($action);
+12 -1
View File
@@ -3054,7 +3054,18 @@ $projectCollections = array_merge([
'required' => false,
'default' => null,
'filters' => [],
]
],
[
'array' => false,
'$id' => ID::custom('specification'),
'type' => Database::VAR_STRING,
'format' => '',
'size' => 128,
'signed' => false,
'required' => false,
'default' => APP_FUNCTION_BASE_SPECIFICATION,
'filters' => [],
],
],
'indexes' => [
[
-1
View File
@@ -524,7 +524,6 @@ return [
'description' => 'Synchronous function execution timed out. Use asynchronous execution instead, or ensure the execution duration doesn\'t exceed 30 seconds.',
'code' => 408,
],
/** Builds */
Exception::BUILD_NOT_FOUND => [
'name' => Exception::BUILD_NOT_FOUND,
@@ -4,7 +4,9 @@
<table border="0" cellspacing="0" cellpadding="0" style="padding-top: 10px; padding-bottom: 10px; display: inline-block;">
<tr>
<td align="center" style="border-radius: 8px; background-color: #ffffff;">
<p style="text-align: start; font-size: 14px; font-family: Inter; color: #414146; text-decoration: none; border-radius: 8px; padding: 32px; border: 1px solid #EDEDF0; display: inline-block; word-break: break-word;">{{error}}</p>
<p style="text-align: start; font-size: 14px; font-family: Inter; color: #414146; text-decoration: none; border-radius: 8px; padding: 32px; border: 1px solid #EDEDF0; display: inline-block; word-break: break-word;">
{{error}}
</p>
</td>
</tr>
</table>
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroasië",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "غرينادا",
"countries.gt": "غواتيمالا",
"countries.gy": "غيانا",
"countries.hk": "هونغ كونغ",
"countries.hn": "هندوراس",
"countries.hr": "كرواتيا",
"countries.ht": "هايتي",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "গ্ৰেনাডা",
"countries.gt": "গুয়াতেমালা",
"countries.gy": "গায়ানা",
"countries.hk": "হং কং",
"countries.hn": "হণ্ডুৰাছ",
"countries.hr": "ক্ৰোৱেছিয়া",
"countries.ht": "হাইতি",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Qrenada",
"countries.gt": "Qvatemala",
"countries.gy": "Guyana",
"countries.hk": "Honq Konq",
"countries.hn": "Honduras",
"countries.hr": "Xorvatiya",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Грэнада",
"countries.gt": "Гватэмала",
"countries.gy": "Гаяна",
"countries.hk": "Гонконг",
"countries.hn": "Гандурас",
"countries.hr": "Харватыя",
"countries.ht": "Гаіці",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Гренада",
"countries.gt": "Гватемала",
"countries.gy": "Гвиана",
"countries.hk": "Хонг Конг",
"countries.hn": "Хондурас",
"countries.hr": "Хърватия",
"countries.ht": "Хаити",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "ग्रेनाडा",
"countries.gt": "ग्वाटेमाला",
"countries.gy": "गयाना",
"countries.hk": "हांगकांग",
"countries.hn": "होंडुरस",
"countries.hr": "क्रोएशिया",
"countries.ht": "हैती",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "গ্রেনাডা",
"countries.gt": "গুয়াতেমালা",
"countries.gy": "গায়ানা",
"countries.hk": "হংকং",
"countries.hn": "হন্ডুরাস",
"countries.hr": "ক্রোয়েশিয়া",
"countries.ht": "হাইতি",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Gvajana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Hrvatska",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Granada",
"countries.gt": "Guatemala",
"countries.gy": "Guaiana",
"countries.hk": "Hong Kong",
"countries.hn": "Hondures",
"countries.hr": "Croàcia",
"countries.ht": "Haití",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Chorvatsko",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroatien",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroatien",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Γρενάδα",
"countries.gt": "Γουατεμάλα",
"countries.gy": "Γουιάνα",
"countries.hk": "Χονγκ Κονγκ",
"countries.hn": "Ονδούρα",
"countries.hr": "Κροατία",
"countries.ht": "Αϊτή",
+7
View File
@@ -43,6 +43,12 @@
"emails.invitation.footer": "If you are not interested, you can ignore this message.",
"emails.invitation.thanks": "Thanks",
"emails.invitation.signature": "{{project}} team",
"emails.certificate.subject": "Certificate failure for %s",
"emails.certificate.hello": "Hello",
"emails.certificate.body": "Certificate for your domain '{{domain}}' could not be generated. This is attempt no. {{attempt}}, and the failure was caused by: {{error}}",
"emails.certificate.footer": "Your previous certificate will be valid for 30 days since the first failure. We highly recommend investigating this case, otherwise your domain will end up without a valid SSL communication.",
"emails.certificate.thanks": "Thanks",
"emails.certificate.signature": "{{project}} team",
"sms.verification.body": "{{secret}}",
"locale.country.unknown": "Unknown",
"countries.af": "Afghanistan",
@@ -117,6 +123,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croatia",
"countries.ht": "Haiti",
+1
View File
@@ -99,6 +99,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croatia",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Granada",
"countries.gt": "Guatemala",
"countries.gy": "Guayana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croacia",
"countries.ht": "Haití",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "گرنادا",
"countries.gt": "گواتمالا",
"countries.gy": "گویان",
"countries.hk": "هنگ کنگ",
"countries.hn": "هندوراس",
"countries.hr": "کرواسی",
"countries.ht": "هائیتی",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroatia",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Gujana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroatia",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenade",
"countries.gt": "Guatemala",
"countries.gy": "Guyane",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croatie",
"countries.ht": "Haïti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Greanáda",
"countries.gt": "Guatamala",
"countries.gy": "An Ghuáin",
"countries.hk": "Hong Kong",
"countries.hn": "Hondúras",
"countries.hr": "An Chróit",
"countries.ht": "Háítí",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "ગ્રેનાડા",
"countries.gt": "ગ્વાટેમાલા",
"countries.gy": "ગુયાના",
"countries.hk": "હોંગ કોંગ",
"countries.hn": "હોન્ડુરાસ",
"countries.hr": "ક્રોએશિયા",
"countries.ht": "હૈતી",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "גרנדה",
"countries.gt": "גואטמלה",
"countries.gy": "גיאנה",
"countries.hk": "הונג קונג",
"countries.hn": "הונדורס",
"countries.hr": "קרואטיה",
"countries.ht": "האיטי",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "ग्रेनाडा",
"countries.gt": "ग्वाटेमाला",
"countries.gy": "गयाना",
"countries.hk": "हांग कांग",
"countries.hn": "होंडुरस",
"countries.hr": "क्रोएशिया",
"countries.ht": "हैती",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Gvatemala",
"countries.gy": "Gvajana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Hrvatska",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Horvátország",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Գրենադա",
"countries.gt": "Գվատեմալա",
"countries.gy": "Գայանա",
"countries.hk": "Հոնգ Կոնգ",
"countries.hn": "Գոնդուրաս",
"countries.hr": "Խորվաթիա",
"countries.ht": "Հաիթի",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroasia",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Gvatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Hondúras",
"countries.hr": "Króatía",
"countries.ht": "Haítí",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croazia",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "グレナダ",
"countries.gt": "グアテマラ",
"countries.gy": "ガイアナ",
"countries.hk": "香港",
"countries.hn": "ホンジュラス",
"countries.hr": "クロアチア",
"countries.ht": "ハイチ",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croatia",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "ហ្គ្រេណាដា",
"countries.gt": "ហ្គាតេម៉ាឡា",
"countries.gy": "ហ្គីយ៉ាណា",
"countries.hk": "ហុងកុង",
"countries.hn": "ហុងឌូរ៉ាស",
"countries.hr": "ក្រូអាត",
"countries.ht": "ហៃទី",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "ಗ್ರೆನಡಾ",
"countries.gt": "ಗ್ವಾಟೆಮಾಲಾ",
"countries.gy": "ಗಯಾನಾ",
"countries.hk": "ಹಾಂಗ್ ಕಾಂಗ್",
"countries.hn": "ಹೊಂಡುರಾಸ್",
"countries.hr": "ಕ್ರೊಯೇಷಿಯಾ",
"countries.ht": "ಹೈಟಿ",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "그레나다",
"countries.gt": "과테말라",
"countries.gy": "기아나",
"countries.hk": "홍콩",
"countries.hn": "온두라스",
"countries.hr": "크로아티아",
"countries.ht": "아이티",
+2 -1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croatia",
"countries.ht": "Haiti",
@@ -250,4 +251,4 @@
"emails.certificate.thanks": "Gratias",
"emails.certificate.signature": "team {{project}}",
"sms.verification.body": "{{secret}}"
}
}
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Gvatemala",
"countries.gy": "Gajana",
"countries.hk": "Honkongas",
"countries.hn": "Hondūras",
"countries.hr": "Kroatija",
"countries.ht": "Haitis",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Gvatemala",
"countries.gy": "Gajāna",
"countries.hk": "Honkonga",
"countries.hn": "Hondurasa",
"countries.hr": "Horvātija",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "ഗ്രെനാഡ",
"countries.gt": "ഗ്വാട്ടിമാല",
"countries.gy": "ഗയാന",
"countries.hk": "ഹോങ്കോങ്",
"countries.hn": "ഹോണ്ടുറാസ്",
"countries.hr": "ക്രോയേഷ്യ",
"countries.ht": "ഹെയ്തി",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "ग्रेनाडा",
"countries.gt": "ग्वाटेमाला",
"countries.gy": "गुयाना",
"countries.hk": "हाँगकांग",
"countries.hn": "होंडुरास",
"countries.hr": "क्रोएशिया",
"countries.ht": "हैती",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Granada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroatia",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroatia",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "ग्रेनेडा",
"countries.gt": "ग्वाटेमाला",
"countries.gy": "गुयाना",
"countries.hk": "हाँगकाँग",
"countries.hn": "होन्डुरस",
"countries.hr": "क्रोएशिया",
"countries.ht": "हैती",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hongkong",
"countries.hn": "Honduras",
"countries.hr": "Croatië",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroatia",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "ଗ୍ରେନାଡା",
"countries.gt": "ଗୁଆଟେମାଲା",
"countries.gy": "ଗୁଇନ୍ଦା",
"countries.hk": "ହଂ କଙ୍ଗ",
"countries.hn": "ହୋଣ୍ଡୁରାସ୍",
"countries.hr": "କ୍ରୋଏସିଆ",
"countries.ht": "ହାଇତି",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "ਗ੍ਰੇਨਾਡਾ",
"countries.gt": "ਗੁਆਟੇਮਾਲਾ",
"countries.gy": "ਗੇਆਨਾ",
"countries.hk": "ਹਾਂਗ ਕਾਂਗ",
"countries.hn": "ਹੌਂਡੂਰਸ",
"countries.hr": "ਕਰੋਸ਼ੀਆ",
"countries.ht": "ਹੈਤੀ",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Gwatemala",
"countries.gy": "Gujana",
"countries.hk": "Hongkong",
"countries.hn": "Honduras",
"countries.hr": "Chorwacja",
"countries.ht": "Haiti",
@@ -100,6 +100,7 @@
"countries.gd": "Granada",
"countries.gt": "Guatemala",
"countries.gy": "Guiana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croácia",
"countries.ht": "Haiti",
@@ -100,6 +100,7 @@
"countries.gd": "Granada",
"countries.gt": "Guatemala",
"countries.gy": "Guiana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croácia",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croația",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Гренада",
"countries.gt": "Гватемала",
"countries.gy": "Гайана",
"countries.hk": "Гонконг",
"countries.hn": "Гондурас",
"countries.hr": "Хорватия",
"countries.ht": "Гаити",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "ग्रेनेडा",
"countries.gt": "ग्वाटेमाला",
"countries.gy": "गुयाना",
"countries.hk": "हांगकांग",
"countries.hn": "होंडुरस्‌",
"countries.hr": "क्रोएशिया",
"countries.ht": "हैती",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "گرينڊا",
"countries.gt": "گٽيمالا",
"countries.gy": "گيانا",
"countries.hk": "هانگ کانگ",
"countries.hn": "هونڊرس",
"countries.hr": "ڪوريٽيا",
"countries.ht": "هيٽي",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "ග්‍රෙනාඩා",
"countries.gt": "ග්වාතමාලාව",
"countries.gy": "ගයනා",
"countries.hk": "හොංකොං",
"countries.hn": "හොන්ඩුරාස්",
"countries.hr": "ක්‍රොඒෂියාව",
"countries.ht": "හයිටි",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hongkong",
"countries.hn": "Honduras",
"countries.hr": "Chorvátsko",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Gvatemala",
"countries.gy": "Gvajana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Hrvaška",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croatia",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guajana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroacia",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroatien",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "கிரெனடா",
"countries.gt": "குவாத்தமாலா",
"countries.gy": "கயானா",
"countries.hk": "ஹாங்காங்",
"countries.hn": "ஹொண்டூராஸ்",
"countries.hr": "குரோவாசியா",
"countries.ht": "ஹைத்தி",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "గ్రెనడా",
"countries.gt": "గ్వాటెమాల",
"countries.gy": "గయానా",
"countries.hk": "హాంగ్ కొంగ",
"countries.hn": "హోండురాస్",
"countries.hr": "క్రొయేషియా",
"countries.ht": "హైతీ",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "เกรเนดา",
"countries.gt": "กัวเตมาลา",
"countries.gy": "กายอานา",
"countries.hk": "ฮ่องกง",
"countries.hn": "ฮอนดูรัส",
"countries.hr": "โครเอเชีย",
"countries.ht": "ไฮติ",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guwatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Kroasya",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Hırvatistan",
"countries.ht": "Haiti",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Гренада",
"countries.gt": "Гватемала",
"countries.gy": "Гайана",
"countries.hk": "Гонконг",
"countries.hn": "Гондурас",
"countries.hr": "Хорватія",
"countries.ht": "Гаїті",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "گریناڈا",
"countries.gt": "گوئٹے مالا",
"countries.gy": "گیانا",
"countries.hk": "ہانگ کانگ",
"countries.hn": "ہونڈوراس",
"countries.hr": "کروشیا",
"countries.ht": "ہیٹی",
+1
View File
@@ -100,6 +100,7 @@
"countries.gd": "Grenada",
"countries.gt": "Guatemala",
"countries.gy": "Guyana",
"countries.hk": "Hong Kong",
"countries.hn": "Honduras",
"countries.hr": "Croatia",
"countries.ht": "Haiti",
@@ -100,6 +100,7 @@
"countries.gd": "格林纳达",
"countries.gt": "危地马拉",
"countries.gy": "圭亚那",
"countries.hk": "香港",
"countries.hn": "洪都拉斯",
"countries.hr": "克罗地亚",
"countries.ht": "海地",
@@ -100,6 +100,7 @@
"countries.gd": "格瑞那達",
"countries.gt": "瓜地馬拉",
"countries.gy": "蓋亞那",
"countries.hk": "香港",
"countries.hn": "宏都拉斯",
"countries.hr": "克羅埃西亞",
"countries.ht": "海地",
+1 -1
View File
@@ -375,7 +375,7 @@ return [
[
'key' => 'dotnet',
'name' => '.NET',
'version' => '0.8.2',
'version' => '0.8.3',
'url' => 'https://github.com/appwrite/sdk-for-dotnet',
'package' => 'https://www.nuget.org/packages/Appwrite',
'enabled' => true,
+51
View File
@@ -0,0 +1,51 @@
<?php
use Appwrite\Functions\Specification;
return [
Specification::S_05VCPU_512MB => [
'slug' => 's-05vcpu-512mb',
'memory' => 512,
'cpus' => 0.5
],
Specification::S_1VCPU_512MB => [
'slug' => 's-1vcpu-512mb',
'memory' => 512,
'cpus' => 1
],
Specification::S_1VCPU_1GB => [
'slug' => 's-1vcpu-1gb',
'memory' => 1024,
'cpus' => 1
],
Specification::S_2VCPU_2GB => [
'slug' => 's-2vcpu-2gb',
'memory' => 2048,
'cpus' => 2
],
Specification::S_2VCPU_4GB => [
'slug' => 's-2vcpu-4gb',
'memory' => 4096,
'cpus' => 2
],
Specification::S_4VCPU_4GB => [
'slug' => 's-4vcpu-4gb',
'memory' => 4096,
'cpus' => 4
],
Specification::S_4VCPU_8GB => [
'slug' => 's-4vcpu-8gb',
'memory' => 8192,
'cpus' => 4
],
Specification::S_8VCPU_4GB => [
'slug' => 's-8vcpu-4gb',
'memory' => 4096,
'cpus' => 8
],
Specification::S_8VCPU_8GB => [
'slug' => 's-8vcpu-8gb',
'memory' => 8192,
'cpus' => 8
]
];
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+19 -1
View File
@@ -162,13 +162,31 @@ return [
],
[
'name' => '_APP_SYSTEM_SECURITY_EMAIL_ADDRESS',
'description' => 'This is the email address used to issue SSL certificates for custom domains or the user agent in your webhooks payload.',
'description' => 'Deprecated since 1.5.1 use _APP_EMAIL_SECURITY and _APP_EMAIL_CERTIFICATES instead',
'introduction' => '0.7.0',
'default' => 'certs@appwrite.io',
'required' => false,
'question' => '',
'filter' => ''
],
[
'name' => '_APP_EMAIL_SECURITY',
'description' => 'This is the email address used as the user agent in your webhooks payload.',
'introduction' => '1.5.1',
'default' => '',
'required' => false,
'question' => '',
'filter' => ''
],
[
'name' => '_APP_EMAIL_CERTIFICATES',
'description' => 'This is the email address used to issue SSL certificates for custom domains',
'introduction' => '1.5.1',
'default' => '',
'required' => true,
'question' => '',
'filter' => ''
],
[
'name' => '_APP_USAGE_STATS',
'description' => 'This variable allows you to disable the collection and displaying of usage stats. This value is set to \'enabled\' by default, to disable the usage stats set the value to \'disabled\'. When disabled, it\'s recommended to turn off the Worker Usage container to reduce resource usage.',
+9 -5
View File
@@ -290,7 +290,9 @@ App::post('/v1/account')
$existingTarget = $dbForProject->findOne('targets', [
Query::equal('identifier', [$email]),
]);
$user->setAttribute('targets', [...$user->getAttribute('targets', []), $existingTarget]);
if($existingTarget) {
$user->setAttribute('targets', $existingTarget, Document::SET_TYPE_APPEND);
}
}
$dbForProject->purgeCachedDocument('users', $user->getId());
@@ -1670,10 +1672,10 @@ App::post('/v1/account/tokens/magic-url')
->inject('queueForEvents')
->inject('queueForMails')
->action(function (string $userId, string $email, string $url, bool $phrase, Request $request, Response $response, Document $user, Document $project, Database $dbForProject, Locale $locale, Event $queueForEvents, Mail $queueForMails) {
if (empty(System::getEnv('_APP_SMTP_HOST'))) {
throw new Exception(Exception::GENERAL_SMTP_DISABLED, 'SMTP disabled');
}
$url = htmlentities($url);
if ($phrase === true) {
$phrase = Phrase::generate();
@@ -2858,6 +2860,7 @@ App::post('/v1/account/recovery')
if (empty(System::getEnv('_APP_SMTP_HOST'))) {
throw new Exception(Exception::GENERAL_SMTP_DISABLED, 'SMTP Disabled');
}
$url = htmlentities($url);
$roles = Authorization::getRoles();
$isPrivilegedUser = Auth::isPrivilegedUser($roles);
@@ -3121,6 +3124,7 @@ App::post('/v1/account/verification')
throw new Exception(Exception::GENERAL_SMTP_DISABLED, 'SMTP Disabled');
}
$url = htmlentities($url);
if ($user->getAttribute('emailVerification')) {
throw new Exception(Exception::USER_EMAIL_ALREADY_VERIFIED);
}
@@ -3427,7 +3431,7 @@ App::post('/v1/account/verification/phone')
});
App::put('/v1/account/verification/phone')
->desc('Create phone verification (confirmation)')
->desc('Update phone verification (confirmation)')
->groups(['api', 'account'])
->label('scope', 'public')
->label('event', 'users.[userId].verification.[tokenId].update')
@@ -3570,7 +3574,7 @@ App::get('/v1/account/mfa/factors')
});
App::post('/v1/account/mfa/authenticators/:type')
->desc('Add Authenticator')
->desc('Create Authenticator')
->groups(['api', 'account'])
->label('event', 'users.[userId].update.mfa')
->label('scope', 'account')
@@ -3880,7 +3884,7 @@ App::delete('/v1/account/mfa/authenticators/:type')
});
App::post('/v1/account/mfa/challenge')
->desc('Create 2FA Challenge')
->desc('Create MFA Challenge')
->groups(['api', 'account', 'mfa'])
->label('scope', 'account')
->label('event', 'users.[userId].challenges.[challengeId].create')
+1 -1
View File
@@ -321,7 +321,7 @@ App::get('/v1/avatars/favicon')
->setUserAgent(\sprintf(
APP_USERAGENT,
System::getEnv('_APP_VERSION', 'UNKNOWN'),
System::getEnv('_APP_SYSTEM_SECURITY_EMAIL_ADDRESS', APP_EMAIL_SECURITY)
System::getEnv('_APP_EMAIL_SECURITY', System::getEnv('_APP_SYSTEM_SECURITY_EMAIL_ADDRESS', APP_EMAIL_SECURITY))
))
->fetch($url);
} catch (\Throwable) {
+33 -8
View File
@@ -2943,17 +2943,26 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents')
$processDocument($collection, $document);
$response
->setStatusCode(Response::STATUS_CODE_CREATED)
->dynamic($document, Response::MODEL_DOCUMENT);
$relationships = \array_map(
fn ($document) => $document->getAttribute('key'),
\array_filter(
$collection->getAttribute('attributes', []),
fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
)
);
$queueForEvents
->setParam('databaseId', $databaseId)
->setParam('collectionId', $collection->getId())
->setParam('documentId', $document->getId())
->setContext('collection', $collection)
->setContext('database', $database)
;
->setPayload($response->getPayload(), sensitive: $relationships);
$response
->setStatusCode(Response::STATUS_CODE_CREATED)
->dynamic($document, Response::MODEL_DOCUMENT);
});
App::get('/v1/databases/:databaseId/collections/:collectionId/documents')
@@ -3524,15 +3533,23 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum
$processDocument($collection, $document);
$response->dynamic($document, Response::MODEL_DOCUMENT);
$relationships = \array_map(
fn ($document) => $document->getAttribute('key'),
\array_filter(
$collection->getAttribute('attributes', []),
fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
)
);
$queueForEvents
->setParam('databaseId', $databaseId)
->setParam('collectionId', $collection->getId())
->setParam('documentId', $document->getId())
->setContext('collection', $collection)
->setContext('database', $database)
;
$response->dynamic($document, Response::MODEL_DOCUMENT);
->setPayload($response->getPayload(), sensitive: $relationships);
});
App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId')
@@ -3628,6 +3645,14 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu
$processDocument($collection, $document);
$relationships = \array_map(
fn ($document) => $document->getAttribute('key'),
\array_filter(
$collection->getAttribute('attributes', []),
fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP
)
);
$queueForDeletes
->setType(DELETE_TYPE_AUDIT)
->setDocument($document);
@@ -3638,7 +3663,7 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu
->setParam('documentId', $document->getId())
->setContext('collection', $collection)
->setContext('database', $database)
->setPayload($response->output($document, Response::MODEL_DOCUMENT));
->setPayload($response->output($document, Response::MODEL_DOCUMENT), sensitive: $relationships);
$response->noContent();
});
+88 -5
View File
@@ -10,6 +10,7 @@ use Appwrite\Event\Usage;
use Appwrite\Event\Validator\FunctionEvent;
use Appwrite\Extend\Exception;
use Appwrite\Extend\Exception as AppwriteException;
use Appwrite\Functions\Validator\RuntimeSpecification;
use Appwrite\Messaging\Adapter\Realtime;
use Appwrite\Task\Validator\Cron;
use Appwrite\Utopia\Database\Validator\CustomId;
@@ -160,6 +161,12 @@ App::post('/v1/functions')
->param('templateOwner', '', new Text(128, 0), 'The name of the owner of the template.', true)
->param('templateRootDirectory', '', new Text(128, 0), 'Path to function code in the template repo.', true)
->param('templateBranch', '', new Text(128, 0), 'Production branch for the repo linked to the function template.', true)
->param('specification', APP_FUNCTION_BASE_SPECIFICATION, fn (array $plan) => new RuntimeSpecification(
$plan,
Config::getParam('runtime-specifications', []),
App::getEnv('_APP_FUNCTIONS_CPUS', APP_FUNCTION_BASE_SPECIFICATION_CPUS),
App::getEnv('_APP_FUNCTIONS_MEMORY', APP_FUNCTION_BASE_SPECIFICATION_MEMORY)
), 'Runtime specification for the function and builds.', true, ['plan'])
->inject('request')
->inject('response')
->inject('dbForProject')
@@ -169,7 +176,7 @@ App::post('/v1/functions')
->inject('queueForBuilds')
->inject('dbForConsole')
->inject('gitHub')
->action(function (string $functionId, string $name, string $runtime, array $execute, array $events, string $schedule, int $timeout, bool $enabled, bool $logging, string $entrypoint, string $commands, string $installationId, string $providerRepositoryId, string $providerBranch, bool $providerSilentMode, string $providerRootDirectory, string $templateRepository, string $templateOwner, string $templateRootDirectory, string $templateBranch, Request $request, Response $response, Database $dbForProject, Document $project, Document $user, Event $queueForEvents, Build $queueForBuilds, Database $dbForConsole, GitHub $github) use ($redeployVcs) {
->action(function (string $functionId, string $name, string $runtime, array $execute, array $events, string $schedule, int $timeout, bool $enabled, bool $logging, string $entrypoint, string $commands, string $installationId, string $providerRepositoryId, string $providerBranch, bool $providerSilentMode, string $providerRootDirectory, string $templateRepository, string $templateOwner, string $templateRootDirectory, string $templateBranch, string $specification, Request $request, Response $response, Database $dbForProject, Document $project, Document $user, Event $queueForEvents, Build $queueForBuilds, Database $dbForConsole, GitHub $github) use ($redeployVcs) {
$functionId = ($functionId == 'unique()') ? ID::unique() : $functionId;
$allowList = \array_filter(\explode(',', System::getEnv('_APP_FUNCTIONS_RUNTIMES', '')));
@@ -229,6 +236,7 @@ App::post('/v1/functions')
'providerBranch' => $providerBranch,
'providerRootDirectory' => $providerRootDirectory,
'providerSilentMode' => $providerSilentMode,
'specification' => $specification
]));
$schedule = Authorization::skip(
@@ -442,6 +450,41 @@ App::get('/v1/functions/runtimes')
]), Response::MODEL_RUNTIME_LIST);
});
App::get('/v1/functions/specifications')
->groups(['api', 'functions'])
->desc('Get available function runtime specifications')
->label('scope', 'functions.read')
->label('sdk.auth', [APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_ADMIN])
->label('sdk.namespace', 'functions')
->label('sdk.method', 'getSpecifications')
->label('sdk.description', '/docs/references/functions/get-specifications.md')
->label('sdk.response.code', Response::STATUS_CODE_OK)
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
->label('sdk.response.model', Response::MODEL_SPECIFICATION_LIST)
->inject('response')
->inject('plan')
->action(function (Response $response, array $plan) {
$allRuntimeSpecs = Config::getParam('runtime-specifications', []);
$runtimeSpecs = [];
foreach ($allRuntimeSpecs as $spec) {
$spec['enabled'] = true;
if (array_key_exists('runtimeSpecifications', $plan)) {
$spec['enabled'] = in_array($spec['slug'], $plan['runtimeSpecifications']);
}
// Only add specs that are within the limits set by environment variables
if ($spec['cpus'] <= System::getEnv('_APP_FUNCTIONS_CPUS', 1) && $spec['memory'] <= System::getEnv('_APP_FUNCTIONS_MEMORY', 512)) {
$runtimeSpecs[] = $spec;
}
}
$response->dynamic(new Document([
'specifications' => $runtimeSpecs,
]), Response::MODEL_SPECIFICATION_LIST);
});
App::get('/v1/functions/:functionId')
->groups(['api', 'functions'])
->desc('Get function')
@@ -499,6 +542,8 @@ App::get('/v1/functions/:functionId/usage')
str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS_COMPUTE),
str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS),
str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_COMPUTE),
str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_BUILDS_MB_SECONDS),
str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_MB_SECONDS)
];
Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) {
@@ -561,6 +606,10 @@ App::get('/v1/functions/:functionId/usage')
'buildsTime' => $usage[$metrics[4]]['data'],
'executions' => $usage[$metrics[5]]['data'],
'executionsTime' => $usage[$metrics[6]]['data'],
'buildsMbSecondsTotal' => $usage[$metrics[7]]['total'],
'buildsMbSeconds' => $usage[$metrics[7]]['data'],
'executionsMbSeconds' => $usage[$metrics[8]]['data'],
'executionsMbSecondsTotal' => $usage[$metrics[8]]['total']
]), Response::MODEL_USAGE_FUNCTION);
});
@@ -591,6 +640,8 @@ App::get('/v1/functions/usage')
METRIC_BUILDS_COMPUTE,
METRIC_EXECUTIONS,
METRIC_EXECUTIONS_COMPUTE,
METRIC_BUILDS_MB_SECONDS,
METRIC_EXECUTIONS_MB_SECONDS,
];
Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) {
@@ -654,6 +705,10 @@ App::get('/v1/functions/usage')
'buildsTime' => $usage[$metrics[5]]['data'],
'executions' => $usage[$metrics[6]]['data'],
'executionsTime' => $usage[$metrics[7]]['data'],
'buildsMbSecondsTotal' => $usage[$metrics[8]]['total'],
'buildsMbSeconds' => $usage[$metrics[8]]['data'],
'executionsMbSeconds' => $usage[$metrics[9]]['data'],
'executionsMbSecondsTotal' => $usage[$metrics[9]]['total'],
]), Response::MODEL_USAGE_FUNCTIONS);
});
@@ -687,6 +742,12 @@ App::put('/v1/functions/:functionId')
->param('providerBranch', '', new Text(128, 0), 'Production branch for the repo linked to the function', true)
->param('providerSilentMode', false, new Boolean(), 'Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.', true)
->param('providerRootDirectory', '', new Text(128, 0), 'Path to function code in the linked repo.', true)
->param('specification', APP_FUNCTION_BASE_SPECIFICATION, fn (array $plan) => new RuntimeSpecification(
$plan,
Config::getParam('runtime-specifications', []),
App::getEnv('_APP_FUNCTIONS_CPUS', APP_FUNCTION_BASE_SPECIFICATION_CPUS),
App::getEnv('_APP_FUNCTIONS_MEMORY', APP_FUNCTION_BASE_SPECIFICATION_MEMORY)
), 'Runtime specification for the function and builds.', true, ['plan'])
->inject('request')
->inject('response')
->inject('dbForProject')
@@ -695,9 +756,8 @@ App::put('/v1/functions/:functionId')
->inject('queueForBuilds')
->inject('dbForConsole')
->inject('gitHub')
->action(function (string $functionId, string $name, string $runtime, array $execute, array $events, string $schedule, int $timeout, bool $enabled, bool $logging, string $entrypoint, string $commands, string $installationId, string $providerRepositoryId, string $providerBranch, bool $providerSilentMode, string $providerRootDirectory, Request $request, Response $response, Database $dbForProject, Document $project, Event $queueForEvents, Build $queueForBuilds, Database $dbForConsole, GitHub $github) use ($redeployVcs) {
->action(function (string $functionId, string $name, string $runtime, array $execute, array $events, string $schedule, int $timeout, bool $enabled, bool $logging, string $entrypoint, string $commands, string $installationId, string $providerRepositoryId, string $providerBranch, bool $providerSilentMode, string $providerRootDirectory, string $specification, Request $request, Response $response, Database $dbForProject, Document $project, Event $queueForEvents, Build $queueForBuilds, Database $dbForConsole, GitHub $github) use ($redeployVcs) {
// TODO: If only branch changes, re-deploy
$function = $dbForProject->getDocument('functions', $functionId);
if ($function->isEmpty()) {
@@ -795,6 +855,21 @@ App::put('/v1/functions/:functionId')
$live = false;
}
$spec = Config::getParam('runtime-specifications')[$specification] ?? [];
// Enforce Cold Start if spec limits change.
if ($function->getAttribute('specification') !== $specification && !empty($function->getAttribute('deployment'))) {
$executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST'));
try {
$executor->deleteRuntime($project->getId(), $function->getAttribute('deployment'));
} catch (\Throwable $th) {
// Don't throw if the deployment doesn't exist
if ($th->getCode() !== 404) {
throw $th;
}
}
}
$function = $dbForProject->updateDocument('functions', $function->getId(), new Document(array_merge($function->getArrayCopy(), [
'execute' => $execute,
'name' => $name,
@@ -815,6 +890,7 @@ App::put('/v1/functions/:functionId')
'providerBranch' => $providerBranch,
'providerRootDirectory' => $providerRootDirectory,
'providerSilentMode' => $providerSilentMode,
'specification' => $specification,
'search' => implode(' ', [$functionId, $name, $runtime]),
])));
@@ -838,7 +914,7 @@ App::put('/v1/functions/:functionId')
App::get('/v1/functions/:functionId/deployments/:deploymentId/download')
->groups(['api', 'functions'])
->desc('Download Deployment')
->desc('Download deployment')
->label('scope', 'functions.read')
->label('sdk.auth', [APP_AUTH_TYPE_KEY])
->label('sdk.namespace', 'functions')
@@ -923,7 +999,7 @@ App::get('/v1/functions/:functionId/deployments/:deploymentId/download')
App::patch('/v1/functions/:functionId/deployments/:deploymentId')
->groups(['api', 'functions'])
->desc('Update function deployment')
->desc('Update deployment')
->label('scope', 'functions.write')
->label('event', 'functions.[functionId].deployments.[deploymentId].update')
->label('audits.event', 'deployment.update')
@@ -1536,6 +1612,7 @@ App::post('/v1/functions/:functionId/executions')
$version = $function->getAttribute('version', 'v2');
$runtimes = Config::getParam($version === 'v2' ? 'runtimes-v2' : 'runtimes', []);
$spec = Config::getParam('runtime-specifications')[$function->getAttribute('specification', APP_FUNCTION_BASE_SPECIFICATION)];
$runtime = (isset($runtimes[$function->getAttribute('runtime', '')])) ? $runtimes[$function->getAttribute('runtime', '')] : null;
@@ -1702,6 +1779,8 @@ App::post('/v1/functions/:functionId/executions')
'APPWRITE_FUNCTION_PROJECT_ID' => $project->getId(),
'APPWRITE_FUNCTION_RUNTIME_NAME' => $runtime['name'] ?? '',
'APPWRITE_FUNCTION_RUNTIME_VERSION' => $runtime['version'] ?? '',
'APPWRITE_FUNCTION_CPUS' => $spec['cpus'] ?? APP_FUNCTION_BASE_SPECIFICATION_CPUS,
'APPWRITE_FUNCTION_MEMORY' => $spec['memory'] ?? APP_FUNCTION_BASE_SPECIFICATION_MEMORY
]);
/** Execute function */
@@ -1724,6 +1803,8 @@ App::post('/v1/functions/:functionId/executions')
method: $method,
headers: $headers,
runtimeEntrypoint: $command,
cpus: $spec['cpus'] ?? APP_FUNCTION_BASE_SPECIFICATION_CPUS,
memory: $spec['memory'] ?? APP_FUNCTION_BASE_SPECIFICATION_MEMORY,
requestTimeout: 30
);
@@ -1761,6 +1842,8 @@ App::post('/v1/functions/:functionId/executions')
->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS), 1)
->addMetric(METRIC_EXECUTIONS_COMPUTE, (int)($execution->getAttribute('duration') * 1000)) // per project
->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_COMPUTE), (int)($execution->getAttribute('duration') * 1000)) // per function
->addMetric(METRIC_EXECUTIONS_MB_SECONDS, (int)(($spec['memory'] ?? APP_FUNCTION_BASE_SPECIFICATION_MEMORY) * $execution->getAttribute('duration', 0) * ($spec['cpus'] ?? APP_FUNCTION_BASE_SPECIFICATION_CPUS)))
->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_MB_SECONDS), (int)(($spec['memory'] ?? APP_FUNCTION_BASE_SPECIFICATION_MEMORY) * $execution->getAttribute('duration', 0) * ($spec['cpus'] ?? APP_FUNCTION_BASE_SPECIFICATION_CPUS)))
;
if ($function->getAttribute('logging')) {

Some files were not shown because too many files have changed in this diff Show More