Skip to content

snapshot: Include hostname in commit message - #63

Open
drothlis wants to merge 1 commit into
mainfrom
snapshot-hostname
Open

snapshot: Include hostname in commit message#63
drothlis wants to merge 1 commit into
mainfrom
snapshot-hostname

Conversation

@drothlis

@drothlis drothlis commented Mar 7, 2024

Copy link
Copy Markdown
Contributor

So that the Portal can show a description such as "@user's uncommitted changes on {hostname}".

@drothlis
drothlis force-pushed the snapshot-hostname branch 2 times, most recently from dd1298c to c45d343 Compare March 7, 2024 12:24
@drothlis
drothlis requested a review from wmanley March 7, 2024 12:28
@drothlis

drothlis commented Mar 7, 2024

Copy link
Copy Markdown
Contributor Author

@wmanley do you think socket.gethostname() is safe to use anywhere?

@wmanley wmanley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agree in principle.

It would also be good to include the path to the worktree on that machine.

@wmanley do you think socket.gethostname() is safe to use anywhere?

I'd have thought so.

Comment thread stbt_rig.py Outdated
Comment on lines +1699 to +1700
if "CI" in os.environ:
return "CI"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What's the thinking here?

If we're reporting hostname we should just report hostname. We could separately report whether "CI" is in os.environ as necessary.

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 just for the stbt-rig unit tests to pass. But now I realise CI is probably going to be set in many real-world uses of stbt_rig.py.

@wmanley

wmanley commented Mar 7, 2024

Copy link
Copy Markdown
Contributor

Longer term I'd like to take this in another direction - snapshot being a long running process including watching the filesystem - and the snapshot on the portal only existing while that process is running. This would enable responding to changes like switching branch or saving pngs. We could also enable two way communication with the portal - pulling when we make edits on the portal.

But I've got no current plans to work on this.

So that the Portal can show a description such as "@user's uncommitted
changes on {hostname}".

Note: Hostname of GitHub Actions runners are like "fv-az1500-136"
(ubuntu) or "Mac-1709811484995.local" (macos).
@drothlis
drothlis force-pushed the snapshot-hostname branch from c45d343 to ccbff9c Compare March 8, 2024 10:11
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.

2 participants