Skip to content

Conversation

Sharpz7
Copy link

@Sharpz7 Sharpz7 commented Aug 20, 2025

No description provided.

@Sharpz7
Copy link
Author

Sharpz7 commented Aug 24, 2025

Tested with 2 networks

[
    {
        "Id": "3a7e8780a878289ad5b5987135392d74f91ec0878cbeaba412de7ed2f2074836",
        "Created": "2025-08-24T02:38:19.15397097Z",
        "Path": "/usr/local/bin/python",
        "Args": [
            "/usr/local/bin/retuve_chris_plugin",
            "--saveinputmeta",
            "--saveoutputmeta",
            "/share/incoming",
            "/share/outgoing"
        ],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 285356,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2025-08-24T02:38:19.197930301Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
        "Config": {
            "Hostname": "3a7e8780a878",
            "Domainname": "",
            "User": "1001",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "CHRIS_JID=chris-jid-9",
                "CHRIS_PLG_INST_ID=9",
                "CHRIS_USER_USERNAME=chris",
                "CHRIS_USER_EMAIL=dev@babymri.org",
                "CHRIS_PREV_PLG_INST_ID=5",
                "CHRIS_PREV_JID=chris-jid-5",
                "HOME=/tmp",
                "PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "LANG=C.UTF-8",
                "GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D",
                "PYTHON_VERSION=3.10.18",
                "PYTHON_SHA256=ae665bc678abd9ab6a6e1573d2481625a53719bc517e9a634ed2b9fefae3817f"
            ],
            "Cmd": [
                "/usr/local/bin/python",
                "/usr/local/bin/retuve_chris_plugin",
                "--saveinputmeta",
                "--saveoutputmeta",
                "/share/incoming",
                "/share/outgoing"
            ],
            "Image": "docker.io/sharp6292/retuve_chris_plugin:1.0.0",
            "Volumes": {
                "/share/incoming": {},
                "/share/outgoing": {}
            },
            "WorkingDir": "/usr/local/src",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {
                "org.chrisproject.miniChRIS": "plugininstance"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "ebf93481003c30184b07c3ffdada343ef0c5cb2c0e818ce7b5b60d9d6f7aba8f",
            "SandboxKey": "/var/run/docker/netns/ebf93481003c",
            "Ports": {},
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "minichris-local": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "MacAddress": "b6:0e:b3:93:9b:42",
                    "DriverOpts": null,
                    "GwPriority": 0,
                    "NetworkID": "d2a35845b484316a93251af56192ac5df34cda929f18626d781b7fe6552c9c24",
                    "EndpointID": "785c7229425324ee741b2e93861548cc3f6f5c966c36d0f3a903ea8c34dc50cb",
                    "Gateway": "172.25.0.1",
                    "IPAddress": "172.25.0.19",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "DNSNames": [
                        "chris-jid-9",
                        "3a7e8780a878"
                    ]
                },
                "nidus-infra_default": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "MacAddress": "ae:ff:7c:33:1c:09",
                    "DriverOpts": null,
                    "GwPriority": 0,
                    "NetworkID": "a2767aa328df5b82d29dc72d970b57e7d12ba0a4843b9c9a17f0d16c86620610",
                    "EndpointID": "02a64265987faf781c73755ae9754a895054046ead61e68343600e3f382cd674",
                    "Gateway": "172.19.0.1",
                    "IPAddress": "172.19.0.6",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "DNSNames": [
                        "chris-jid-9",
                        "3a7e8780a878"
                    ]
                }
            }
        }
    }
]

@Sharpz7
Copy link
Author

Sharpz7 commented Aug 24, 2025

I haven't ran the tests locally - I imagine they will need some fixes.

@Sharpz7 Sharpz7 requested a review from jennydaman August 24, 2025 04:33
Copy link
Collaborator

@jennydaman jennydaman left a comment

Choose a reason for hiding this comment

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

Typically I would say it is courtesy to run the tests before opening a PR, but in this case I can sympathize with how pman's codebase is somewhat finicky and doing so might be inconvenient.

  • It seems like supporting multiple Docker networks will be a non-trivial change to the code. Maybe we should support only a single Docker network instead. At startup, if len(DOCKER_NETWORKS) > 1, raise a configuration error.
  • Assuming you accept my proposal to limit our scope to supporting only 0–1 Docker networks, I would say just delete the whole test_dockermgr.py file.

@Sharpz7
Copy link
Author

Sharpz7 commented Aug 25, 2025

Appreciate the suggestions @jennydaman

I hope you can appreciate that without a CONTRIBUTORS.md file, or some other means of telling me what the code-style requirements are for your repo, it is very difficult for me to know what you want in advance. I am happy to follow what is expected of me if I am told. I don't think OSS is standardized enough to say that all codebases follow the same pattern, or that there is any kind of default "standard" - at least not that I know of. For example, I don't think its unreasonable in main other repos to do a first test run in CI and then make changes locally, especially in cases with a finicky test setup (In openstack-ironic for example I think that is a fair comment). If you want to take more external contributions in the future and avoid this, I suggest a CONTRIBUTORS.md that you can point to.

I will work on your suggestions in time. Happy to go with the single network route for now and remove tests altogether.

@jennydaman
Copy link
Collaborator

@Sharpz7 100% agree. (If i had the authority to enforce standards and CONTRIBUTORS.md file, I would.)

@Sharpz7
Copy link
Author

Sharpz7 commented Sep 12, 2025

I apologize for my editor automatically applying formatting to the file - let me know if you would like that undone.

@Sharpz7 Sharpz7 requested a review from jennydaman September 12, 2025 01:20
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