[ 
https://issues.apache.org/jira/browse/GOBBLIN-1678?focusedWorklogId=801520&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-801520
 ]

ASF GitHub Bot logged work on GOBBLIN-1678:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 17/Aug/22 22:39
            Start Date: 17/Aug/22 22:39
    Worklog Time Spent: 10m 
      Work Description: Will-Lo commented on code in PR #3536:
URL: https://github.com/apache/gobblin/pull/3536#discussion_r948499554


##########
gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/GitConfigListener.java:
##########
@@ -137,23 +118,23 @@ public void removeChange(DiffEntry change) {
           .withDescription(SPEC_DESCRIPTION)
           .build();
 
-        this.flowCatalog.remove(spec.getUri());
+      this.flowCatalog.remove(spec.getUri());
     }
   }
 
 
-    /**
-     * check whether the file has the proper naming and hierarchy
-     * @param configFilePath the relative path from the repo root
-     * @return false if the file does not conform
-     */
+  /**
+   * check whether the file has the proper naming and hierarchy
+   * @param configFilePath the relative path from the repo root
+   * @return false if the file does not conform
+   */
   private boolean checkConfigFilePath(String configFilePath) {
     // The config needs to stored at 
configDir/flowGroup/flowName.(pull|job|json|conf)
     Path configFile = new Path(configFilePath);
     String fileExtension = Files.getFileExtension(configFile.getName());
 
     if (configFile.depth() != CONFIG_FILE_DEPTH
-        || !configFile.getParent().getParent().getName().equals(folderName)
+        || 
!configFile.getParent().getParent().getName().equals(configBaseFolderName)
         || 
!(PullFileLoader.DEFAULT_JAVA_PROPS_PULL_FILE_EXTENSIONS.contains(fileExtension)
         || 
PullFileLoader.DEFAULT_JAVA_PROPS_PULL_FILE_EXTENSIONS.contains(fileExtension)))
 {
       log.warn("Changed file does not conform to directory structure and file 
name format, skipping: "

Review Comment:
   I agree the logging isn't very visible but its preferable to stopping the 
service, ideally we should add tests in the flowgraph itself / this git config 
repository so that improperly formatted folders never get read by GaaS.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 801520)
    Time Spent: 2h  (was: 1h 50m)

> Refactor GaaS Flowgraph Monitor to be extensible
> ------------------------------------------------
>
>                 Key: GOBBLIN-1678
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1678
>             Project: Apache Gobblin
>          Issue Type: Improvement
>            Reporter: William Lo
>            Priority: Major
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> To support new implementations of a flow graph monitor, which allows for live 
> updating of a flowgraph, we should reuse as much implementation from the 
> existing git flowgraph monitor as possible.
> The current flowgraph monitor has coupled logic to perform a lot of the 
> adding node/edges which can be reused for a file based flowgraph.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to