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

[scag] Add option to switch between Gramine repositories #15

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

Conversation

oshogbo
Copy link
Contributor

@oshogbo oshogbo commented Apr 23, 2024

Description of the changes

Gramine maintains two repositories: stable and unstable. The unstable repository is mostly used for testing release candidates. This commit adds an option to switch between these repositories.

Should fix #14 .

How to test this PR?

While using scag-setup you can add '--gramine_unstable to use an unstable repo.


This change is Reviewable

Copy link

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

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

Reviewed 6 of 6 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion, not enough approvals from maintainers (3 more required), not enough approvals from different teams (2 more required, approved so far: ) (waiting on @oshogbo)


Documentation/manpages/scag-setup.rst line 32 at r1 (raw file):

.. option:: --gramine_unstable

   Use an pre-release version of Gramine.

an -> a

Copy link
Contributor Author

@oshogbo oshogbo left a comment

Choose a reason for hiding this comment

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

Reviewable status: 5 of 6 files reviewed, 1 unresolved discussion, not enough approvals from maintainers (3 more required), not enough approvals from different teams (2 more required, approved so far: ) (waiting on @dimakuv)


Documentation/manpages/scag-setup.rst line 32 at r1 (raw file):

Previously, dimakuv (Dmitrii Kuvaiskii) wrote…

an -> a

Done.

Copy link

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, all discussions resolved, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: Intel)

Copy link
Member

@woju woju left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 2 unresolved discussions, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: Intel) (waiting on @oshogbo)


Documentation/manpages/scag-setup.rst line 127 at r2 (raw file):

    [gramine]
    passthrough_env = []
    gramine_unstable = false

Setup/config is a wrong level for this feature. Say I'm Very Important Customer and I have Very Important Workload, I'd want to test for new release, so I probably won't re-setup it.

Also I still think if we could make it automatic, without having to set a switch/flag. Can we detect it at the scag-build` time somehow? Like to check if the installed Gramine version is stable vs unstable?


graminescaffolding/templates/sources.list line 8 at r2 (raw file):

{% else %}
deb https://packages.gramineproject.io/ bookworm main
{% endif %}

Suggestion:

deb https://packages.gramineproject.io/ {% if gramine_unstable %}unstable-{% endif %}bookworm main

Gramine maintains two repositories: stable and unstable.
The unstable repository is mostly used for testing release candidates.
This commit adds an option to switch between these repositories.

Signed-off-by: Mariusz Zaborski <[email protected]>
Copy link
Contributor Author

@oshogbo oshogbo left a comment

Choose a reason for hiding this comment

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

Reviewable status: 5 of 6 files reviewed, 2 unresolved discussions, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: Intel) (waiting on @dimakuv and @woju)


Documentation/manpages/scag-setup.rst line 127 at r2 (raw file):

Previously, woju (Wojtek Porczyk) wrote…

Setup/config is a wrong level for this feature. Say I'm Very Important Customer and I have Very Important Workload, I'd want to test for new release, so I probably won't re-setup it.

Also I still think if we could make it automatic, without having to set a switch/flag. Can we detect it at the scag-build` time somehow? Like to check if the installed Gramine version is stable vs unstable?

Hym. I think that this actually a good level. You can have multiple configuration files depending on the releases or whatever you want to build. Then you can simply use scag-build -f to switch between different configurations.

This defines how scag behaves. And I think that the config options like codenmae, stable/unstable etc should be defined on the config level.

I do not understand why he won't re-setup it? The re-setup phase isn't complicated.
Either he rests up it and sets use a proper flag or copies the existing configuration and he changes the version.

I thought about "automatic detection" but this can be error-prone, also you might have oos builds installed locally (compatible with the version inside the gramine).

I don't see a benefit of having it as a build flag as this will somehow be lost after the build. Otherwise, you can say which config file you used to build a project as a whole without defining the additional build flag that was used.


graminescaffolding/templates/sources.list line 8 at r2 (raw file):

{% else %}
deb https://packages.gramineproject.io/ bookworm main
{% endif %}

Done.

Copy link
Member

@woju woju left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r3.
Reviewable status: all files reviewed, 1 unresolved discussion, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: Intel) (waiting on @oshogbo)


Documentation/manpages/scag-setup.rst line 127 at r2 (raw file):

Previously, oshogbo (Mariusz Zaborski) wrote…

Hym. I think that this actually a good level. You can have multiple configuration files depending on the releases or whatever you want to build. Then you can simply use scag-build -f to switch between different configurations.

This defines how scag behaves. And I think that the config options like codenmae, stable/unstable etc should be defined on the config level.

I do not understand why he won't re-setup it? The re-setup phase isn't complicated.
Either he rests up it and sets use a proper flag or copies the existing configuration and he changes the version.

I thought about "automatic detection" but this can be error-prone, also you might have oos builds installed locally (compatible with the version inside the gramine).

I don't see a benefit of having it as a build flag as this will somehow be lost after the build. Otherwise, you can say which config file you used to build a project as a whole without defining the additional build flag that was used.

The problem is, this needs to be 1:1 correlated with the gramine package version that is installed on the system. You can't just switch this with -f without reinstalling Gramine, and vice versa, if you reinstall gramine, but don't change this config option (or resetup), you'll get an error. So ideally I would like this thing automatic, without switches or configs at all.


graminescaffolding/templates/sources.list line 8 at r2 (raw file):

Previously, oshogbo (Mariusz Zaborski) wrote…

Done.

Thanks!

Copy link

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion, not enough approvals from maintainers (1 more required), not enough approvals from different teams (1 more required, approved so far: Intel) (waiting on @oshogbo)

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.

Missing unstable repo in sources.list
3 participants