omero-py icon indicating copy to clipboard operation
omero-py copied to clipboard

CLI should support proxy settings

Open dominikl opened this issue 4 years ago • 6 comments

See Omero-py and proxy settings. The CLI would just have to pass ICE variables through to the Blitzgateway. Something similar was done for Insight: https://github.com/ome/omero-insight/pull/197 .

dominikl avatar Jul 21 '21 09:07 dominikl

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/omero-py-and-proxy-settings/55456/2

imagesc-bot avatar Jul 21 '21 09:07 imagesc-bot

I assumed that omero/client.java would make use of system properties that were set with JAVA_OPTS=-DIce... but that looks to be server-side only. I imagine that would be a fairly easy workaround.

joshmoore avatar Aug 03 '21 05:08 joshmoore

Does that mean, something like this (setting a wrong proxy) shouldn't work:

> export JAVA_OPTS=-DIce.HTTPProxyHost=1.2.3.4
> omero login

It does work, so the proxy setting is not taken into account, right?

dominikl avatar Aug 05 '21 09:08 dominikl

Right. https://github.com/ome/omero-blitz/blob/master/src/main/java/omero/client.java#L361 or so would need to be updated to either place all the System properties inside the Ice properties or perhaps rather just the ones matching Ice.* and omero.*.

joshmoore avatar Aug 05 '21 09:08 joshmoore

Is it somehow possible to build omero-py with a custom omero-blitz, in order to test changes in omero-blitz? The setup.py seems to download omero-blitz from artifacts.openmicroscopy.org.

dominikl avatar Aug 20 '21 14:08 dominikl

Definitely. That's what merge-ci does:

def get_blitz_location():

    config_blitz_version = "5.5.5"

    # simplified strings
    defaultsect = configparser.DEFAULTSECT
    version_key = "versions.omero-blitz"
    url_key = "versions.omero-blitz-url"

    # detect if in Jenkins or not
    if "JENKINS_URL" in os.environ:
        config_blitz_url = os.environ.get("JENKINS_URL")
        config_blitz_url += "job/OMERO-build-build/lastSuccessfulBuild/"
        config_blitz_url += "artifact/omero-blitz/build/distributions/"
        config_blitz_url += "omero-blitz-VERSION-python.zip"
    else:
        config_blitz_url = (
            "https://artifacts.openmicroscopy.org/artifactory/ome.releases/"
            "org/openmicroscopy/omero-blitz/VERSION/"
            "omero-blitz-VERSION-python.zip")

joshmoore avatar Aug 20 '21 14:08 joshmoore