Comments (8)
Implementation idea:
- Change NoopWorkspaceManager:
- rename to LocalDirectoryWorkspaceManager
- take "_workspace" from TaskRequest.getConfig. if it's set, use the directory as workspace path. Otherwise, use current directory (that is same with current behavior).
- (Rename LocalWorkspaceManager to ExtractArchiveWorkspaceManager because the original name becomes confusing)
- Change ProjectArchiveLoader:
- loadProject takes path to a directory that has
.digdag/config
instead of path to a file named digdag.yml. - it finds *.dig files recursively and load all of them
- it calls
resourceNameToWorkflowName(realPathToResourcename(Path))
methods to convert path of *.dig file to workflow name.
- loadProject takes path to a directory that has
- Change ProjectArchive:
- add
private final Path projectDirectoryPath
method. - add
realPathToResourceName(Path)
method that converts Path to a resource name that is relative from projectDirectoryPath. - change
listFiles((path) -> { ... })
tolistFiles((resourceName, realPath) -> { ... })
- (add
Properties getProjectConfig()
that returns parsed contents of .digdag/config).
- add
- Change cli.Run:
- requires at least 1 argument.
- finds .digdag/config file from current directory to parent directories until root (/) or at most N depth.
- if it's found, call ProjectArchiveLoader.loadProject with that path. Otherwise, throws an exception.
- if given name doesn't end with ".dig", add it. Then, call
resourceNameToWorkflowName(projectArchive.realPathToResourceName(path))
to get the workflow name using the same way with ProjectArchiveLoader. - lookup that name from
projectArchive.getArchiveMetadata().getWorkflowList()
. - if it's found, store it to ProjectStoreManager and run it. otherwise, throws an exception.
- when it stores a workflow, set
_workspace = projectArchive.getProjectDirectoryPath()
to Revision.defaultParams so that LocalDirectoryWorkspaceManager uses it as the workspace path. this step can be omitted if projectArchive.getProjectDirectoryPath() is same with current directory.
- Change cli.Push:
- use same behavior with cli.Run for step ii. and iii.
from digdag.
I believe we said that digdag should not be recursively searching for .dig
files in subdirectories. Instead, if a user wants to use subdirectories, they have to list either the subdirectories or the workflows explicitly in a project file.
from digdag.
no, we said that digdag recursively searches for .dig files in subdirectories. otherwise this behavior doesn't make sense:
digdag push pushes entire project (as identified by .digdag) in some parent dir, even if executed in a subdir.
from digdag.
That still makes sense without recursively searching for .dig
in subdirectories. The digdag cli recurses to parent directories to find the .digdag
directory. digdag push
pushes all files and subdirectories in the project directory, regardless of file extension.
from digdag.
Note the difference between recursing upwards into parent directories to find .digdag
and recursing downwards into subdirectories.
from digdag.
then why does digdag push
look for .digdag
in some parent dir when it's executed in a subdir?
from digdag.
So that the digdag command can behave like git. I.e. a digdag project is defined by the presence of .digdag
in some parent dir and doing digdag push
in a subdir uploads the entire digdag project.
Given that digdag push
uploads the entire directory tree rooted in the directory containing .digdag
I'm not sure why it would be necessary to search specifically for .dig
files in subdirectories. It seems to be that all those subdirectories along with the .dig
files will be uploaded anyway. Am I missing/misunderstanding something?
from digdag.
Close the old issue. Please reopen or file new one if you need.
from digdag.
Related Issues (20)
- How do I point to the parent path? HOT 1
- [feature-request] Oracle operator HOT 1
- Unable to kill node.js task HOT 3
- How to create a global config for multiple projects in the workspace? HOT 2
- Unable to exit as success status when using sys.exit(0) from py:> operator HOT 2
- broken dependency in digdag-client
- Please add route /workflows/{workflow_id}/edit
- [Regression] Commit breaks --enable-swagger HOT 3
- Concurrent update in table "QUEUED_TASK_LOCKS": another transaction has updated or deleted the same row [90131-192] HOT 5
- Please release v0.10.5 HOT 2
- Swagger is broken in v0.10.5 and v0.10.5.1 HOT 2
- Docker build environment fails to build HOT 1
- How to exit or continue while using if or for_each or range or loop in digdag?
- How to add two conditions in the if statement in digdag? HOT 2
- Workflow task is showing running status
- Error with http call HOT 5
- Incorrect description of the `last_id` query param on GET /api/attempts endpoint. HOT 1
- Directory extraction task in workflow extracts unexpected items HOT 2
- Slack notification not sent when error occurs HOT 1
- "Text file busy" errors occur when running shell script via "sh>" HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from digdag.