SAP Cloud SDK CI/CD Pipeline: Usage with non S\4 Services - sap-cloud-sdk

I am using SAP Cloud SDK (Java flavour) to create an extension application of SuccessFactors.
I sadly discovered that the Jenkins pipeline does not allow me to use any other service than the ones listed here: SCN Blog (scroll to the Appendix).
This does not make so much sense to me, as now the SDK can be used - and it is sponsored to be used by SAP - also with SaaS in its ecosystem, SuccessFactors being one of them.
Any hint? Can this check be somehow "bypassed"?
Thanks,
Roberto.

Please note that the blog post is quite old, have you verified your assumption that it does not work with SuccessFactors API?
Nonetheless, we recently introduced a configuration option which allows you to disable certain checks, cf https://github.com/SAP/cloud-s4-sdk-pipeline/blob/master/configuration.md#s4sdkqualitychecks
checkServices is what you would want to disable in your scenario.

As stated by Florian in the comment and following the Project Piper documentation, parameters "checkServices" and "customODataServices" can be used to customize the behavior of the pipeline when running upon a non-Business Hub API.
"checkServices: false" will completely deactivated the check, whereas "customODataServices: [ yourApiName ]" will skip the check just for the specified services.

Related

Unable to set mandatory headers for ContactOriginData PATCH in batch mode

According to the integration guide for Contacts OData the Sap-Cuan-SequenceId header is mandatory when updating a ContactOriginData record. When updating in singleton mode I am able to set this header as follows and it works without issue:
service
.updateContactOriginData(contact)
.withHeader("Sap-Cuan-SequenceId", "PatchUpdate")
.executeRequest(destination);
However, there is no option to set this header when performing the same update in batch mode:
service
.batch()
.beginChangeSet()
.updateContactOriginData(contact)
.withHeader(...) // this option does not exist
.endChangeSet()
.executeRequest(destination);
When I run the batch one my SAP Import Monitor shows the error:
Invalid content in field Sap-Cuan-SequenceId
Is it possible to set this header in batch mode and I'm just not seeing how? I am using version 3.39.0 of the SDK. Any help would be greatly appreciated!
Thanks!
This clearly looks like an implementation shortcoming. The SDK has a new API for OData BATCH in the OData v4 client which shouldn't have this issue. Mentioned service exposes OData v2 only and the OData v2 BATCH implementation has been historically different. For compatibility reasons, it has to be kept like this. We plan to provide a parallel implementation to align it with OData v4 and fix many minor and major inconsistencies.
If this is super urgent we can try to provide a workaround using the SDK's generic OData client otherwise create an issue in this GitHub repository and the SDK team will update you when the fix for adding headers is going to be released.

Cucumber Framework Migration - Existing Rest Assured to Karate Framework

I am working as automation tester for banking domain account. I have a query and need your help.
Current Approach :
1.The framework which we are using for API-Services testing is Java based - Serenity -Cucumber framework using Rest Assured.
2.All the script development/script maintenance activities related to this framework is taken care by the automation testers in our team.
3.Few weeks before , we got to know about Karate framework and completed the PoC( Proof of concept).
4.All went well and we are in the plan to migrate our existing Rest assured java code Karate framework.
The reason for migration - Karate framework Api services testing can be able to do by Manual testers as well.So we are in the plan for migration.
Query
We have almost 80 web services already developed in Rest assured and running successfully.
Also for migration, all the services are inter-dependent. So we have to use both Res-assured and Karate framework code together ,unless it's fully migrated.
Can't able to migrate all the services immediately ,it's a time taken effort.
Is it possible to run karate framework and Rest Assured Java code in the same scenario.
Scnario given in Karate Feature file:
Given urlCustomerservices
When method get
Then status 200
def getCustIDfromUserservices=newcallJavaFunction().getcustid("user","password")
print getCustIDfromUserservices
This "getcustid" have the Rest assured java code for "Post" call service to get the customer number.
When I am running this in code karate framework , getting this error -
"io.restassured.internal.RequestSpecificationIMpl.invokeMethod(java/lang/String;Ljava/lang/object;)Ljava/lang/object;
Could any help in this. Whether can we run both karate and Rest assured code together in same scenario in karate framework . If yes, why am getting this error, when am trying to get the response in Rest assured.
First I'll say that this is not something we claim to support :) So you are on your own.
That said, it sounds like a simple library conflict. My guess is your existing Maven pom.xml has a lot of libraries floating around. You will need to do some investigation and find out what maven exclusions you need to do or which libraries need explicit versions specified. If you are lucky, switching from karate-apache to karate-jersey may do the trick.
Also I strongly recommend creating a Karate quickstart, then adding the extra stuff one by one in "hello world" mode and see what causes the problem. Use the mvn dependency:tree command and see the differences between a Karate project and yours. If you know how to use Maven profiles, that may be one way to go. All the best !
Worst case, fall back to 2 maven modules and run 2 test-suites, it is fine and not the end of the world. You can gradually migrate.
EDIT - also see https://stackoverflow.com/a/65628686/143475

Is there a way to delete Billing plans in paypal sdk?

SDK/Library version: 1.13.1
Environment: Sandbox and Live
PayPal-Debug-ID values: None
Language, the language version, and OS: Python, Ubuntu
Issue description:
So I was wondering if there is a way to delete billing plans? I searched but I can only find for PHP and not for python.
I tried:
billing_plan.delete()
billing_plan.remove()
but none of them work
I used BillingPlan.find() to get the information about the plan so I could remove but I can't find a way to perform this action.
BTW if there isn't a way via the API let me know if I can do it via PayPal website.
GitHub issue: https://github.com/paypal/PayPal-Python-SDK/issues/295
Assuming the Python SDK doesn't offer a method for this, you could read the PHP SDK's source code to find out how it's doing it, and then implement those methods, or call the Billing Plans API's HTTP methods directly: https://developer.paypal.com/docs/api/payments.billing-plans/v1/

Azure Machine Learning Recommendations API: Delete Build fails

I'm using Azure's Recommendations API to generate product recommendations. I'm keeping Recommendations up to date via an SSIS package that updates the data, creates a new build for the data, and if the build succeeds, deletes any previously existing builds.
The API documentation is straightforward, and everything works fine except one call in particular fails for me returning a HTTP 406 error (Not acceptable - Accept header doesn't match a response type supported by the server).
Has anyone successfully deleted a build via this API Call?
According to the documentation a Delete Build call should look like this:
Method=DELETE
{rootURI}/DeleteBuild?buildId=%27%27&apiVersion=%271.0%27
Andrew,
I just ran into this question... Did you resolve this issue?
In contrast with most of the functions, The datamarket version of the API requires a DELETE method to actually delete a build (as apposed to a GET) -- that may be the first thing to check.
Also, I want to make sure you are aware that the datamarket version of the API will be deprecated (please read the migration guide at https://azure.microsoft.com/en-us/documentation/articles/cognitive-services-migration-from-dm/ for more details). You should now be using the Recommendations API Cognitive Service (see https://www.microsoft.com/cognitive-services/en-us/recommendations-api ).
Either way, if you are still running into issue, feel free to contact us at mlapi#microsoft.com and we can check what may be wrong with your call.
Thanks!
Luis Cabrera
Recommendations API Program Manager

How to deploy custom DataCacheStoreProvider for write-through and read-behind on Azure

Is it possible to deploy custom DataCacheStoreProviders on Azure? I'm currently trying to deploy and test one locally, but I'm not sure how to go about this because the documentation doesn't cover my scenario. Any help would be appreciated.
No it not possible.
You can find all supported features here : http://msdn.microsoft.com/en-us/library/windowsazure/gg278350.aspx
I think your question is specific to cloud Service, isn't it?
I don't have exact experience on how to get all of that working however during one similar discussion the outcome was that you can use DataCacheStoreProviders with Azure if after building and register DataCacheStoreProviders in your machine, you can access them using Windows Azure Cache modules i.e. using DataCacheFactory.GetCache(String cacheName) and process cache items. IF you try and met any problem in any step I can find some ways to help you after you post your issue.

Resources