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

Possible to run a task (or command) once per application version? #113

Open
MatthewSteeples opened this issue Sep 16, 2021 · 0 comments
Open
Labels
feature request Feature request question Question

Comments

@MatthewSteeples
Copy link

Feature Request Description

We would like to be able to NGen the assemblies in our deployed application. In order to do this, we want to be able to trigger the NGen task to run when a new version of the application is installed on a node.

Describe Preferred Solution

If there was some form of trigger we could hook in to when a new version of the application is deployed then we could make sure that

Describe Alternatives Considered

We don't deploy applications directly to nodes in a pool, but instead assign the ApplicationPackageReferences on the CloudTask. This is because we deploy multiple times per day, and our scripts update the default version for the Application. When the tasks run, they automatically use the latest available application (which is xcopy'd to the machine). Unfortunately this means that we're unable to make use of a node start task or job start task to perform the NGen operation.

We can't use our deployment script to NGen the images, because that means that if/when our nodes are re-imaged or the pool is resized the changes won't persist.

We use "long running" jobs (multiple months) with thousands of shorter tasks (minutes to hours) so we're unable to make it a start task for the job or run it with every task.

Our application does not run with admin rights so cannot trigger an NGen itself.

Because multiple versions of our application could be running in parallel (due to the long-running / always updating to latest version configuration) it's not practical for us to build a custom OS image and use that for the node.

Eventually we'll be moving to .NET6 (and making use of R2R etc) but that's probably 12 months away for us.

We have considered programmatically adding a "scheduled task" (via a node start task) to the VM that checks the application folder periodically to see if there are new assemblies to NGen (currently our favourite workaround).

@staer staer added feature request Feature request question Question labels Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Feature request question Question
Projects
None yet
Development

No branches or pull requests

2 participants