I am working on a Jira/Rally (CA Agile Central) integration and can get a basic sync to work, however some fields require a more complex transformation when syncing them between Jira and Rally.
For this I can see that the CA Agile Connector (https://help.rallydev.com/jira-installation-user-guide) provides some support for "custom field handlers" which are written in Ruby and follow a format like:
# Copyright 2015 CA Technologies. All Rights Reserved.
require 'rallyeif/wrk/field_handlers/field_handler'
module RallyEIF
module WRK
module FieldHandlers
class MyCustomFieldHandler < OtherFieldHandler
def initialize(field_name = nil)
super(field_name)
end
# ... more code here ...
end
end
end
end
However when I create that file and add the following to my connector config:
...
<Connector>
<FieldMapping>
<Field>
<Rally>Description</Rally>
<Other>Description</Other>
<Direction>TO_RALLY</Direction>
</Field>
...
</FieldMapping>
<OtherFieldHandlers>
<MyCustomFieldHandler>
<FieldName>Description</FieldName>
</MyCustomFieldHandler>
</OtherFieldHandlers>
</Connector>
...
When running the connector I get the following error:
[2017-08-22 20:25:39 Z] ERROR : RallyEIF::WRK::Connector.rescue in block in read_field_handlers - For RallyEIF::WRK::JiraConnection: Could not find class for MyCustomFieldHandler
The documentation does not mention how to use the custom handlers at all, so I'm wondering if anyone has used this feature and can share some information on how to declare and use the custom field handlers.
I tested connector version 4.7.2 and it worked. Things to check:
within the folder where the connector is invoked, there must be a folder named "field_handlers"
within this "field_handlers" folder, there must be a file (as you have shown above) with "class MyCustomFieldHandler < ...."
There is an example on the help pages. It's for HP-ALM (QC) not for JIRA, but the concept is the same:
https://help.rallydev.com/QC-custom-fieldhandler.pxml
End of ideas so far.
Related
I h got an issue with the following serverless config.
this is my handler and the files/folders structure.
the issue is that after uploading my project to AWS when I test my lambda I got an error as follows:
lambda execution fails: "errorMessage": "Unable to import module 'app_monitor': No module named 'monitoring'"
{
"errorMessage": "Unable to import module 'src/app_monitor': No module named 'monitoring'",
"errorType": "Runtime.ImportModuleError",
"requestId": "bca3f67d-815f-452b-a2a6-c713ad2c6baa",
"stackTrace": []
}
have you got any clue how can I add this into serverless config.?
First, a quick tip on troubleshooting: When I ran into such issues it was helpful to go to the AWS console, look at the lambda function, and see what the uploaded file structure looks like on that end. Is the monitoring folder there?
Moreover, in order to specify how a specific function is packaged, you have to explicitly state that you want it to be individually packaged and not follow the general rules of the project as a whole.
You should try to add:
app_monitoring:
package:
individually: true
patterns:
- 'src/**'
More documentation on packaging configuration here
You may also have better luck with explicitly stating the patterns you need, I know I've had issues with globs in the past. So for example you can try:
patterns:
- 'src/app_monitoring.py'
- 'src/monitoring/get_lb.py'
We are trying to use our logback.xml that we use in GCP Cloud run which has amazing filtering features. Our logback.xml contains this for cloud run
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="com.orderlyhealth.api.logging.logback.GCPCloudLoggingJSONLayout">
<pattern>${CONSOLE_PATTERN}</pattern>
</layout>
</encoder>
</appender>
And our GCPCloudLoggingJSONLayout does a great job at setting all the things we need like clientId, customerRequestId, etc. etc. and we can filter across many many microservices on one customer or one customer request. We lose this in dataflow currently though. We tried adding logback.xml to src/main/resources and deploying the project seems to use it in the shell like so
{"message":"[main][-][:] o.a.b.r.d.DataflowRunner Template successfully created.\n",
"logger":"org.apache.beam.runners.dataflow.DataflowRunner",
"transactionId":null,"socket":null,"clntSocket":null,
"version":null,
"timestamp":{"seconds":1619694798,"nanos":4000000},
"thread":"main",
"severity":"INFO",
"instanceId":null,
"headers":{},
"messageInfo":{"message":"Message short enough. Displayed top level"}
}
thanks for any ideas on modifying dataflow logging.
Currently we see this instead which is not nearly as useful for tracing the customer request through systems
I don't think you can change how Dataflow logs to Cloud logging.
Instead, you can change how/what you log and let Dataflow pass them through to cloud logging. See Logging pipeline messages.
Or you can use cloud logging client libraries in your pipeline directly: https://cloud.google.com/logging/docs/reference/libraries.
Please take a look at How to override Google DataFlow logging with logback? for the latest version of this answer
I copied the current answer there to make it easier for folks who want to look:
Dataflow relies on using java.util.logging (aka JUL) as the logging backend for SLF4J and adds various bridges ensuring that logs from other libraries are output as well. With this kind of setup, we are limited to adding any additional details to the log message itself only.
This also applies to any runner executing a portable job since the container with the SDK harness has a similar logging configuration. For example Dataflow Runner V2.
To do this we want to create a custom formatter to apply to the root JUL logger. For example:
public class CustomFormatter extends SimpleFormatter {
public String formatMessage(LogRecord record) {
// implement whatever logic the is needed to add details to the message portion of the log statement
return super.formatMessage(record);
}
}
And then during start-up of the worker we need to update the root logger to use this formatter. We can achieve this using a JvmInitializer and implement the beforeProcessing method like so:
#AutoService(JvmInitializer.class)
public class LoggerInitializer implements JvmInitializer {
public void beforeProcessing(PipelineOptions options) {
LogManager logManager = LogManager.getLogManager();
Logger rootLogger = logManager.getLogger("");
for (Handler handler : rootLogger.getHandlers()) {
handler.setFormatter(new CustomFormatter());
}
}
}
I´m newbie with Thingsquare
I'm traying to create a IP64 Gateway with MB851 Board (STM32W108CC microprocessor)
I send and receive data (IPv6 Radio) using 2 MB851 Boards with Thingsquare udp-multicast example.
I modified mist-mb851 platform to include an enc28j60-arch.c file to implement the platform code of SPI functions that are called by the enc28j60 driver
I modified ip64-conf.h to include enc28j60 driver and fallback interface
include "ip64-eth-interface.h"
include "enc28j60-ip64-driver.h"
define IP64_CONF_UIP_FALLBACK_INTERFACE ip64_eth_interface
define IP64_CONF_INPUT ip64_eth_interface_input
define IP64_CONF_DHCP 1
define IP64_CONF_ETH_DRIVER enc28j60_ip64_driver
I modified Contiki/platform/mb851 to include STM32 PeripheralLibs to create the SPI driver
The enj28j60 driver is tested
I compile the Thingsquare Router-Node example but when initialize the DHCP process
ip64_init();--->ip64_ipv4_dhcp_init();--->ip64_dhcpc_request();--->handle_dhcp();--->send_discover();
Nothing happens
Debugging the code when tcpip_ipv6_output(); function is call to send the packet the function ip64_6to4(...); fails and i don´t know why
Best Regards
I have been able to successfully configure resource environment entries with the Jython script below. I call the Jython script with the ws_admin program in my local app servers bin directory.
I work on a team where ant is the preferred technology in our build process.
I've looked around the web for documentation on configuring WebSphere with ant and so far it looks like to me that one is mainly able to call programs like ws_admin from ant.
Is it possible to configure resource environment entries using ant directly instead of using a Jython or Jacl script? If not, how can I go about setting up an ant task to reduce the amount of Jython that is needed to set up resource environment entries?
Here's my current Jython script that sets up resource environment entries. Ultimately looking for ways to reduce our dependence on Jython...
# Set up Variables used within this script
objServerAttrs = AdminControl.completeObjectName('WebSphere:type=Server,*')
node = AdminControl.getAttribute(objServerAttrs, 'nodeName')
server = AdminControl.getAttribute(objServerAttrs, 'name')
provider = "Test_ConfigurationProvider"
providerFactory = "com.DG_ConfigurationFactory"
providerClass = "com.DG_Configuration"
# Function for creating resource custom properties
def createResourceCustomProperty(envEntry, propName, propValue):
propSet = AdminConfig.showAttribute(envEntry, 'propertySet')
if propSet == None:
propSet = AdminConfig.create('J2EEResourcePropertySet',envEntry,[])
name = ['name', propName]
value = ['value', propValue]
propAttrs = [name, value]
AdminConfig.create('J2EEResourceProperty', propSet, propAttrs)
return
# Create the resource environment provider
AdminResources.createResourceEnvProvider(node, server, provider)
AdminResources.createResourceEnvProviderRef(node,server,provider, providerFactory, providerClass)
# Create the resource environment entries
## Context Configuration
envEntry = AdminResources.createResourceEnvEntries(node,server,provider, "Context Configuration", "test-config/context")
createResourceCustomProperty(envEntry, "deployment.environment", "IDE")
createResourceCustomProperty(envEntry, "server.context", "com.context.DG_WebSphereServerContext")
createResourceCustomProperty(envEntry, "user.context", "com.context.DG_WebSphereUserContext")
createResourceCustomProperty(envEntry, "log.directory", "C:/Development/WebSphere/Logs")
createResourceCustomProperty (envEntry, "file.directory", "C:/Development/WebSphere/AppFiles")
## Mail Configuration
envEntry = AdminResources.createResourceEnvEntries(node,server,provider, "Mail Configuration", "test-config/mail")
createResourceCustomProperty(envEntry, "enabled", "false")
createResourceCustomProperty(envEntry, "mailSessionJndiName", "mail/MailSession")
## User Repository Configuration
envEntry = AdminResources.createResourceEnvEntries(node, server, provider, "User Repository Configuration", "test-config/userRepository")
createResourceCustomProperty(envEntry, "ldap.provider.url", "ldap://test.com:389/cn=users,dc=com")
createResourceCustomProperty (envEntry, "ldap.security.principal", "cn=was_user,cn=users,dc=com")
# Save changes to the configuration
AdminConfig.save()
Starting with WAS 7, in addition to admin console and wsadmin, a third way to configure the server was introduced, namely properties file based configuration. This new administrative model supposedly "eliminates the need to write complex wsadmin scripts" as explained at related Education Assistant presentation.
What you do, basically, is configure a single environment, export the parts of configuration that are of interest to a portable properties file, and later use this file as an input to a single line of wsadmin script, which applies the configuration in the properties file to another target server. So you get rid of many lines of Jython and work with a much simpler artefact, which is a property file with a simple and familiar syntax.
In addition to above links there is a nice article about this feature at Developerworks.
I'm trying to develop a stand-alone client app that uses web services in a Glassfish container (Metro). About all I have to work from is a wsdl for the wervices I'm trying to use. The wsdl is rife with all kinds of 'wsp:Policy' tags. Looks like IssuedToken, Trust13, ecryption are all utilized.
So I generated some code from netbeans and JAX-WS. Everything went well, but when trying to run the client I get:
'WST0029:STS location could not be obtained from either IssuedToken or from client configuration for accessing the service http://localhost:8080/ ....'
That's when it occured to me that I know nothing about WSS. It doesn't look like any code was generated to deal with security. So, I'll have to go from scratch.
So where to start? Books? Tutorials?
TIA
Metro applies the policy in runtime from either the WSDL or the wsit-client.xml config file. That's why no code is generated related to policies. According to this post it is not possible at the moment to do programatically.
This tutorial explains pretty well some of the things you can do with WSS, and though everything do probably not apply in this case it's still a good read.
The simplest way I've found of generating a client with WSS support is by using the wsimport script from Metro:
cd metro/bin/
mkdir src target
./wsimport.sh -s src -d target -extension -Xendorsed -verbose YourService.wsdl
Then install Metro into your application server (copy the libs to the correct places or run the ant script):
ant -f metro-on-glassfish.xml
Then put your local WSDL file in your classpath (e.g. your resource folder), so Metro can get it at runtime to apply the policies from your generated YourService class:
private final static URL YOURSERVICE_WSDL_LOCATION;
// This is enough, you don't need the wsdlLocation attribute
// on the #WebServiceClient annotation if you have this.
static {
YOURSERVICE_WSDL_LOCATION =
CustomerService.class.getClassLoader().getResource("YourService.wsdl");
}
public YourService() {
super(YOURSERVICE_WSDL_LOCATION,
new QName("http://tempuri.org/", "YourService"));
}
And if you want WS-Addressing you might need to add the feature manually to your binding method (Metro has never generated it for me, so I always have to add it myself).
#WebEndpoint(name = "WSHttpBinding_IYourService")
public IYourService getWSHttpBindingIYourService() {
WebServiceFeature wsAddressing = new AddressingFeature(true);
IYourService service =
super.getPort(new QName("http://xmlns.example.com/services/Your",
"WSHttpBinding_IYourService"), IYourService.class,
wsAddressing);
return service;
}