SlideShare a Scribd company logo
1 of 39
Download to read offline
© 2020 Arm Limited
Digdag updates
Embulk & Digdag Online Meetup 2020
1
© 2019 Arm Limited
About me
• You Yamagata (github: yoyama)
• Joined Arm Treasure Data in Jan. 2019
• Backend team
• TD Workflow/Digdag
2
© 2019 Arm Limited
Agenda
• v0.9 recent updates
• Next major version
• Graaljs migration in TD
© 2019 Arm Limited
About TD and Digdag
• TD is providing workflow in TD service
https://tddocs.atlassian.net/wiki/spaces/PD/pages/1083994/Understanding+Workflows
• For both customers and internal use
• TD workflow is based on Digdag
• Not using v0.9, but using another version (in public)
• Customize Digdag
– Private code is small (e.g. authentication, audit)
• Running many workflows in clusters with multi tenant
Digdag is an important component for TD workflow!
TD workflow is the largest use case of Digdag
© 2020 Arm Limited
v0.9 recent updates
5
© 2019 Arm Limited
Feature highlight
1. http_call> 0.9.37
2.
Authenticator SPI & plugin /
Basic authentication
0.9.39
3. GCS support as storage 0.9.41
4. require> enhancements 0.9.42
6
© 2019 Arm Limited
http_call>
• 0.9.37
• New operator
https://docs.digdag.io/operators/http_call.html
• Similar to call>
• call> ... Insert another workflow in the project
• http_call> ... Insert another workflow downloaded
The response of http must be either YAML or JSON
• Need correct content-type or content_type_override param
• Use case
• Dynamically generate workflow with complicated conditions
7
© 2019 Arm Limited
Authenticator SPI & plugin / Basic authentication
• 0.9.39
• New SPI and plugin configuration for developer
• io.digdag.spi.Authenticator
• server.authenticator-class
• Introduce basic authentication plugin
8
© 2019 Arm Limited
Setup basic authentication
9
server.properties
server.authenticator-class = io.digdag.standards.auth.basic.BasicAuthenticator
basicauth.username = user1
basicauth.password = testtest
> digdag projects --basic-auth user1:testtest
2020-07-02 18:48:53 +0900: Digdag v0.9.42
Projects
name: prj1
id: 1
> cat ~/.config/digdag/config
client.http.headers.authorization = Basic dXNlcjE6dGVzdHRlc3Q
> digdag -c ~/.config/digdag/config projects
© 2019 Arm Limited
Develop authenticator plugin
10
• digdag-basic-auth-mt
https://github.com/yoyama/digdag-basic-auth-mt
• Basic authentication with
• multi-user
• multi-tenant (site_id)
server.properties
server.authenticator-class = io.github.yoyama.digdag.bauth.BasicAuthMTAuthenticator
system-plugin.repositories = https://dl.bintray.com/yoyama/maven
system-plugin.dependencies = io.github.yoyama:digdag-basic-auth-mt_2.12:0.1.0
plugins.basic_auth_mt.passwd_file=<path_to_passwrwd_file>
plugins.basic_auth_mt.user_map_file=<path_to_user_map_fiel>
passwd_file (htpasswd)
user2:$apr1$HtOrA/2I$HXTTf2p4MQqbVV/Alq4ci.
user1:$apr1$xjBNYkXH$HJ7pXsaX9MXAyxfgl6uLY/
user_map_file (user:site_id:admin)
user1:0:true
user2:22:false
© 2019 Arm Limited
GCS support as storage
• 0.9.39
• digdag-storage-gcs
• Similar to digdag-storage-s3
• Archive and log-server
11
© 2019 Arm Limited
require> enhancement
• 0.9.42 latest
• Back port from v0_10
• project_name parameter
• rerun_on parameter
• Fix an issues on ‘digdag retry’
https://github.com/treasure-data/digdag/issues/712
12
© 2019 Arm Limited
rerun_on
• Both Parent1 and parent2 call child1
• All run is in same session time
• Parent2 run firstly and kick child1
• Parent1 will start after parent2 finish.
parent1.dig
+p1:
require>: child1
child1.dig
+c1:
...
parent2.dig
+p2:
require>: child1
parent2
child1
parent1
?
+p2:
+p1:
© 2019 Arm Limited
rerun_on: none
• rerun_on: none (default)
• child1 kicked by parent2: success
parent1.dig
+p1:
require>: child1
rerun_on: none
child1.dig
+c1:
...
parent2.dig
+p2:
require>: child1
child1
success
child1
skip
• parent1 will not kick child1
• +p1 will succeed
parent2
parent1
+p2:
+p1:
© 2019 Arm Limited
rerun_on: none
• rerun_on: none (default)
• child1 kicked by parent2: fail
parent1.dig
+p1:
require>: child1
rerun_on: none
child1.dig
+c1:
...
parent2.dig
+p2:
require>: child1
child1
fail
child1
skip
• parent1 will not kick child1
• +p1 will fail
parent2
parent1
+p2:
+p1:
© 2019 Arm Limited
rerun_on: failed
• rerun_on: failed
• child1 kicked by parent2: success
parent1.dig
+p1:
require>: child1
rerun_on: none
child1.dig
+c1:
...
parent2.dig
+p2:
require>: child1
child1
success
child1
skip
• parent1 will not kick child1
• +p1 will succeed
parent2
parent1
+p2:
+p1:
© 2019 Arm Limited
rerun_on: failed
• rerun_on: failed
• child1 kicked by parent2: fail
parent1.dig
+p1:
require>: child1
rerun_on: none
child1.dig
+c1:
...
parent2.dig
+p2:
require>: child1
child1
fail
child1
kicked
• parent1 will kick child1
parent2
parent1
+p2:
+p1:
© 2019 Arm Limited
rerun_on: all
• rerun_on: all
• child1 kicked by parent2: success
parent1.dig
+p1:
require>: child1
rerun_on: none
child1.dig
+c1:
...
parent2.dig
+p2:
require>: child1
child1
success
child1
kicked
• parent1 will kick child1
parent2
parent1
+p2:
+p1:
© 2019 Arm Limited
rerun_on: all
• rerun_on: all
• child1 kicked by parent2: fail
parent1.dig
+p1:
require>: child1
rerun_on: none
child1.dig
+c1:
...
parent2.dig
+p2:
require>: child1
child1
fail
child1
kicked
• parent1 will kick child1
parent2
parent1
+p2:
+p1:
© 2019 Arm Limited
require> enhancement
rerun_on control kick of child when child attempts exist
• rerun_on: none (default)
• Never kick. Same as previous version
• rerun_on: failed
• Kick if the attempt failed
• rerun_on: all
• Kick always
20
© 2020 Arm Limited
Next major version
21
© 2019 Arm Limited
Current status
22
• Under development (v0.10.0)
• Based on TD release branch
• v0_10
• Include many modification, features
• Release schedule is not clear.
• 0.9 is still mainline
• If you want to try ...
• Build v0_10 branch
• Download snapshot https://bintray.com/digdag/maven-snapshots/...
• Just only for evaluation
© 2019 Arm Limited
Feature highlight
23
• CommandExecutor / ECS,K8 support
• AccessController SPI
• Java11
• Graaljs
© 2019 Arm Limited
CommandExecutor
24
What is CommandExecutor?
• “Command executor (io.digdag.spi.CommandExecutor) is a plugin interface that is
used to execute a command in a sandbox environment.”
http://docs.digdag.io/internal.html#command-executor
• Running tasks in Docker, container services
• sh>, py>, rb> operators support CommandExecutor
• 0.9 supports
• DockerCommandExecutor
• SimpleCommandExectuor
Default is docker
Fallback if no docker setting
© 2019 Arm Limited
CommandExecutor
25
New in 0.10
• SPI has been modified (support container service)
• Support
• ECSCommandExecutor
• KubernetesCommandExecutor
• Under development
© 2019 Arm Limited
Java11
26
• Experimental
• Fixed some blockers
• Now you can build and run on Java11
• Java8 is main platform in Digdag
• Java8 is still alive
• Both support is hard for us
© 2019 Arm Limited
Graaljs
27
• Support graaljs as replacement of nashorn
• Nashorn is default in Java8
• Graaljs is default in Java11
• Configuration
• eval.js-engine-type : "nashorn" or "graal"
• eval.extended-syntax : true or false
– only support in graal
• syntax extension
• Support nested ‘{...}’
• But ...
_export:
v1: [1,2,3]
+t1:
echo>: "${v1.map(function(item){ return item*5 } )}"
© 2020 Arm Limited
Graaljs migration in TD
28
© 2019 Arm Limited
Background
29
• A plan to move on Java11 in TD workflow
• Nashorn as JavaScript engine in workflow
definition “ConfigEvalEngine”
• Nashorn is deprecated in Java11 blocker!
• Nashorn also causes performance degradation
• We need to replace Nashorn to another
Graaljs
© 2019 Arm Limited
Graaljs
30
• “A high performance implementation of the JavaScript programming language. Built
on the GraalVM by Oracle Labs”
https://github.com/graalvm/graaljs
• Graaljs is available in JDK
© 2019 Arm Limited
Purpose / Requirements
31
• Improve performance of ConfigEvalEngine
• Keep compatibility between nashorn and graaljs
• Workflow behavior must be same as much as possible
• Stability
© 2019 Arm Limited
Procedure
32
1. A PR (by sada)
2. Pre-investigation performance/compatibility
3. Some fixes for improvements
4. Run in TD production for compatibility test
5. Fix issues
6. Release
© 2019 Arm Limited
Pre-investigation and improvement
33
• Extract graaljs and nashorn logic from Digdag and evaluated
• Point 1 … performance
• Point 2 … compatibility
© 2019 Arm Limited
Pre-investigation and improvement
34
• Performance
• Evaluated by small test code with JMH
• Graaljs is very faster than nashorn in both
Java8 and Java11
• Compatibility
• Optimize graaljs options and improve
compatibility
• Graaljs has “js.nashorn-compat” but not
enough
© 2019 Arm Limited
Conclusion on pre-investigation
35
• Graaljs performance is enough for Digdag
• Compatibility is basically good
© 2019 Arm Limited
Run compatibility test in production
36
• Used special mode
• Both nashorn and graaljs evaluate same text and compare the result
• Stop using syntax extension
• Found some issues only in production
• Iterate fix and test
• Finally fixed all issues
“echo>: ${moment(....)..”
ConfigEvalEngine
nashorn
graaljs
compare
discard
return value
logging
© 2019 Arm Limited
Results
37
• We had already deployed Graaljs/w Java11
• No inquiry on workflow compatibility
• Performance improved dramatically as expected
• CPU usage declined
© 2019 Arm Limited
Conclusion
38
• Graaljs is very fit to Digdag
• Almost all efforts and works in TD has been contributed to Digdag (v0_10)
• Users don’t care compatibility of JS on workflow definition with graaljs
Thank You
Danke
Merci
谢谢
ありがとう
Gracias
Kiitos
감사합니다
धन्यवाद
‫ﺗﺷﮑر‬
© 2019 Arm Limited

More Related Content

What's hot

AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017
AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017
AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017
Amazon Web Services Korea
 

What's hot (20)

Embulk - 進化するバルクデータローダ
Embulk - 進化するバルクデータローダEmbulk - 進化するバルクデータローダ
Embulk - 進化するバルクデータローダ
 
Fluentd at Bay Area Kubernetes Meetup
Fluentd at Bay Area Kubernetes MeetupFluentd at Bay Area Kubernetes Meetup
Fluentd at Bay Area Kubernetes Meetup
 
Using Embulk at Treasure Data
Using Embulk at Treasure DataUsing Embulk at Treasure Data
Using Embulk at Treasure Data
 
[212] large scale backend service develpment
[212] large scale backend service develpment[212] large scale backend service develpment
[212] large scale backend service develpment
 
Recent Updates at Embulk Meetup #3
Recent Updates at Embulk Meetup #3Recent Updates at Embulk Meetup #3
Recent Updates at Embulk Meetup #3
 
Stream processing in Mercari - Devsumi 2015 autumn LT
Stream processing in Mercari - Devsumi 2015 autumn LTStream processing in Mercari - Devsumi 2015 autumn LT
Stream processing in Mercari - Devsumi 2015 autumn LT
 
MySQL Replication — Advanced Features / Петр Зайцев (Percona)
MySQL Replication — Advanced Features / Петр Зайцев (Percona)MySQL Replication — Advanced Features / Петр Зайцев (Percona)
MySQL Replication — Advanced Features / Петр Зайцев (Percona)
 
AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017
AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017
AWS와 Docker Swarm을 이용한 쉽고 빠른 컨테이너 오케스트레이션 - AWS Summit Seoul 2017
 
Embuk internals
Embuk internalsEmbuk internals
Embuk internals
 
WordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngineWordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngine
 
Google App Engine With Java And Groovy
Google App Engine With Java And GroovyGoogle App Engine With Java And Groovy
Google App Engine With Java And Groovy
 
now
nownow
now
 
Happy Browser, Happy User! WordSesh 2019
Happy Browser, Happy User! WordSesh 2019Happy Browser, Happy User! WordSesh 2019
Happy Browser, Happy User! WordSesh 2019
 
Amazed by aws 1st session
Amazed by aws 1st sessionAmazed by aws 1st session
Amazed by aws 1st session
 
Logging for Production Systems in The Container Era
Logging for Production Systems in The Container EraLogging for Production Systems in The Container Era
Logging for Production Systems in The Container Era
 
how to mesure web performance metrics
how to mesure web performance metricshow to mesure web performance metrics
how to mesure web performance metrics
 
Web前端性能优化 2014
Web前端性能优化 2014Web前端性能优化 2014
Web前端性能优化 2014
 
[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기
 
Introduction to ansible galaxy
Introduction to ansible galaxyIntroduction to ansible galaxy
Introduction to ansible galaxy
 
Oracle on AWS RDS Migration - 성기명
Oracle on AWS RDS Migration - 성기명Oracle on AWS RDS Migration - 성기명
Oracle on AWS RDS Migration - 성기명
 

Similar to Digdag Updates 2020 July

Kubernetes fingerprinting with Prometheus.pdf
Kubernetes fingerprinting with Prometheus.pdfKubernetes fingerprinting with Prometheus.pdf
Kubernetes fingerprinting with Prometheus.pdf
KawimbaLofgrens
 

Similar to Digdag Updates 2020 July (20)

Grails 3.0 Preview
Grails 3.0 PreviewGrails 3.0 Preview
Grails 3.0 Preview
 
Gocd – Kubernetes/Nomad Continuous Deployment
Gocd – Kubernetes/Nomad Continuous DeploymentGocd – Kubernetes/Nomad Continuous Deployment
Gocd – Kubernetes/Nomad Continuous Deployment
 
Docker Enterprise Workshop - Technical
Docker Enterprise Workshop - TechnicalDocker Enterprise Workshop - Technical
Docker Enterprise Workshop - Technical
 
Dropwizard and Groovy
Dropwizard and GroovyDropwizard and Groovy
Dropwizard and Groovy
 
Grails 4: Upgrade your Game!
Grails 4: Upgrade your Game!Grails 4: Upgrade your Game!
Grails 4: Upgrade your Game!
 
Pivotal Platform - December Release A First Look
Pivotal Platform - December Release A First LookPivotal Platform - December Release A First Look
Pivotal Platform - December Release A First Look
 
Azure serverless computing
Azure serverless computingAzure serverless computing
Azure serverless computing
 
Dockerizing Ruby Applications - The Best Practices
Dockerizing Ruby Applications - The Best PracticesDockerizing Ruby Applications - The Best Practices
Dockerizing Ruby Applications - The Best Practices
 
HOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLDHOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLD
 
Docker Timisoara: Dockercon19 recap slides, 23 may 2019
Docker Timisoara: Dockercon19 recap slides, 23 may 2019Docker Timisoara: Dockercon19 recap slides, 23 may 2019
Docker Timisoara: Dockercon19 recap slides, 23 may 2019
 
Docker and Jenkins [as code]
Docker and Jenkins [as code]Docker and Jenkins [as code]
Docker and Jenkins [as code]
 
Best practices for developing your Magento Commerce on Cloud
Best practices for developing your Magento Commerce on CloudBest practices for developing your Magento Commerce on Cloud
Best practices for developing your Magento Commerce on Cloud
 
Why use Gitlab
Why use GitlabWhy use Gitlab
Why use Gitlab
 
Why and How to Run Your Own Gitlab Runners as Your Company Grows
Why and How to Run Your Own Gitlab Runners as Your Company GrowsWhy and How to Run Your Own Gitlab Runners as Your Company Grows
Why and How to Run Your Own Gitlab Runners as Your Company Grows
 
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
 
Kubernetes fingerprinting with Prometheus.pdf
Kubernetes fingerprinting with Prometheus.pdfKubernetes fingerprinting with Prometheus.pdf
Kubernetes fingerprinting with Prometheus.pdf
 
GIDS_15FactorWorkshop.pdf
GIDS_15FactorWorkshop.pdfGIDS_15FactorWorkshop.pdf
GIDS_15FactorWorkshop.pdf
 
An XPager's Guide to Process Server-Side Jobs on Domino
An XPager's Guide to Process Server-Side Jobs on DominoAn XPager's Guide to Process Server-Side Jobs on Domino
An XPager's Guide to Process Server-Side Jobs on Domino
 
ICONUK 2013 - An XPager's Guide to Process Server-Side Jobs on IBM® Domino®
ICONUK 2013 - An XPager's Guide to Process Server-Side Jobs on IBM® Domino®ICONUK 2013 - An XPager's Guide to Process Server-Side Jobs on IBM® Domino®
ICONUK 2013 - An XPager's Guide to Process Server-Side Jobs on IBM® Domino®
 
Git - Boost Your DEV Team Speed and Productivity
Git - Boost Your DEV Team Speed and ProductivityGit - Boost Your DEV Team Speed and Productivity
Git - Boost Your DEV Team Speed and Productivity
 

Recently uploaded

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 

Digdag Updates 2020 July

  • 1. © 2020 Arm Limited Digdag updates Embulk & Digdag Online Meetup 2020 1
  • 2. © 2019 Arm Limited About me • You Yamagata (github: yoyama) • Joined Arm Treasure Data in Jan. 2019 • Backend team • TD Workflow/Digdag 2
  • 3. © 2019 Arm Limited Agenda • v0.9 recent updates • Next major version • Graaljs migration in TD
  • 4. © 2019 Arm Limited About TD and Digdag • TD is providing workflow in TD service https://tddocs.atlassian.net/wiki/spaces/PD/pages/1083994/Understanding+Workflows • For both customers and internal use • TD workflow is based on Digdag • Not using v0.9, but using another version (in public) • Customize Digdag – Private code is small (e.g. authentication, audit) • Running many workflows in clusters with multi tenant Digdag is an important component for TD workflow! TD workflow is the largest use case of Digdag
  • 5. © 2020 Arm Limited v0.9 recent updates 5
  • 6. © 2019 Arm Limited Feature highlight 1. http_call> 0.9.37 2. Authenticator SPI & plugin / Basic authentication 0.9.39 3. GCS support as storage 0.9.41 4. require> enhancements 0.9.42 6
  • 7. © 2019 Arm Limited http_call> • 0.9.37 • New operator https://docs.digdag.io/operators/http_call.html • Similar to call> • call> ... Insert another workflow in the project • http_call> ... Insert another workflow downloaded The response of http must be either YAML or JSON • Need correct content-type or content_type_override param • Use case • Dynamically generate workflow with complicated conditions 7
  • 8. © 2019 Arm Limited Authenticator SPI & plugin / Basic authentication • 0.9.39 • New SPI and plugin configuration for developer • io.digdag.spi.Authenticator • server.authenticator-class • Introduce basic authentication plugin 8
  • 9. © 2019 Arm Limited Setup basic authentication 9 server.properties server.authenticator-class = io.digdag.standards.auth.basic.BasicAuthenticator basicauth.username = user1 basicauth.password = testtest > digdag projects --basic-auth user1:testtest 2020-07-02 18:48:53 +0900: Digdag v0.9.42 Projects name: prj1 id: 1 > cat ~/.config/digdag/config client.http.headers.authorization = Basic dXNlcjE6dGVzdHRlc3Q > digdag -c ~/.config/digdag/config projects
  • 10. © 2019 Arm Limited Develop authenticator plugin 10 • digdag-basic-auth-mt https://github.com/yoyama/digdag-basic-auth-mt • Basic authentication with • multi-user • multi-tenant (site_id) server.properties server.authenticator-class = io.github.yoyama.digdag.bauth.BasicAuthMTAuthenticator system-plugin.repositories = https://dl.bintray.com/yoyama/maven system-plugin.dependencies = io.github.yoyama:digdag-basic-auth-mt_2.12:0.1.0 plugins.basic_auth_mt.passwd_file=<path_to_passwrwd_file> plugins.basic_auth_mt.user_map_file=<path_to_user_map_fiel> passwd_file (htpasswd) user2:$apr1$HtOrA/2I$HXTTf2p4MQqbVV/Alq4ci. user1:$apr1$xjBNYkXH$HJ7pXsaX9MXAyxfgl6uLY/ user_map_file (user:site_id:admin) user1:0:true user2:22:false
  • 11. © 2019 Arm Limited GCS support as storage • 0.9.39 • digdag-storage-gcs • Similar to digdag-storage-s3 • Archive and log-server 11
  • 12. © 2019 Arm Limited require> enhancement • 0.9.42 latest • Back port from v0_10 • project_name parameter • rerun_on parameter • Fix an issues on ‘digdag retry’ https://github.com/treasure-data/digdag/issues/712 12
  • 13. © 2019 Arm Limited rerun_on • Both Parent1 and parent2 call child1 • All run is in same session time • Parent2 run firstly and kick child1 • Parent1 will start after parent2 finish. parent1.dig +p1: require>: child1 child1.dig +c1: ... parent2.dig +p2: require>: child1 parent2 child1 parent1 ? +p2: +p1:
  • 14. © 2019 Arm Limited rerun_on: none • rerun_on: none (default) • child1 kicked by parent2: success parent1.dig +p1: require>: child1 rerun_on: none child1.dig +c1: ... parent2.dig +p2: require>: child1 child1 success child1 skip • parent1 will not kick child1 • +p1 will succeed parent2 parent1 +p2: +p1:
  • 15. © 2019 Arm Limited rerun_on: none • rerun_on: none (default) • child1 kicked by parent2: fail parent1.dig +p1: require>: child1 rerun_on: none child1.dig +c1: ... parent2.dig +p2: require>: child1 child1 fail child1 skip • parent1 will not kick child1 • +p1 will fail parent2 parent1 +p2: +p1:
  • 16. © 2019 Arm Limited rerun_on: failed • rerun_on: failed • child1 kicked by parent2: success parent1.dig +p1: require>: child1 rerun_on: none child1.dig +c1: ... parent2.dig +p2: require>: child1 child1 success child1 skip • parent1 will not kick child1 • +p1 will succeed parent2 parent1 +p2: +p1:
  • 17. © 2019 Arm Limited rerun_on: failed • rerun_on: failed • child1 kicked by parent2: fail parent1.dig +p1: require>: child1 rerun_on: none child1.dig +c1: ... parent2.dig +p2: require>: child1 child1 fail child1 kicked • parent1 will kick child1 parent2 parent1 +p2: +p1:
  • 18. © 2019 Arm Limited rerun_on: all • rerun_on: all • child1 kicked by parent2: success parent1.dig +p1: require>: child1 rerun_on: none child1.dig +c1: ... parent2.dig +p2: require>: child1 child1 success child1 kicked • parent1 will kick child1 parent2 parent1 +p2: +p1:
  • 19. © 2019 Arm Limited rerun_on: all • rerun_on: all • child1 kicked by parent2: fail parent1.dig +p1: require>: child1 rerun_on: none child1.dig +c1: ... parent2.dig +p2: require>: child1 child1 fail child1 kicked • parent1 will kick child1 parent2 parent1 +p2: +p1:
  • 20. © 2019 Arm Limited require> enhancement rerun_on control kick of child when child attempts exist • rerun_on: none (default) • Never kick. Same as previous version • rerun_on: failed • Kick if the attempt failed • rerun_on: all • Kick always 20
  • 21. © 2020 Arm Limited Next major version 21
  • 22. © 2019 Arm Limited Current status 22 • Under development (v0.10.0) • Based on TD release branch • v0_10 • Include many modification, features • Release schedule is not clear. • 0.9 is still mainline • If you want to try ... • Build v0_10 branch • Download snapshot https://bintray.com/digdag/maven-snapshots/... • Just only for evaluation
  • 23. © 2019 Arm Limited Feature highlight 23 • CommandExecutor / ECS,K8 support • AccessController SPI • Java11 • Graaljs
  • 24. © 2019 Arm Limited CommandExecutor 24 What is CommandExecutor? • “Command executor (io.digdag.spi.CommandExecutor) is a plugin interface that is used to execute a command in a sandbox environment.” http://docs.digdag.io/internal.html#command-executor • Running tasks in Docker, container services • sh>, py>, rb> operators support CommandExecutor • 0.9 supports • DockerCommandExecutor • SimpleCommandExectuor Default is docker Fallback if no docker setting
  • 25. © 2019 Arm Limited CommandExecutor 25 New in 0.10 • SPI has been modified (support container service) • Support • ECSCommandExecutor • KubernetesCommandExecutor • Under development
  • 26. © 2019 Arm Limited Java11 26 • Experimental • Fixed some blockers • Now you can build and run on Java11 • Java8 is main platform in Digdag • Java8 is still alive • Both support is hard for us
  • 27. © 2019 Arm Limited Graaljs 27 • Support graaljs as replacement of nashorn • Nashorn is default in Java8 • Graaljs is default in Java11 • Configuration • eval.js-engine-type : "nashorn" or "graal" • eval.extended-syntax : true or false – only support in graal • syntax extension • Support nested ‘{...}’ • But ... _export: v1: [1,2,3] +t1: echo>: "${v1.map(function(item){ return item*5 } )}"
  • 28. © 2020 Arm Limited Graaljs migration in TD 28
  • 29. © 2019 Arm Limited Background 29 • A plan to move on Java11 in TD workflow • Nashorn as JavaScript engine in workflow definition “ConfigEvalEngine” • Nashorn is deprecated in Java11 blocker! • Nashorn also causes performance degradation • We need to replace Nashorn to another Graaljs
  • 30. © 2019 Arm Limited Graaljs 30 • “A high performance implementation of the JavaScript programming language. Built on the GraalVM by Oracle Labs” https://github.com/graalvm/graaljs • Graaljs is available in JDK
  • 31. © 2019 Arm Limited Purpose / Requirements 31 • Improve performance of ConfigEvalEngine • Keep compatibility between nashorn and graaljs • Workflow behavior must be same as much as possible • Stability
  • 32. © 2019 Arm Limited Procedure 32 1. A PR (by sada) 2. Pre-investigation performance/compatibility 3. Some fixes for improvements 4. Run in TD production for compatibility test 5. Fix issues 6. Release
  • 33. © 2019 Arm Limited Pre-investigation and improvement 33 • Extract graaljs and nashorn logic from Digdag and evaluated • Point 1 … performance • Point 2 … compatibility
  • 34. © 2019 Arm Limited Pre-investigation and improvement 34 • Performance • Evaluated by small test code with JMH • Graaljs is very faster than nashorn in both Java8 and Java11 • Compatibility • Optimize graaljs options and improve compatibility • Graaljs has “js.nashorn-compat” but not enough
  • 35. © 2019 Arm Limited Conclusion on pre-investigation 35 • Graaljs performance is enough for Digdag • Compatibility is basically good
  • 36. © 2019 Arm Limited Run compatibility test in production 36 • Used special mode • Both nashorn and graaljs evaluate same text and compare the result • Stop using syntax extension • Found some issues only in production • Iterate fix and test • Finally fixed all issues “echo>: ${moment(....)..” ConfigEvalEngine nashorn graaljs compare discard return value logging
  • 37. © 2019 Arm Limited Results 37 • We had already deployed Graaljs/w Java11 • No inquiry on workflow compatibility • Performance improved dramatically as expected • CPU usage declined
  • 38. © 2019 Arm Limited Conclusion 38 • Graaljs is very fit to Digdag • Almost all efforts and works in TD has been contributed to Digdag (v0_10) • Users don’t care compatibility of JS on workflow definition with graaljs