Coder Social home page Coder Social logo

Comments (8)

josephjclark avatar josephjclark commented on June 17, 2024 3

Hey @christad92 turns out that this is actually a Lightning issue. The error strings are coming from the Lightning backend

I've tightened up a few things in CLI deploy and i's been worth checking, but I'm going to have to hand this one over to a grown up now

from lightning.

josephjclark avatar josephjclark commented on June 17, 2024 1

@midigofrank This isn't so much about missing names

Lightning is already running a bunch of validation in lib/lightning/workflows/job.ex :: validate(). Stuff like checking what characters are in the name string, ensuring an adaptor is set.

We just need to append some kind of pathing information into the message.

Maybe check this slack thread for a bit more context

from lightning.

ritazagoni avatar ritazagoni commented on June 17, 2024

This is also impacting debugging GH sync failures of existing projects on app

from lightning.

josephjclark avatar josephjclark commented on June 17, 2024

Hi @ritazagoni - I've been meaning to get to this all week. It's sort of been second on my list every day 😬

I think it's an easy fix, I'll get on it

from lightning.

midigofrank avatar midigofrank commented on June 17, 2024

@josephjclark will the cli still make a request to the server if the workflow and job names are missing from the yaml?
Without the names in the params, the backend won't be quite helpful either 😬 .

If they're editing an existing workflow/job, then yes, but for a new workflow / job, I don't see a way

from lightning.

midigofrank avatar midigofrank commented on June 17, 2024

@christad92 I haven't been able to format the error messages as in the description. What I have been able to do is group the error messages based on the workflow/job/trigger/edge name. For example:
Previous

{
  "errors": {
    "workflows": [
      {
        "jobs": [
          {
            "body": ["Code editor cannot be empty."]
          }
        ]
      }
    ]
  }
}

NOW:

{
  "errors": {
    "workflows": {
      "workflow-one": {
        "jobs": {
          "first-job": {
            "body": ["Code editor cannot be empty."]
          }
        }
      }
    }
  }
}

Can this suffice?

from lightning.

midigofrank avatar midigofrank commented on June 17, 2024

As for edges, the key will be source_job->target_job as it is in the yaml file

from lightning.

josephjclark avatar josephjclark commented on June 17, 2024

@midigofrank I think this will be fine. I'll try and test against this against your branch and comment in the PR

from lightning.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.