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

compose: Use GVariantDict, not manual hash table #3760

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

Conversation

cgwalters
Copy link
Member

There's a dedicated type for a mapping from "string to variant" in
GVariantDict. Use it instead of rolling our own with GHashTable.
The advantage here is improved ergonomics from the C side; e.g.
we can directly pass C strings for values and have the variant
allocated internally.

But more importantly, this is prep for oxidizing things here because
we can pass GVariantDict to/from Rust easily, not so with
GHashTable.

@openshift-ci
Copy link

openshift-ci bot commented Jun 10, 2022

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

rpmostree_context_get_rpmmd_repo_commit_metadata (self->corectx));
g_variant_dict_insert_value (
self->metadata, "rpmostree.rpmmd-repos",
rpmostree_context_get_rpmmd_repo_commit_metadata (self->corectx));
Copy link
Member

Choose a reason for hiding this comment

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

Aren't we double referencing here?

There's a dedicated type for a mapping from "string to variant" in
`GVariantDict`.  Use it instead of rolling our own with `GHashTable`.
The advantage here is improved ergonomics from the C side; e.g.
we can directly pass C strings for values and have the variant
allocated internally.

But more importantly, this is prep for oxidizing things here because
we can pass `GVariantDict` to/from Rust easily, not so with
`GHashTable`.
Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

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

LGTM. CI failure might be related, though don't see offhand where the issue is.

@cgwalters
Copy link
Member Author

LGTM. CI failure might be related, though don't see offhand where the issue is.

Yeah, the CI failure is definitely related, but I don't yet understand it either. Not critical, will come back to this some point later.

@openshift-merge-robot
Copy link
Collaborator

@cgwalters: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci
Copy link

openshift-ci bot commented Jun 6, 2023

@cgwalters: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/kola-upgrade f89f5cd link true /test kola-upgrade

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants