Skip to content

feat: add option to use local sdr-docker image - #39

Merged
hunterhubble merged 1 commit into
HubbleNetwork:mainfrom
hunterhubble:ci-HUB-5440
Jun 26, 2026
Merged

feat: add option to use local sdr-docker image#39
hunterhubble merged 1 commit into
HubbleNetwork:mainfrom
hunterhubble:ci-HUB-5440

Conversation

@hunterhubble

Copy link
Copy Markdown
Contributor
  • Set the SDR_DOCKER_IMAGE to the name of the container on the local machine and pyhubblenetwork sat scan will use that instead of latest.
  • Helpful for development and CI with changes to sdr-docker. Now we can do CI runs on PRs from sdr-docker before they become a part of the latest image

@hunterhubble

Copy link
Copy Markdown
Contributor Author

Coincides with PRs to sdr-docker and hubble-satnet-decoder:
HubbleNetwork/hubble-satnet-decoder#8
HubbleNetwork/sdr-docker#23

@hunterhubble

Copy link
Copy Markdown
Contributor Author

@HongNguyen635 HongNguyen635 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Minor comment but imo, since this is a public repo, we shouldn't mentioned Jira / Confluence content here. A commit message should be enough to self-justify the change.

Comment thread src/hubblenetwork/sat.py Outdated
Skips the pull if the image exists only locally (e.g. a locally-built tag
with no remote registry counterpart).
"""
if _image_exists_locally(image):

@HongNguyen635 HongNguyen635 Jun 25, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I feel like there's a bit of circular in here. So scan call pull_image, which then call _image_exists_locally, which then call _get_client(). But the later part of this pull_image also calls get client.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I see the redundancy here, will fix

Comment thread src/hubblenetwork/sat.py
logger = logging.getLogger(__name__)

DOCKER_IMAGE = "ghcr.io/hubblenetwork/sdr-docker:latest"
DOCKER_IMAGE = os.environ.get("SDR_DOCKER_IMAGE", "ghcr.io/hubblenetwork/sdr-docker:latest")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

should we update the doc / user guide? Is this env set by the program or by user?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's a fair point. I didn't have the end-user in mind when making this, I was only thinking about how to integrate this into CI with new versions of sdr-docker before it gets updated into latest. I personally don't think we should advise the user to change our sdr-docker and use pyhubblenetwork with it, ideally they should only be using latest because that is what's validated.

@HongNguyen635 HongNguyen635 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Minor comment, otherwise LGTM

Comment thread src/hubblenetwork/sat.py
Comment on lines +116 to +120
"""Pull *image*, ensuring the latest version is fetched.

Skips the pull if the image exists only locally (e.g. a locally-built tag
with no remote registry counterpart).
"""

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

since there is no change to pull_image, we should keep the doc comment the same right?

- Set the SDR_DOCKER_IMAGE to the name of the container on the local machine
and pyhubblenetwork sat scan will use that instead of latest.
- Helpful for development and CI with changes to sdr-docker. Now we can do
CI runs on PRs from sdr-docker before they become a part of the latest image

Signed-off-by: Hunter Patchett <hunter@hubble.com>
@hunterhubble
hunterhubble merged commit 47c0286 into HubbleNetwork:main Jun 26, 2026
2 checks passed
@hunterhubble
hunterhubble deleted the ci-HUB-5440 branch June 26, 2026 21:01
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