Skip to content

Less GitHub dependence - #108

Merged
Hoverbear merged 3 commits into
mainfrom
less-github-dependence
Feb 15, 2024
Merged

Hoverbear merged 3 commits into
mainfrom
less-github-dependence

Conversation

@Hoverbear

@Hoverbear Hoverbear commented Feb 15, 2024 •

Copy link
Copy Markdown
Contributor

Furthers the cause of #107 and extracts out all the github-fetched data into src/cli/mod.rs for now, such that push_new_release and ReleaseMetadata::build are no longer dependent on the github related structs. This should make opening up other code forges easier.

There should be no material code changes here, only refactoring.

@Hoverbear Hoverbear self-assigned this Feb 15, 2024
@Hoverbear
Hoverbear marked this pull request as ready for review February 15, 2024 18:43
Comment thread src/release_metadata.rs
Comment on lines +109 to +110
project_id: i64,
owner_id: i64,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what do we even do with these? Presumably we only trust the JWT derived ids on the server?

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 correct, I don't even see us deserializing these fields on the server, but I'm trying to keep this simple mechanical moves. Next PR is contentful. :)

Comment thread src/cli/mod.rs
Comment on lines +463 to +467
tracing::debug!(
"Getting revision count locally failed, using data from github instead"
);
github_graphql_data_result.rev_count
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

hmmm. not a blocker but can we just get rid of it completely? what scenarios does from_git_root fail, and does the rest of the push process still work even in that case?

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.

Generally github action clones are shallow if I recall? I'm not sure I remember. I'm hoping to get rid of querying this data entirely.

@colemickens colemickens left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, don't want to get too carried away with ideas since I know there's more coming.

@Hoverbear
Hoverbear merged commit 508b6de into main Feb 15, 2024
@Hoverbear
Hoverbear deleted the less-github-dependence branch February 15, 2024 21:16
@cole-h

cole-h commented Feb 15, 2024

Copy link
Copy Markdown
Member

FYI: this was reverted in #110 because it caused rolling version numbers to be calculated incorrectly.

detsys-pr-bot pushed a commit to detsys-pr-bot/flakehub-push that referenced this pull request Sep 3, 2025
…e nix store version (DeterminateSystems#108)` (`c7303495f43d348cac78091ef434443b1ef22485`)
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