Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-16584

CronJobs written in YAML format don't work correctly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: Camel-K-GA
    • Component/s: Camel-K
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      1.

      kamel run cron-g.groovy
      kamel run cron.yaml
      

      2.

      oc get cronJobs
      NAME     SCHEDULE    SUSPEND   ACTIVE   LAST SCHEDULE   AGE
      cron-g   * * * * ?   False     0        52s             113s
      

      After checking the logs of both integrations you can see that cron-g creates the pod after every timer tick whereas cron written in YAML creates the pod once and prints the output in the loop

      Show
      1. kamel run cron-g.groovy kamel run cron.yaml 2. oc get cronJobs NAME SCHEDULE SUSPEND ACTIVE LAST SCHEDULE AGE cron-g * * * * ? False 0 52s 113s After checking the logs of both integrations you can see that cron-g creates the pod after every timer tick whereas cron written in YAML creates the pod once and prints the output in the loop
    • Regression Test:
      Todo

      Description

      Identical Camel-k integrations written in YAML and Groovy languages behave differently.
      CronJob written in YAML isn't contained in the OpenShift CronJobs list but produces the expected output. Check the attached files.

      From yaml cron logs:
      [1] 2021-05-31 14:27:38,332 INFO [io.qua.qua.run.QuartzScheduler] (main) No scheduled business methods found - Quartz scheduler will not be started

        Attachments

        1. cron.yaml
          1 kB
        2. cron-g.groovy
          1.0 kB
        3. groovy-cron.log
          24 kB
        4. yaml-cron.log
          8 kB

          Activity

            People

            Assignee:
            nibbio84 Nicola Ferraro
            Reporter:
            rhn-support-vsokolov Vlad Sokolovskii
            Tester:
            Andrej Smigala Andrej Smigala
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: