Git Product home page Git Product logo

Comments (14)

NightJar avatar NightJar commented on May 24, 2024 1

I'd like to also point out that while we've achieved resolution in the context of which we are testing, I think this issue spans wider than just CWP (or the recipe of such at least), indicated in the fact that it also affected SSP - and while it works again now, it's because we're testing it in the context of a CWP recipe.

The fix:
https://github.com/silverstripe/cwp/blob/3ad235e1286939a5291a911c602ca42907b1746c/src/Extensions/MaintenanceProxyExtension.php#L29
Resides in cwp/cwp (where this extension also addresses platform specific proxy issues, which is a good thing).

Meaning anyone not using CWP (at least the module, but in the broader sense the platform as a whole) will still be affected by this exception any time they attempt to retrieve the task list (or run the task itself) from a user that does not have these environment variables set.

However if I were betting inclined, I'd wager that this will affect any web server that runs as it's own user - typically a non-login user meaning an absence any profile setup files... and in many a case it's a system user (UID lower than 1000) which can also mean there is no $HOME set either.

Exemplified in the virtual environment I was finally able to recreate this issue; there was nothing special about it's setup that I would consider unusual.

At this point I'd like to suggest moving this composer environment variable check (i.e. not the proxy ones from the same class) to that in which the exception manifests - bringyourownideas/silverstripe-composer-update-checker.

from silverstripe-maintenance.

robbieaverill avatar robbieaverill commented on May 24, 2024 1

Sure, I'll do that

from silverstripe-maintenance.

robbieaverill avatar robbieaverill commented on May 24, 2024 1

Falsy, forgot to deploy the updated 1.9 CWP code 🤦‍♂️

from silverstripe-maintenance.

sminnee avatar sminnee commented on May 24, 2024

Give it a god, but not sure if this will work as this would rely on putenv() to pass the variable to composer, which seems to fail intermittently.

from silverstripe-maintenance.

brynwhyman avatar brynwhyman commented on May 24, 2024

Is this issue relevant to SSP as well?

from silverstripe-maintenance.

robbieaverill avatar robbieaverill commented on May 24, 2024

Yep, just tested

from silverstripe-maintenance.

robbieaverill avatar robbieaverill commented on May 24, 2024

Environment::setEnv/putEnv doesn't carry through, but putenv works

from silverstripe-maintenance.

robbieaverill avatar robbieaverill commented on May 24, 2024

Ok, now hitting a blocker with the CWP proxy (related: silverstripe/silverstripe-cms#2168).

Will need to see if we can inject this config somehow

from silverstripe-maintenance.

NightJar avatar NightJar commented on May 24, 2024

Nice work!

from silverstripe-maintenance.

robbieaverill avatar robbieaverill commented on May 24, 2024

Need to backport change for the CWP 1.9 recipe too

from silverstripe-maintenance.

NightJar avatar NightJar commented on May 24, 2024

Ideal, all done! Thanks @robbieaverill

from silverstripe-maintenance.

robbieaverill avatar robbieaverill commented on May 24, 2024

I've merged all the branches up.

from silverstripe-maintenance.

robbieaverill avatar robbieaverill commented on May 24, 2024

Tested CWP 1.9 and 2.1 on CWP platform, all good!

from silverstripe-maintenance.

robbieaverill avatar robbieaverill commented on May 24, 2024

Whoops, the task doesn't run in 1.9 on CWP

from silverstripe-maintenance.

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.