Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deadline: Version GlobalJobPreLoad #40

Merged
merged 2 commits into from
Feb 13, 2024

Conversation

iLLiCiTiT
Copy link
Member

Changelog Description

Add version that is printed in GlobalJobPreLoad plugin.

Additional info

Sometimes it is hard to debug issues with the plugin, with version printed in the log it should be a little bit easier.

Testing notes:

  1. Copy new plugin to deadline repository
  2. Version should be printed in the job logs

@ynbot ynbot added type: enhancement Improvement of existing functionality or minor addition size/XS labels Feb 12, 2024
Copy link
Collaborator

@BigRoy BigRoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please!

@iLLiCiTiT
Copy link
Member Author

@MustafaJafar 's idea #33 (comment)

@BigRoy
Copy link
Collaborator

BigRoy commented Feb 12, 2024

@MustafaJafar 's idea #33 (comment)

It's not a new idea - it has been proposed before.

Anyway, happy to see it implemented!

Note that there I also recommended doing the same with the Ayon deadline plug-in so that also reports its version in the Ayon publisher logs, etc.

@iLLiCiTiT
Copy link
Member Author

Note that there I also recommended doing the same with the Ayon deadline plug-in so that also reports its version in the Ayon publisher logs, etc.

Good point, do you know how it can be printed in the plugin?

Something like this?

def InitializeProcess(self):
    self.LogInfo("Initializing process with AYON plugin {}".format(__version__))

@BigRoy
Copy link
Collaborator

BigRoy commented Feb 13, 2024

Note that there I also recommended doing the same with the Ayon deadline plug-in so that also reports its version in the Ayon publisher logs, etc.

Good point, do you know how it can be printed in the plugin?

Something like this?

def InitializeProcess(self):
    self.LogInfo("Initializing process with AYON plugin {}".format(__version__))

I believe that should work, yes.

They seem to be doing that in some of their plug-ins as well, e.g.

3dsCmd

    def InitializeProcess( self ):
        # type: () -> None
        """
        Called by Deadline to initialize the process.
        Sets the plugin specific settings.
        """
        self.LogInfo( "3dsCmd Plugin Initializing..." )

They never log anything in __init__ or alike, so I feel InitializeProcess is the best place, yes.
In the Maya Plug-in they do this in StartJob method:

        self.LogInfo( "Rendering with Maya Version " + str(self.Version) )

Nonetheless - I still think InitializeProcess might be the better candidate here.

Copy link
Member

@kalisp kalisp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works
image

@BigRoy
Copy link
Collaborator

BigRoy commented Feb 13, 2024

Works image

@kalisp Can you also confirm the AYON plug-in getting reported?

@kalisp kalisp assigned iLLiCiTiT and unassigned kalisp Feb 13, 2024
@iLLiCiTiT iLLiCiTiT merged commit c24acc4 into develop Feb 13, 2024
5 checks passed
@iLLiCiTiT iLLiCiTiT deleted the enhancement/add-version-to-deadline-plugin branch February 13, 2024 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: Deadline size/XS type: enhancement Improvement of existing functionality or minor addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants