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

fix: update installer to locate KeyShot scripts directory in more cases #123

Merged
merged 5 commits into from
Oct 10, 2024

Conversation

crowecawcaw
Copy link
Contributor

@crowecawcaw crowecawcaw commented Oct 9, 2024

What was the problem/requirement? (What/Why)

The KeyShot installer didn't install the submitter script in some circumstances. Specifically, I had a KeyShot install where the KeyShot resources folder pointed to a directory that did not yet exist.

What was the solution? (How)

  • Create the scripts directory if it doesn't exist already
  • Use a fallback value for the scripts directory if one cannot be found from environment variables (e.g. if someone runs the Deadline installer before running the KeyShot installer)

What is the impact of this change?

KeyShot installer works in more cases.

How was this change tested?

I ran the installer with KeyShot was installed and without, and in both cases it installed the plugin correctly.

Was this change documented?

Not needed

Is this a breaking change?

No

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@crowecawcaw crowecawcaw requested a review from a team as a code owner October 9, 2024 20:08
Copy link
Contributor

@lucaseck lucaseck left a comment

Choose a reason for hiding this comment

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

I think we could simplify this for ourselves and keep the current default of using KEYSHOT/KEYSHOT12 to point to the scripts folder, but add a prompt in the installer to confirm the installation directory and let users pick their own if the default isn't correct? Any opinions on that path? It's called out in our docs that the DCCs should be installed before running the submitter installer so I think we can make the assumption that KeyShot should exist already and not have to handle that case further than maybe printing a warning if we can't find the directory set or specified.

@@ -66,28 +66,21 @@
</conditionRuleList>
<actionList>
<!-- KeyShot 2023 env var -->
<setInstallerVariable name="keyshot_resources_directory" value="${env(KEYSHOT12)}"/>
<setInstallerVariable name="keyshot_scripts_directory_default" value="${env(KEYSHOT12)}\Scripts"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be keyshot_scripts_directory instead of keyshot_scripts_directory_default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Eek, yeah. Rebase issue.

Comment on lines 96 to -104
<allowEmptyValue>0</allowEmptyValue>
<default>Will be detected from the KEYSHOT or KEYSHOT12 environment variables during installation. If neither exists and the KeyShot component is enabled, this must be input.</default>
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we removing this? It is used in CLI help text. If we're worried about it no longer matching the existing functionality, can we update to describe that the env var is only used if the directory exists?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The default property is for the default variable value, not really help text though it might have appeared in CLI help in a convenient location. In some cases, this text was being stored as the value for the scripts directory and appeared inside the directory path text box which looked wrong. I'll move the info about the env variables to the CLI help text.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With the latest change, the CLI help text looks like this:
Screenshot 2024-10-10 at 10 36 12 AM

Copy link
Contributor

Choose a reason for hiding this comment

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

While this is technically intended for default values, it's effectively only used for help text based on the installer definition.

I actually think customers will find it easier to understand with the former version. I find this new version to be confusing because it says that "The default value is detected from the KEYSHOT or KEYSHOT12 environment variables if present." but the default property is missing despite the env vars being present on the machine.

At a minimum, I think we need to clarify that the default value is determined during installation and won't be empty. That's something that isn't clear with an empty default value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This default test now appears in the text box when a scripts directory isn't detected, so we can't reuse it in the same way we were before. I'll clarify the help text about the default being determined at runtime.

Copy link

@crowecawcaw crowecawcaw enabled auto-merge (squash) October 10, 2024 21:13
@crowecawcaw crowecawcaw merged commit 70c1d52 into aws-deadline:mainline Oct 10, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants