Submitting a pipeline to microk8s.kubeflow, using kfp.Client python api - microk8s

I installed microk8s and is working. I can upload and run a pipeline using the UI. Now I installed kfp python api (issues exist with the cli too) and I'm trying to submit a pipeline using the cli. Here is the api for the client function:
def __init__(self, host=None, client_id=None, namespace='kubeflow', other_client_id=None, other_client_secret=None, existing_token=None, cookies=None):
I'm only passing the host 10.64.140.43.xip.io, but it fails with
AttributeError: 'NoneType' object has no attribute 'id'
Which suggests that the host and/or other default parameters are wrong. Unfortunately there is no doc whatsoever anywhere. My guess is I should somehow provide a user pass too. Can someone provide some concrete steps to filling the parameters so thet I can submit a pipeline programmatically?
Thanks

Related

Server-side request to upload file using Keystone

I have a Keystone list schema that has a field of type 'File'.
So, a GraphQL mutation to update entity has an Upload GraphQL type for argument that corresponds to this field.
I need to execute update mutation using executeGraphql in server environment.
Did not found any plug-and-play solution for that.
One way, we are using for our test environment is to create an instance of ApolloClient and pass a link with createUploadLink from apollo-upload-client library. But, AFAIK, this approach will trigger real HTTP request.
It seems, like better way is to use existing instance of Keystone class on server sideā€¦
Any recommendations?
Thank you.
Cheers!

AWS SAM APIGatewayProxyRequestEvent HttpMethod not set when starting API locally

I created an application with a AWS::SERVERLESS::FUNCTION, which has an HttpApi Event attached to it. I thought it would be a good idea to create one lambda per resource, so e.g. Post, Get and Put on /customer are all handled by a single lambda, which decides which action to take using
switch (input.getHttpMethod()) {
case "GET": ...
case "POST: ...
}
So now coming to my problem: When starting an application using sam local start-api my lambda gets called correctly, but neither input.getHttpMethod() nor input.getRequestContext().getHttpMethod() is set.
Given that SAM supports multiple HttpApi events, failing to provide the http method when running the application locally mitigates local development virtually completely. Am I doing something wrong, or is this really not working? I'm using Java btw, I can't tell if this problem exists using other languages as well.
Just in Case:
Is my "one lambda per resource" approach wrong, should every single action have its own lambda?
I found the problem. HttpApi uses "PayloadFormatVersion: 2.0" as default. input was of type com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent, but this represents format 1.0, I had to use com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPEvent to get it to work.
This fails silently because instances are just constructed from json input, and several fields are the same among both classes.

What is the alternative for instance parameter in snow_record_find ansible module?

I have tested the Ansible snow_record_find module towards my own ServiceNow Developer Instance and it is working fine. However, when I want to implement it in my project Testing environment by using my own company ServiceNow, I got error mentioned "HTTPSConnectionPool(host='domainname.com**.ng.service-now.com**', port=443): Max retries exceeded with url: //ap".
From this link: (https://github.com/ansible/awx/issues/2515), I found out that it has something to do with the instance parameter as the host parameter highlighted by the error shows that the ".service-now.com" is appended to my company ServiceNow instance url.
Hence, I concluded that is why I got this error. But, when I try to find out other alternative parameter for the instance like 'host' or 'url', there isn't anything like that.
Or perhaps, there is other work around that I can do for this? The main objectice here is using this module to retrieve record from ServiceNow table by using Query as shown as in the Ansible snow_record_find documentation: (https://docs.ansible.com/ansible/latest/modules/snow_record_find_module.html)
Thanks in advance
Regrettably, it appears the snow_record_find module only supports instance, and (as you experienced) pysnow prioritizes instance over host
It appears based on some traffic on a similar PR that they are now suggesting that one use the new ansible collections functionality
If you're not on ansible 2.9, then "forking" the snow_record_find.py into the library folder of your playbook is the only recourse I know of through which you can add a host module arg and then pass that arg into pysnow.OAuthClient to behave like you wish

SD: Configuring GAM External Authentication

I am trying to setup GAM using External Authentication.
I created my own procedure (exposed as webservice) to consume the external authentication services and return the &GAMWSLoginOutSDT GAM is expecting.
According to documentation, this procedure has to have exposed Namespace = "GAM" (meaning it has to be "Main Program" with Call Protocol "SOAP", right?)
But, as soon as I set Call Protocol "SOAP", I no longer can access the service URL in the browser:
http://localhost/myApp/app.wslogingam.svc
Is returns an error:
The type 'GeneXus.Programs.app.wslogingam_services,app.awslogingam', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.
I have already implemented this solution before for other Apps, but, for this one, I am stuck with this problem.
Maybe it's the genexus version ev3 u2 (beta)? (in previous versions, I used the prefix "a" for the exposed services, now it's "app.")
Can you please help?
GAM instructions I am trying to follow:
http://wiki.genexus.com/commwiki/servlet/hwiki?GAM+External+Authentication%3A+version+1.0,
Finally, I was able to solve the problem by setting the MainProgram of the procedure to "False" (I can still use it for GAM this way).
For some reason, setting it to "true" causes the error above.

Getting parameters from applicationManager

I am basically executing the following luna-send command and trying to get those parameters from applicationManager:
luna-send -n 1 palm://com.palm.power/timeout/set '{"wakeup":true, "key":"myKey",
"uri":"palm://com.palm.applicationManager/launch","params":{"id":"com.my.app",
"params":{"test":true,"test1:true}},"in":"00:00:15"}'
After executing this command, my app gets launched by applicationManager, but I don't know how to get those params in my app. I am using enyo 2.0. I was trying to use onWindowsParamsChange handler, but ApplicationEvents is deprecated for 2.0. Can anyone help me with this?
Thanks
Under Enyo 1.0 it was enyo.windowParams. Under Enyo 2.0 I believe this functionality is gone. These parameters may be available through Cordova, but I'm not positive right now as I don't have the source handy. In any case, this was loaded from PalmSystem.launchParams so you should be able to access that.
If you're handling relaunch then you'll have a little more work to do. I think you'll need to define a Mojo.relaunch on the window object to detect when the launch parameters change.

Resources