Commit Graph

660 Commits

Author SHA1 Message Date
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
Trisha Anand
882df291d7
[Bug Fix] Indices not working for fetching actions during update layout (#1813)
Instead of using compound index, using single indices to ensure that both fetch actions by app id (during load of actions in edit/view mode) and fetch actions by page id (during update layout) are indexed queries.
2020-11-20 13:30:17 +05:30
Trisha Anand
63fe27fae1
[Bug Fix] : Clone Application creates corrupted clone when interrupted. (#1800)
* Doing a deep copy during clone application instead of updating the original application which may have been causing a concurrency bug.

* Ensuring that once the clone application flow is triggered, the flow completes eventually even if the client cancels the request before completion.

* Cloned application would not be public.

* Added parametrized Application constructor

* Removed lombok all args constructor

* Optimized import

* Incorporated review comments :
1. Updated the constructor for creating the application
2. Added a test case to assert that if during cloning of an application the flow gets cancelled, the cloning would still complete and ensure that the application created is sane.
2020-11-20 10:55:59 +05:30
Sumit Kumar
b03e815952
Change Sentry log 'environment' tag value. (#1789)
* Change Sentry log 'environment' tag value.

1. Change Sentry log 'environment' tag value to 'Properties' from 'properties'.
2020-11-19 17:29:48 +05:30
Arpit Mohan
9772d64c5b
Disable instance ping check when the disableTelemetry flag is set (#1776)
Also adding the APPSMITH_SEGMENT_CE_KEY as a build arg to the server Dockerfile. This will be used to set the environment variable in the Docker image itself.
2020-11-19 08:54:03 +05:30
Nidhi
941be8c58d
Fixed check for incorrect dynamic bindings (#1775)
* Fixed check for incorrect dynamic bindings
2020-11-18 14:25:55 +05:30
Shrikant Sharat Kandula
f36adeb6b5
Fix #1766: cURL parser eats backslashes in single-quotes (#1768) 2020-11-18 11:20:23 +05:30
Trisha Anand
fc3197b78f
Email sending is now non-blocking. The blocking code for email sending is triggered and then immediately returned. (#1762) 2020-11-18 00:31:39 +05:30
Arpit Mohan
c3a44651f2
Adding null check for dynamic binding path list (#1752)
* Adding null check for dynamic binding path list.

* Increased timeout duration for failing test

Co-authored-by: Nidhi <nidhi.nair93@gmail.com>
2020-11-17 15:38:48 +05:30
Trisha Anand
6ac04d8a9e
Added SLA bucket for metric evaluation for 1 second (#1740) 2020-11-17 12:47:49 +05:30
Nidhi
9de085f264
Switched to using dynamicBindingPathList for generic scan, supports DB queries and nested structures
* Switched to using dynamicBindingPathList for generic scan
2020-11-17 11:26:08 +05:30