avniproject / integration-service

Service for integration Avni with other systems
GNU Affero General Public License v3.0
0 stars 2 forks source link

Include integration_system_config in metadata zip download #76

Closed himeshr closed 1 year ago

himeshr commented 1 year ago

Include integration_system_config in metadata zip download

Acceptance Criteria

ashusvnath commented 1 year ago

Could not figure out where metadata zip download for integration app is available.

ashusvnath commented 1 year ago

API's for testing #73 and #76 available @ https://github.com/avniproject/integration-service/issues/73

ashusvnath commented 1 year ago

Tested by marking some fields of staging integration system config with secret = true. Resulting integrationSystemConfig.json found in the metadata.json is shown below.

[ {
  "id" : 0,
  "uuid" : "fb7e6551-b4f7-41c4-8cc4-6eb2ce402863",
  "key" : "sales_force_client_secret",
  "value" : "",
  "secret" : true,
  "voided" : false
}, {
  "id" : 0,
  "uuid" : "e3e42cad-07e0-4fa2-afa9-3a7ec9c694b3",
  "key" : "sales_force_client_id",
  "value" : "",
  "secret" : true,
  "voided" : false
}, {
  "id" : 0,
  "uuid" : "cc3b8ee6-55ef-480d-afc8-0a08989c53c8",
  "key" : "sales_force_password",
  "value" : "",
  "secret" : true,
  "voided" : false
}, {
  "id" : 0,
  "uuid" : "d52337ba-17fb-425b-be39-e91c014d09e3",
  "key" : "sales_force_user",
  "value" : "",
  "secret" : true,
  "voided" : false
}, {
  "id" : 0,
  "uuid" : "89b01a6c-50e7-40cc-b711-fdba70909ea2",
  "key" : "avni_password",
  "value" : "",
  "secret" : true,
  "voided" : false
}, {
  "id" : 0,
  "uuid" : "3f185800-8089-4a5c-a875-f1fee85cb163",
  "key" : "avni_user",
  "value" : "",
  "secret" : true,
  "voided" : false
}, {
  "id" : 0,
  "uuid" : "5ad34c9a-d8e6-44cf-8870-0a7da2e649b0",
  "key" : "sales_force_app_url",
  "value" : "https://goonj--patialv1.sandbox.my.salesforce.com/services/apexrest/v1",
  "secret" : false,
  "voided" : false
}, {
  "id" : 0,
  "uuid" : "706a22cb-897a-443d-8c31-bde1a6eee5d5",
  "key" : "sales_force_auth_url",
  "value" : "https://test.salesforce.com/services/oauth2/token",
  "secret" : false,
  "voided" : false
}, {
  "id" : 0,
  "uuid" : "159e5f02-fc96-4dda-af47-6756711ebf42",
  "key" : "sales_force_media_url_prefix",
  "value" : "https://app.avniproject.org/web/media?url=",
  "secret" : false,
  "voided" : false
}, {
  "id" : 0,
  "uuid" : "70aec2a6-30bc-4991-8586-4cb45d9b0ea5",
  "key" : "avni_api_url",
  "value" : "https://app.avniproject.org",
  "secret" : false,
  "voided" : false
}, {
  "id" : 0,
  "uuid" : "da58f677-4586-4ea9-aa96-ae81d7464681",
  "key" : "avni_auth_enabled",
  "value" : "true",
  "secret" : false,
  "voided" : false
}, {
  "id" : 0,
  "uuid" : "f7392fc3-96e6-46ea-8d10-62f80aa6479a",
  "key" : "error.scheduled.job.cron",
  "value" : "0 1 2 * * ?",
  "secret" : false,
  "voided" : false
}, {
  "id" : 0,
  "uuid" : "d2a80d89-fe65-4fb9-851c-edba526013cb",
  "key" : "int_tasks",
  "value" : "all",
  "secret" : false,
  "voided" : false
}, {
  "id" : 0,
  "uuid" : "f0675ab6-5cd9-4049-b648-40bdeacd3bd1",
  "key" : "main.scheduled.job.cron",
  "value" : "0 0/2 * * * ?",
  "secret" : false,
  "voided" : false
}, {
  "id" : 0,
  "uuid" : "9f968452-537c-431d-ac95-2c40fbaf3883",
  "key" : "recreate_dispatch_receipt_enabled",
  "value" : "true",
  "secret" : false,
  "voided" : false
} ]

Works as advertised.

ashusvnath commented 1 year ago

upload of above json with an extra

{
  "id" : 0,
  "uuid" : "2d8c3aec-ad25-450b-b31a-65d1df861099",
  "key" : "foo-bar-baz",
  "value" : "12353564646",
  "secret" : true,
  "voided" : false
}

entry creates a new entry in the DB and old values remain untouched, ie, old values are not clobbered.

Image

ashusvnath commented 1 year ago

There was an issue with zip file upload for imports, @1t5j0y fixed it by adding a spring config