Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snapshot: Include hostname in commit message #63

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

drothlis
Copy link
Contributor

@drothlis drothlis commented Mar 7, 2024

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
Copy link
Contributor Author

drothlis commented Mar 7, 2024

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

Copy link
Contributor

@wmanley wmanley left a comment

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.

stbt_rig.py Outdated
Comment on lines 1699 to 1700
if "CI" in os.environ:
return "CI"
Copy link
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
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
Copy link
Contributor

wmanley commented Mar 7, 2024

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).
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