Code Monkey home page Code Monkey logo

Comments (8)

butchyyyy avatar butchyyyy commented on July 1, 2024 1

Thanks for reporting @epaul13

Am I correct to assume this is regression in version 2.0.0? If yes I think I know which change probably caused this. Either way it would be great to get some screen shots of the configuration and the messages you are getting in Zulip so that I can reproduce on my instance.

from zulip-plugin.

butchyyyy avatar butchyyyy commented on July 1, 2024 1

Ok, so I have set up Matrix project called "multi" with agent X axis:

image

I have added the Zulip notifier step with empty topic:

image

I have disabled full job paths in the project configuration:

image

When I run the build, the notifications are posted into built-in and my-agent topics

image

There are no smarts around multi project configuration in the plugin, the default topic logic is to get the build's direct parent display name (unless you have the use full job path options on in which case it iterates / uses the whole parent chain).
What would you imagine to be the correct topic name in such configured project?

Note for variables like $JOB_NAME: The plugin only expands variables in strings with values provided by Jenkins, it has no control over variable content.

from zulip-plugin.

butchyyyy avatar butchyyyy commented on July 1, 2024 1

Thanks for providing the details, the logic behind that is:

  • If you are using fixed topic name, the idea is that you can have multiple jobs messaging single topic and that's why the Project: <job_display_name> is included in the message.
  • If the topic is blank, the <job_display_name> is used as a topic name and we no longer include it into the message itself, as it would be a duplicate information.

IUUC the problem in your case is that the <job_display_name> only includes build run direct parent which is the Jenkins agent in this case.

For this use case, the plugin has the Use full job path ... options.

Option with blank topic

If you use following configuration

image


Plugin will post into a multi ยป built-in topic, where multi is the matrix project name and built-in is the agent name

image

Option with fixed topic

If you use following configuration

image


Plugin will post into fixedtopic, but the message will include full project name

image

Does either of these options work for you?

from zulip-plugin.

butchyyyy avatar butchyyyy commented on July 1, 2024 1

By the way, looking at your previous answer, it seems that you don't have the same behavior as me? IIUC, you get the correct info without checking any of the "Use full job path" options, right?

Nope, it behaves same as for you, e.g. with blank topic I get just the agent name and build number and no project info:
image

My point was that without configuring anything, the "parsing" of a "full job name" leads to display the agent name and not the job name in the topic, and I get no info on which project failed.

Fair point, actually your report is the same as #31, just for matrix project instead of multi branch pipeline. Based on this the full job path options were introduced.

I think that the conclusion of this ticket are two action items for me:

  • Document the full job path options in plugin README
  • Enable the full job paths options by default for new installations as they just make sense for stuff like matrix projects or multi branch pipelines while not affecting simple job topic / messaging.

from zulip-plugin.

epaul13 avatar epaul13 commented on July 1, 2024

Hi,

thank you for the fast answer.

Well, I'm perfectly fine with the message you get :)

What I get :
jenkins_zulip

The first one is with $JOB_NAME configured in "topic name", the second with nothing configured for "topic name" in the main Jenkins configuration:

jenkins_zulip_conf

with multi:

jenkins_multi

As you see, I use $JOB_NAME to get my project info in the topic, which is fine. But Then the project in the message body is not good. If I don't use $JOB_NAME, the topic only shows the node and I only have the build in the body, which is not convenient to know which project failed ;)

As I said, I'm fine with what you get on your side :)

Tell me if you need more information.

Eric.

from zulip-plugin.

epaul13 avatar epaul13 commented on July 1, 2024

I get the logic, fine for me.

If I use one of the "Use full job path" options, I get the information, fine too:

image

My point was that without configuring anything, the "parsing" of a "full job name" leads to display the agent name and not the job name in the topic, and I get no info on which project failed. I can get the information either by using the fixed topic "$JOB_NAME" (but then the body of the message display the agent name not the project name) or by configuring one of the "Use full job path" options. That's fine for me, I get my information.

For the record, I'll use:

image

This way I get the info in the topic and I can click the build number to go to the failed build.

Nevertheless, I think this might be considered a "bug" or an inconvenience. That's why I decided to report. :)

By the way, looking at your previous answer, it seems that you don't have the same behavior as me? IIUC, you get the correct info without checking any of the "Use full job path" options, right?

In any case, I get what I need, you have a useful plugin and do a great support, thank you again!

Eric.

from zulip-plugin.

epaul13 avatar epaul13 commented on July 1, 2024

Seems like a good move. It's a pity there's no clear pattern or var to get the job's name. Extracting it depending on project's type through retro-engineering seems overkill ;-)
Thanks again for the support!

from zulip-plugin.

butchyyyy avatar butchyyyy commented on July 1, 2024

Readme adjusted in d4b9acf
Full job paths and smart notify enabled by default for new installations in df49757

from zulip-plugin.

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.