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

Upgrade JHipster Online Stack #571

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

maximilianoPizarro
Copy link
Contributor

Description of Changes

Added new devfile 2.33.1 with the next updates:

  • Update JHipster Core: jhipster 8.8.0

Added Blueprints:

  • generator-jhipster-micronau 3.6.0
  • generator-jhipster-quarkus 3.4.0
  • generator-jhipster-dotnetcore 4.2.0

Upgrade jhipster udi image.

  • quay.io/devfile/jhipster-online@sha256:1d34f067a20d87d7cfa5e304fef23556f865656dfa1c01cb8501ea078a03157e

Example Try with Quarkus Generator:

Modify cmd key jhipster by jhipster-quarkus from application section:

application:
  tmp-folder: /tmp
  jhipster-cmd:
    #cmd: jhipster
    cmd: jhipster-quarkus

Modify url-pipeline key by url-pipeline quarkus example:

openshift:
  devspace:
    url-devfile: https://raw.githubusercontent.com/redhat-developer-demos/jhipster-online/main/src/main/kubernetes/jhipster-devspaces.yaml
  tekton:
    url-pipeline: https://raw.githubusercontent.com/redhat-developer-demos/jhipster-online/main/src/main/kubernetes/jhipster-pipeline-quarkus.yaml
    url-pipeline-run: https://raw.githubusercontent.com/redhat-developer-demos/jhipster-online/main/src/main/kubernetes/jhipster-pipeline-run.yaml

Example Repo Output with Spring Boot Generator:

Example Repo Output with Quarkus Generator

Example Repo Output with Micronaut Generator

Example Repo Output with Quarkus Generator

I look forward to hearing your comments.
Thanks in advance Team.

Signed-off-by: Maximiliano Pizarro <[email protected]>
Copy link

openshift-ci bot commented Jan 28, 2025

Hi @maximilianoPizarro. Thanks for your PR.

I'm waiting for a devfile member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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-sigs/prow repository.

Signed-off-by: Maximiliano Pizarro <[email protected]>
Copy link
Member

@michael-valdron michael-valdron left a comment

Choose a reason for hiding this comment

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

@maximilianoPizarro Few things to change in your latest changes.

tests/check_odov3.sh Outdated Show resolved Hide resolved
stacks/jhipster-online/2.33.0/devfile.yaml Outdated Show resolved Hide resolved
@michael-valdron
Copy link
Member

/ok-to-test

Copy link
Member

@michael-valdron michael-valdron left a comment

Choose a reason for hiding this comment

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

lgtm

Waiting on @devfile/che-team's review.

@ibuziuk ibuziuk self-requested a review January 29, 2025 12:00
Copy link
Collaborator

@ibuziuk ibuziuk left a comment

Choose a reason for hiding this comment

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

verified on Developer Sandbox 👍
Screenshot 2025-01-29 at 13 11 30

@openshift-ci openshift-ci bot added the lgtm Looks good to me label Jan 29, 2025
Signed-off-by: Maximiliano Pizarro <[email protected]>
@openshift-ci openshift-ci bot removed the lgtm Looks good to me label Jan 29, 2025
Copy link
Contributor

@thepetk thepetk left a comment

Choose a reason for hiding this comment

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

/lgtm after all checks are passing. I feel this should be the case after the latest commit.

FYI I've opened devfile/api#1679 to fix the issue with odo 2 check and the support of latest schemaversion.

@michael-valdron I think you need to approve as you have requested changes in the past.

@openshift-ci openshift-ci bot added lgtm Looks good to me approved labels Jan 29, 2025
Copy link

openshift-ci bot commented Jan 29, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ibuziuk, Jdubrick, maximilianoPizarro, thepetk

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot removed the lgtm Looks good to me label Jan 29, 2025
Copy link
Member

@michael-valdron michael-valdron left a comment

Choose a reason for hiding this comment

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

@maximilianoPizarro I am receiving the following errors when testing with odo v3.16.1:

Error from server (Forbidden): error when retrieving current configuration of:
Resource: "/v1, Resource=secrets", GroupVersionKind: "/v1, Kind=Secret"
Name: "mariadb", Namespace: "jhipster-online"
from server for: "src/main/kubernetes/mysql.yaml": secrets "mariadb" is forbidden: User "system:serviceaccount:jhipster-online:default" cannot get resource "secrets" in API group "" in the namespace "jhipster-online"
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "apps/v1, Resource=deployments", GroupVersionKind: "apps/v1, Kind=Deployment"
Name: "mariadb", Namespace: "jhipster-online"
from server for: "src/main/kubernetes/mysql.yaml": deployments.apps "mariadb" is forbidden: User "system:serviceaccount:jhipster-online:default" cannot get resource "deployments" in API group "apps" in the namespace "jhipster-online"
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "/v1, Resource=services", GroupVersionKind: "/v1, Kind=Service"
Name: "mariadb", Namespace: "jhipster-online"
from server for: "src/main/kubernetes/mysql.yaml": services "mariadb" is forbidden: User "system:serviceaccount:jhipster-online:default" cannot get resource "services" in API group "" in the namespace "jhipster-online"
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "/v1, Resource=persistentvolumeclaims", GroupVersionKind: "/v1, Kind=PersistentVolumeClaim"
Name: "mariadb-data", Namespace: "jhipster-online"
from server for: "src/main/kubernetes/mysql.yaml": persistentvolumeclaims "mariadb-data" is forbidden: User "system:serviceaccount:jhipster-online:default" cannot get resource "persistentvolumeclaims" in API group "" in the namespace "jhipster-online"

For a sanity check, which version OCP version did you test this with?

@maximilianoPizarro
Copy link
Contributor Author

maximilianoPizarro commented Jan 29, 2025

@maximilianoPizarro I am receiving the following errors when testing with odo v3.16.1:

Error from server (Forbidden): error when retrieving current configuration of:
Resource: "/v1, Resource=secrets", GroupVersionKind: "/v1, Kind=Secret"
Name: "mariadb", Namespace: "jhipster-online"
from server for: "src/main/kubernetes/mysql.yaml": secrets "mariadb" is forbidden: User "system:serviceaccount:jhipster-online:default" cannot get resource "secrets" in API group "" in the namespace "jhipster-online"
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "apps/v1, Resource=deployments", GroupVersionKind: "apps/v1, Kind=Deployment"
Name: "mariadb", Namespace: "jhipster-online"
from server for: "src/main/kubernetes/mysql.yaml": deployments.apps "mariadb" is forbidden: User "system:serviceaccount:jhipster-online:default" cannot get resource "deployments" in API group "apps" in the namespace "jhipster-online"
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "/v1, Resource=services", GroupVersionKind: "/v1, Kind=Service"
Name: "mariadb", Namespace: "jhipster-online"
from server for: "src/main/kubernetes/mysql.yaml": services "mariadb" is forbidden: User "system:serviceaccount:jhipster-online:default" cannot get resource "services" in API group "" in the namespace "jhipster-online"
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "/v1, Resource=persistentvolumeclaims", GroupVersionKind: "/v1, Kind=PersistentVolumeClaim"
Name: "mariadb-data", Namespace: "jhipster-online"
from server for: "src/main/kubernetes/mysql.yaml": persistentvolumeclaims "mariadb-data" is forbidden: User "system:serviceaccount:jhipster-online:default" cannot get resource "persistentvolumeclaims" in API group "" in the namespace "jhipster-online"

For a sanity check, which version OCP version did you test this with?

Hi @michael-valdron! I testing with OCP 4.17.5 provided by https://workspaces.openshift.com Red Hat Developer Sandbox.

image

I share the list of resources will generate when run the task OpenShift apply MariaDB Instance.

  • Executing task: devfile: OpenShift apply MariaDB Instance (OpenShift cluster)

secret/mariadb created
deployment.apps/mariadb created
service/mariadb created
persistentvolumeclaim/mariadb-data created

Note that the account system:serviceaccount:jhipster-online:default does not have GET permissions on the cluster due to errors. In the case of Dev Spaces, the environment use to sa for exec kube command.

I'll add something else that I see. In the logs it can be seen that the namespace created by odo has this name oalujdes when applying the manifests it does so on the default namespace, for this reason it does not have permissions to create the object. This scenario is not replicated in OpenShift since when starting the environment it is positioned on the namespace with oc project "namespace".

Would it be possible to add the --namespace oalujdes argument outside of devfile? Or add a service account so that odo can create resources in the default namespace? Since it is an ephemeral test as I understand it.

Signed-off-by: Maximiliano Pizarro <[email protected]>
tests/check_odov3.sh Outdated Show resolved Hide resolved
stacks/jhipster-online/2.33.1/devfile.yaml Show resolved Hide resolved
stacks/jhipster-online/2.33.1/devfile.yaml Show resolved Hide resolved
stacks/jhipster-online/2.33.0/devfile.yaml Outdated Show resolved Hide resolved
maximilianoPizarro added a commit to redhat-developer-demos/jhipster-online that referenced this pull request Jan 31, 2025
maximilianoPizarro added a commit to redhat-developer-demos/jhipster-online that referenced this pull request Jan 31, 2025
Signed-off-by: Maximiliano Pizarro <[email protected]>
Copy link
Member

@michael-valdron michael-valdron left a comment

Choose a reason for hiding this comment

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

Looks like odo v3 is skipping this stack now with the latest changes: https://github.com/devfile/registry/actions/runs/13079727810/job/36500644377

Just #571 (comment) left at this time.

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.

5 participants