Coder Social home page Coder Social logo

Comments (8)

jgbarah avatar jgbarah commented on July 30, 2024 1

Of course! If you want, have a look at how projects.json is loaded by Mordred. Let me know if you want more specific directions.

from grimoirelab-sirmordred.

filmaj avatar filmaj commented on July 30, 2024 1

I am able to get perceval to talk to my corporate JIRA instance and get past basic auth, etc. I promise to look into this issue soon 😄

from grimoirelab-sirmordred.

filmaj avatar filmaj commented on July 30, 2024

Ooo perhaps this could be one that, with a little bit of help and pointing me in the right direction, I could try taking a stab at preparing a PR for?

from grimoirelab-sirmordred.

filmaj avatar filmaj commented on July 30, 2024

I've filed #125 first so I can figure out how to run the tests first before I attempt to change anything :)

from grimoirelab-sirmordred.

filmaj avatar filmaj commented on July 30, 2024

I think I will take a closer look at this issue. I would also require that we expose some manner of authentication, e.g. Basic Auth, for JIRA (our corporate JIRA instance requires either OAuth or Basic Auth).

from grimoirelab-sirmordred.

filmaj avatar filmaj commented on July 30, 2024

Question: would configuring the JIRA backend via the mordred config to a specific JIRA project somehow result in the issues pulled in from that JIRA project be associated with the correct (git/github-backed) project defined in projects.json? Or would that functionality be part of the changes we want to implement in this issue?

For example, we have an internal project called RSP. I could set the mordred config file as follows:

[jira]
raw_index = jira_test-raw
enriched_index = jira_test
project = RSP
user = me
password = mypassword

Then my projects.json looks something like this:

    "RSP": {
        "github": [
            "https://git.corp.adobe.com/React/RSP"
        ],
        "git": [
            "[email protected]:React/RSP.git"
        ],
        "jira": [
            "https://jira.corp.adobe.com"
        ]
    }

Would this setup be sufficient for the JIRA issues under the RSP JIRA project to be associated with the RSP project as defined in projects.json? If so, great, that unblocks my immediate work. If not, then would that feature be part of the solution for this issue?

from grimoirelab-sirmordred.

filmaj avatar filmaj commented on July 30, 2024

It looks to me like some tests in sirmordred pass command line flags/parameters via the main (URL?) string inside projects.json: https://github.com/chaoss/grimoirelab-sirmordred/blob/master/tests/test-projects.json#L28

However, when I try this w/ JIRA (as in your original example above @jgbarah), I get errors as it seems the perceval JIRA backend assumes everything in the string to be a URL.

I dug through the code a bit, and I'm not sure whether this would necessitate a change in either perceval or mordred, but perhaps grimoire_elk? Here's my reasoning:

  1. The mechanism within mordred that kicks off data collection from various backends seems to be controlled via the Collection task.
  2. "URLs" for backends are then filtered through a couple of Task parent class methods called compose_p2o_params and compose_perceval_parameters_from_url.
  3. These methods themselves rely on method that exist on the backend "ocean" classes - which are part of grimoirelab-elk.
  4. Over in grimoirelab-elk, the JiraOcean class inherits from the ElasticOcean class - which has a very simple implementation for get_perceval_params_from_url, essentially utilizing the entire string as a URL.

So my thinking is: why not implement the get_p2o_params_from_url and get_perceval_params_from_url methods for the JiraOcean class? And make it create proper objects that provide support for the full suite of parameters that perceval's JIRA backend class accepts, like project, user, password, etc.?

Let me know if that makes sense and I can open a new issue in elk and attempt to put a PR together.

from grimoirelab-sirmordred.

valeriocos avatar valeriocos commented on July 30, 2024

Sorry for the late reply!

The current implementation should be fine, in a nutshell all data stored in a Jira is reflected to the raw index, while the enrichment phase can be set up to enrich only some projects. To achieve that, you should have a projects.json like the one below (more details about the filter-raw option can be found at: https://github.com/chaoss/grimoirelab-sirmordred#projectsjson).

{
    "acme.A": {
        "jira": [
            "https://acme.jira.com --filter-raw=data.fields.project.key:<project-key-of-your-project>"
        ],
        "meta": {
            "title": "A Documentation"
        }
    },
    "acme.B": {
        "jira": [
            "https://acme.jira.com --filter-raw=data.fields.project.name:<project-name-of-your-project>"
        ],
        "meta": {
            "title": "B Documentation"
        }
    },
    "unknown": {
        "jira": [
            "https://acme.jira.com"
        ]
    }
}

from grimoirelab-sirmordred.

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.