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

Hackathon subscription activation and registry service account implementation #26

Closed
wants to merge 15 commits into from

Conversation

dgolovin
Copy link
Collaborator

No description provided.

@dgolovin dgolovin requested a review from a team as a code owner January 18, 2024 10:21
@dgolovin dgolovin requested a review from benoitf January 18, 2024 10:21
Copy link
Collaborator

@benoitf benoitf left a comment

Choose a reason for hiding this comment

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

I have a question around all generated classes

if they're automatically generated, should we avoid to store them into the git registry and generate them as part of a npm task ?

@dgolovin
Copy link
Collaborator Author

@benoitf we can definitely do that, but they not going to change much and also would be good to have generated sources tagged as everything else.

Another option is to have npm package per API so other projects, like OpenShift Toolkit, can use it too.

@dgolovin dgolovin changed the title Hackathon subscription and registry mplementation Hackathon subscription activation and registry service account mplementation Jan 23, 2024
@dgolovin dgolovin force-pushed the hackathon-subscription branch from b99c640 to 5c8916a Compare January 23, 2024 04:42
@benoitf
Copy link
Collaborator

benoitf commented Jan 23, 2024

I think that your suggestion with another repository with only the generated classes would be the best option.

  • it avoids to include generated stuff in this extension (as users/developers might be tempted to tweak some classes for their needs)
  • it allows to reuse the model in different locations and lifecycle here is specific to the model change
  • we never commit generated objects in the repository (in this 3rd party repository), only the model, tooling/scripts to generate it so again there is no risk to have manual edits

@vrothberg
Copy link
Collaborator

vrothberg commented Jan 24, 2024

@benoitf @dgolovin can you give some pointers on how I can test this code? I am blank on the toolchain.

@benoitf
Copy link
Collaborator

benoitf commented Jan 24, 2024

@vrothberg I would say that there are like 2 ways

  1. Development mode:

assuming you're able to build podman desktop locally
https://github.com/containers/podman-desktop/blob/main/CONTRIBUTING.md#prerequisites-prepare-your-environment

you clone https://github.com/containers/podman-desktop/ and https://github.com/redhat-developer/podman-desktop-redhat-account-ext

then run yarn inside podman-desktop folder and in podman-desktop-redhat-account-ext

then from podman-desktop-folder you do

yarn watch --extension-folder ../podman-desktop-redhat-account-ext

  1. build mode

you fetch a binary of podman desktop

you clone this pull request and build the image and publish it somewhere
(can use instructions from CI https://github.com/redhat-developer/podman-desktop-redhat-account-ext/blob/main/.github/workflows/ci.yaml#L52-L60
)

then in Settings/extensions you put the path to the OCI image (need to be a remote one) and then it'll install the extension

(this repository has no CI where it's publishing automatically PRs to some OCI registries)

@vrothberg
Copy link
Collaborator

Thanks a lot, @benoitf ! The instruction were very helpful.

@vrothberg
Copy link
Collaborator

Nothing to worry about right now but something to improve later on: the service-account user names can be very long as seen on the screenshot below. Maybe we can truncate them?

image

@benoitf
Copy link
Collaborator

benoitf commented Jan 24, 2024

@vrothberg
Copy link
Collaborator

vrothberg commented Jan 24, 2024

Thanks! Opened podman-desktop/podman-desktop#5670

@vrothberg
Copy link
Collaborator

One more thing I noticed while playing:

The Authentication page displayed "LOGGED OUT" after restarting Podman Desktop. However, we're still logged into the registry and subscription-manager is still working inside the VM (even after reboots). So we need to flesh out what "logged in" and what "logged out" means.

Screenshot 2024-01-24 at 14 40 33

@dgolovin dgolovin force-pushed the hackathon-subscription branch from 5503b38 to b32e61d Compare January 25, 2024 07:37
@vrothberg
Copy link
Collaborator

Is this ready to merge? Then we can cut an alpha release and incrementally improve.

@dgolovin dgolovin force-pushed the hackathon-subscription branch from 56a4fd2 to f3346df Compare February 9, 2024 05:54
Signed-off-by: Denis Golovin <[email protected]>
Copy link
Collaborator

@benoitf benoitf left a comment

Choose a reason for hiding this comment

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

I think all github workflows, dependency updates, tsconfig changes could be separated small PR as they're not related to the changes

Dockerfile Show resolved Hide resolved
package.json Show resolved Hide resolved
src/extension.ts Show resolved Hide resolved
src/podman-cli.ts Show resolved Hide resolved
@dgolovin dgolovin changed the title Hackathon subscription activation and registry service account mplementation Hackathon subscription activation and registry service account implementation Feb 9, 2024
@dgolovin
Copy link
Collaborator Author

Closed in favor of 0.0.2-alpah.x branch PR #34

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