Commit Graph

670 Commits

Author SHA1 Message Date
Trisha Anand
9e0f36a6f2
Improve Server thrown Error Messages' language (#2705)
* Improve Error Messages

* Added naming convention expansion for action name in the error

* Fixed failing test case assertion.

* Minor formatting.
2021-01-25 18:50:32 +05:30
Trisha Anand
3776e82fb8
Scheduling of parallel tasks implementation for on-page load actions (#2667)
* Proof of concept code which calculates the on load page actions.

* Refactored the field names introduced in Layout. Added a new field to keep a track of direct action names used in dynamic bindings in the DSL.

* Untested compute on on page load actions completed.

* Working page load actions computation.
TODO : Update the tests for correctness.

* Added fix for BFS starting from root nodes instead of arbitrary nodes.
Fixed a test case to assert for correct page load actions.

* Fixed the bug where the ids of the actions were not getting set in the layout. Also asserting the same in the test case for catching the future breaks.

* Minor refactor of function name to clear its purpose without reading the code.

* Incorporated review comments.

* Added conditional checks for unpublished action deleted and circular dependency of actions depending on each other.
2021-01-25 16:54:45 +05:30
Shrikant Sharat Kandula
468e84aabb
Fix calls to release notes from cloud instances (#2680) 2021-01-22 14:25:24 +05:30
Trisha Anand
48cfa2cea0
In case an action has been deleted in unpublished state, dont return it to the user in edit mode. (#2678) 2021-01-22 13:19:42 +05:30
Shrikant Sharat Kandula
6b406be39e
Fetch release notes for caching every two hours (#2657)
* Fetch release notes for caching every two hours

* Revert unrelated changes in Ping class
2021-01-21 11:59:35 +05:30
Shrikant Sharat Kandula
52c689efee
Add a migration to fix any remembered versions (#2651)
* Add a migration to fix any remembered versions

* Drop the userData collection instead
2021-01-21 07:39:41 +05:30
Shrikant Sharat Kandula
9ead9af5f6
Respond with empty string when no new versions (#2618) 2021-01-19 11:37:31 +05:30
Shrikant Sharat Kandula
f6845486d2
Handle snapshot versions as special (#2617)
This is needed for remembering when a user has viewed
release notes. Snapshot versions aren't a tagged marker
on the version timeline so aren't useful for this purpose.
2021-01-19 08:24:56 +05:30
Shrikant Sharat Kandula
3dc6f1107b
Send repo information when fetching release notes (#2615) 2021-01-18 21:21:22 +05:30
Shrikant Sharat Kandula
04d4812fc9
Fix getting release notes always resulting empty (#2609) 2021-01-18 15:21:50 +05:30
Nidhi
e6a0b00a25
Added Oauth2 functionality for REST APIs (#2509)
* Added Oauth2 functionality for REST APIs

* Encrypted response

* Missed file

* Review comments and tests

* Removed broken test
2021-01-15 16:41:13 +05:30
Trisha Anand
91b8922f1c
In case cs service returns an error, stop processing release notes and resume with the caller flow. (#2550)
* In case cs service returns an error, stop processing release notes and resume with the caller flow.

* In case the server was unable to exchange messages with the CS server, bail out of further processing gracefully since this is not a must have but rather a good to have feature.
2021-01-13 14:30:23 +05:30
Nidhi
9ea5c884e1
Null check for empty pagination next url (#2546) 2021-01-13 12:12:29 +05:30
Trisha Anand
c24bc826e0
When an application name is changed, the isPublic flag is reset to false. (#2539) 2021-01-12 20:06:33 +05:30
Shrikant Sharat Kandula
c6c128270c
Include version information when building Docker images for server and client (#2200)
* Include version information in backend builds

* Enable manual trigger of server workflow

* Add a dummy input field for manual trigger

* Fix secret checking in github actions

* Disable cron scheduling of sync job

* Build docker image on pushing a version tag

* Fix duplicated id and invalid id in release workflow

* Don't try to login to Docker

* Avoid download progress outputs from Maven

* Add version information for building client

* Calculate version number only once

* Enable push to DockerHub after building images

* Use Docker username from GitHub secrets

* Fix Docker username in tags when building image

* Use different secret for org name

* Minor refactoring in server workflow

* Update client build workflow to use version

* Enable manual triggering of client workflow

* Set snapshot version for server builds

* Push to docker for all branches (temp)

* Undo temp change to push all branches to DockerHub

* Use Docker org from secrets in client.yml

* Fix missing version reference in client.yml

* Remove debug command in dockerfile

* Save release notes in a resource file in Docker image

* Fix query serialization to get release notes

* Get releases of current repo instead of hard-coded repo

* Fix variable quoting for repo variables

* Exclude draft and prerelease nodes from image

* Fix call to any in release notes processor

* Fix syntax error in release notes script

* Implement API to get new release count and info

* Add missing ReleaseNotes component

* Have the release workflow run after a release is created

* Build server after generating release notes

* Change release trigger to "released"

* Change release trigger to "published"

* Change release trigger to released, edited and deleted

* Use JS script to get release notes, take 1

* Filter drafts and prereleases in script

* Fix syntax error in ES6

* Write release notes to file

* Create parent directory before writing release notes

* Log cwd in release notes script

* Log pwd along with release-notes content

* Handle case where working directory is incorrect

* Remove shell based release notes generator

* Don't show error when Sentry config is missing

* Check for sentry auth token to enable Sentry

* Carry build's exit code over to CI

* Mark out build result and add a note about it

* Add a small test to verify new versions computation

* Remove incorrect test assertion

* Remove generation of release notes file

* Connect to cloud services to fetch release notes data

* Fix missing runner for test class

* Handle missing cloud_services base URL

* Fix test failures due to missing mocks

* Enable sync-ee cron job

* Revert build.sh as there's no real change

* Add API to update release notes viewed version for users

* Fix prettier line-length errors

* Create UserData model for info unrelated to auth

* Fix field name calls

* Ensure we have a userId before setting userData

* Add tests for setting version number in UserData

* Include instanceId when fetching release notes
2021-01-12 18:15:15 +05:30
Shrikant Sharat Kandula
4fc6a7e763
Disable welcome email with an environment variable (#2527) 2021-01-12 16:50:26 +05:30
Shrikant Sharat Kandula
e4ba991114
Remove unused API endpoints for invite confirmation (#2532) 2021-01-12 16:20:48 +05:30
Trisha Anand
88e8723f37
Adding id and pluginType correctly for a user set on page load action (non referenced in the DSL) (#2523) 2021-01-12 14:39:53 +05:30
Shrikant Sharat Kandula
23cffc208f
Allow signup for admins, even if publicly disabled (#2520)
* Allow signup for admins, even if publicly disabled

* Use Set for admin email addresses

* Set two admin emails in test
2021-01-12 14:13:44 +05:30
Shrikant Sharat Kandula
9cd9edd3fa
Disable uninvited signups via environment variable (#2512)
* Disable signup API via environment variable

* Allow signup for invited users, even if disabled publicly

* Add test for signup when signup is disabled

* Run invite flow tests when signup is disabled

* Revert status annotation in signup API endpoint

* Remove unused tests on invite flow

* Change signup disabled error message
2021-01-11 20:10:50 +05:30
Nidhi
1fa7d46845
Fixed unreferenced actions not being triggered for execute on load (#2434)
* Fixed unreferenced actions not being triggered for execute on load

* WIP : Have to commit some minor cosmetic code formatting changes

* Comments and fix for action ordering

* modified test case

Co-authored-by: Trisha Anand <trisha@appsmith.com>
2021-01-11 12:18:07 +05:30
Trisha Anand
527bac0827
Adding action execution time and logging the same (#2473) 2021-01-07 13:49:50 +05:30
Sumit Kumar
4748014cee
Redshift plugin (#2440)
* introduce redshift plugin
2021-01-06 17:51:07 +05:30
Trisha Anand
bd011c45ab
Removed unused organization setting, setting class, and query class. (#2464) 2021-01-06 17:30:09 +05:30
Trisha Anand
d5074ee7f7
Increased logs to debug future connection leaks. (#2437)
* Increased logs to debug future connection leaks.

* Fetch a connection from the pool only if a query exists.

* Minor comment added.

* Minor rewrite

* Code formatting.

* Update app/server/appsmith-plugins/postgresPlugin/src/main/java/com/external/plugins/PostgresPlugin.java

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>

* Added hikari cp pool stats to get database structure function as well.

Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2021-01-05 15:34:55 +05:30
Trisha Anand
d4640e01a2
Invite users once triggered should not be cancellable. (#2401)
* Invite users once triggered should not be cancellable.
2020-12-30 16:50:01 +05:30
Trisha Anand
712f41db92
Reducing the probability of getting pages out of order (Expected order is the order in which the pages were created and added to the application). This should : (#2391)
1. Get rid of cypress test failures which asserts a certain order till the cypress test case is fixed and unblocks the frontend team.
2. Uses a bulk API to fetch all the pages instead of fetching each page sequentially over different network calls with the database.
2020-12-29 19:10:01 +05:30
Trisha Anand
ea366b1d29 Fixed NPE in database migration 2020-12-29 17:06:30 +05:30
Trisha Anand
735a4398b2
Added a migration to old rest api datasources which adds the new mandatory key isSendSessionEnabled with value N (#2388) 2020-12-29 16:29:28 +05:30
Trisha Anand
ea0f9c159c
[Bug] Multi page applications return only a single page when fetching pages per application (#2383)
* Zipping flux with mono leads to mono not getting repeated and only the first emitted value of flux is processed further. This is leading to only a single page getting emitted in a multi page application.

* Added a test case to assert this for a multi page application
2020-12-29 13:38:47 +05:30
Trisha Anand
6210b9a0c0
All newly created applications now have a default published state. (#2309)
* All newly created applications now have a default published state.

* Added a test case to assert a new application comes up with default published states for both application and the default page.

* Function name changed.

* When trying to fetch a published version of a page when the page has not been published, throw a 404.

* WIP : Not working
2020-12-28 10:30:43 +05:30
Shrikant Sharat Kandula
d5e0fb18d8
Add migration to set isEncrypted field where missing (#2332) 2020-12-23 15:35:45 +05:30
Sumit Kumar
53a6160139
Revert "Redshift plugin (#2112)" (#2314)
This reverts commit 708ca7fedf.
2020-12-22 16:59:18 +05:30
Sumit Kumar
708ca7fedf
Redshift plugin (#2112)
1. Add new plugin to connect to AWS Redshift cluster and run query.
2. Add unit test cases.
2020-12-22 15:35:25 +05:30
Shrikant Sharat Kandula
cfcd7aa0bb
Fix Firestore datasources not encrypting secret key JSON when editing (#2296)
* Fix encrypted field not being ignored in JSON

* Don't mask error in decrypting

* Revert masking of error in decrypting
2020-12-21 17:43:15 +05:30
Nidhi
e3cf285d1e
Fixed encryption related bugs for empty/new datasource (#2287) 2020-12-21 10:41:57 +05:30
Shrikant Sharat Kandula
fdc4f7b200
Fix invalid templates and API breaking on invalid templates (#2286) 2020-12-19 13:00:24 +05:30
Shrikant Sharat Kandula
5e04ca5c9d
Add ability to configure order of templates of plugins (#2279) 2020-12-18 20:45:08 +05:30
Nidhi
5a36d17f7a
Fixed encryption related bugs for empty/new datasource (#2272) 2020-12-18 16:13:01 +05:30
Nidhi
a00c144e85
Subclassing authentication (#2215)
* Sublcassing authentication

* Removed TODO

* Review changes
2020-12-17 21:38:52 +05:30
Nidhi
9a9feff678
Reset execute on page load for new actions (copied or otherwise) (#2162) 2020-12-11 14:33:07 +05:30
Trisha Anand
74342f8598
Adding hikariCP for postgres (#2130) 2020-12-10 21:08:02 +05:30
Arpit Mohan
85d958c2c0
[CodeFactor] Apply automated fixes (#2131)
Co-authored-by: codefactor-io <support@codefactor.io>
2020-12-10 18:44:31 +05:30
Shrikant Sharat Kandula
4d24c8614f
Set random icons and colors for apps that are missing them (#2083) 2020-12-08 15:41:40 +05:30
Arpit Mohan
9d7a9d4aaf
Modifying the text for the roles in the share modal (#2045) 2020-12-07 16:16:43 +05:30
Trisha Anand
b8b24604a6
[Bug] Update of an action leads to userSetOnLoad getting reset. (#2023)
* Update of an action leads to userSetOnLoad getting reset.

* Added test case to assert the same.
2020-12-04 13:07:34 +05:30
Shrikant Sharat Kandula
4a57a739b6
Render templates directly without Mustache (#2010)
* Render templates directly without Mustache

* Remove an unused variable
2020-12-03 14:38:31 +05:30
Shrikant Sharat Kandula
74cd362057
Firestore Integration (#1799)
* Adding the skeleton for Firestore integration

* Adding the datasource & query editor forms

Also adding the database changelog for the firestore plugin

Commenting out the firestore.close() connection because that causes issues with multiple Firestore tenants running in the same JVM.

* Adding the code for fetching the structure of collections from Firestore

* Use single document path field for Firestore

* Fix potential NPE when datasource destroy timeouts

* Work in progress on collection level ops for Firestore

* Get documents in a collection now works

* Add collection level querying support

* Mild refactoring

* Fix NPE when some fields are missing

* Hide clientJSON as a password field for Firestore

* Make collection level querying reactive

* Make reactive

* Validate before connecting

* Add tests for all supported methods in Firestore

* Fix forms for Firestore with hidden fields

* Hide limit and order by fields when not needed

* Restore log entry deleted by mistake

* Use S3 URL for Firestore/Firebase logo

* Add comments detailing why some code is commented

* Make parsing JSON reactive and fix subscribe calls

* Fix reactive scheduler

Co-authored-by: Arpit Mohan <arpit@appsmith.com>
2020-11-23 18:42:33 +05:30
Trisha Anand
dc7a375543
Making postgres plugin blocking statements run on elastic threadpool. (#1821)
* Making postgres plugin blocking statements run on elastic threadpool.

* Moved the blocking calls to check for the connection validity, etc. also inside the Mono.fromCallable
2020-11-23 11:27:52 +05:30
Trisha Anand
c2d1ac973c
Adding thread name to the context of logs to allow for the thread names to be printed for each log. (#1824) 2020-11-23 10:45:15 +05:30