Skip to content

Add utility functions#1146

Merged
kwk merged 4 commits intogh/kwk/2/basefrom
gh/kwk/2/head
Mar 11, 2025
Merged

Add utility functions#1146
kwk merged 4 commits intogh/kwk/2/basefrom
gh/kwk/2/head

Conversation

@kwk
Copy link
Copy Markdown
Collaborator

@kwk kwk commented Mar 6, 2025

Stack from ghstack (oldest at bottom):


Add utility functions

  • serialize_config_map_to_github_matrix
  • augment_config_map_with_chroots
  • augment_config_with_chroots
  • sanitize_chroots
  • filter_chroots

These function will be used in a later commit and serve the purpose of
having a single point of truth in python to drive github workflows.

[ghstack-poisoned]
kwk added 2 commits March 6, 2025 16:08
[ghstack-poisoned]
[ghstack-poisoned]
Copy link
Copy Markdown
Collaborator

@tuliom tuliom left a comment

Choose a reason for hiding this comment

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

The code itself LGTM, but as with the previous PR, I think it's important to mention in the commit message this code is not being used right now, but is laying the ground for a future transition.

[ghstack-poisoned]
@kwk kwk merged commit 91ac617 into gh/kwk/2/base Mar 11, 2025
7 checks passed
kwk added a commit that referenced this pull request Mar 11, 2025
* `serialize_config_map_to_github_matrix`
* `augment_config_map_with_chroots`
* `augment_config_with_chroots`
* `sanitize_chroots`
* `filter_chroots`

These function will be used in a later commit and serve the purpose of
having a single point of truth in python to drive github workflows.

ghstack-source-id: 63a23d1
Pull Request resolved: #1146
kwk added a commit that referenced this pull request Mar 11, 2025
In a previous commit we ensured that a `config.Config` object not only
knows about the `chroot_pattern` but also can carry the resolved
`chroots` (#1145) that match this pattern. The methods to filter and
sanitize chroots was added in (#1146).

In this change we make use of the `config.Config.chroots` and remove the
need to fetch and filter.

ghstack-source-id: 9e103ac
Pull Request resolved: #1148
kwk added a commit that referenced this pull request Mar 11, 2025
In preparation to get rid of the `scripts/functions.sh` (#1151) these are the
newly added commands to the `main` program:

* `get-chroots`
* `delete-project` (see also #1147)
* `github-matrix` (see also `serialize_config_map_to_github_matrix` from #1146)
* `has_all_good_builds` (see also #1147)

These new commands implement functionality that was previously only
available in bash in `scripts/functions.sh`.

ghstack-source-id: 9fef394
Pull Request resolved: #1149
@kwk kwk deleted the gh/kwk/2/head branch March 11, 2025 23:54
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