uaa icon indicating copy to clipboard operation
uaa copied to clipboard

Upgrade Slate, and have successful platform doc builds…

Open fhanik opened this issue 1 year ago • 14 comments

… on both Mac and Linux using Ruby 3.3.5

Step 1 - Upgrade dependencies of Slate ruby gems

Note: May require pipeline modifications to include Ruby 3.3.x

fhanik avatar Oct 09 '24 17:10 fhanik

CLA Not Signed

hI @fhanik ! back in UAA ? So your PR is welcome, but we need to update the runtime in the voters , e.g. error from there

Your Ruby version is 3.0.7, but your Gemfile specified >= 3.3

FYI @peterhaochen47 / @hsinn0

strehle avatar Oct 09 '24 19:10 strehle

Note: May require pipeline modifications to include Ruby 3.3.x

docker images was updated, e.g. you can test with

docker run --privileged --tty --interactive --shm-size=1 -v.:/root/uaa cfidentity/uaa-generate-docs /root/uaa/scripts/generate-docs.sh

strehle avatar Oct 10 '24 09:10 strehle

Note: May require pipeline modifications to include Ruby 3.3.x

docker images was updated, e.g. you can test with

docker run --privileged --tty --interactive --shm-size=1 -v.:/root/uaa cfidentity/uaa-generate-docs /root/uaa/scripts/generate-docs.sh

Awesome. I suspect this is the build image too. I will resolve it.

Am I back…not quite yet, but it may be a possibility in the future. @strehle

fhanik avatar Oct 10 '24 17:10 fhanik

The docker images update broke a main pipeline job https://bosh.ci.cloudfoundry.org/teams/uaa/pipelines/uaa-acceptance-gcp/jobs/test-generate-api-docs/builds/316. As I do not have resource to put an effort on resolving it at the moment, I might have to revert the docker images update to make the pipeline green. Will see.

hsinn0 avatar Oct 10 '24 18:10 hsinn0

The docker images update broke a main pipeline job https://bosh.ci.cloudfoundry.org/teams/uaa/pipelines/uaa-acceptance-gcp/jobs/test-generate-api-docs/builds/316. As I do not have resource to put an effort on resolving it at the moment, I might have to revert the docker images update to make the pipeline green. Will see.

I realize that the main pipeline job failure is likely to be resolved when additional changes for this PR are made. So I will wait for the changes in this PR for now.

hsinn0 avatar Oct 10 '24 19:10 hsinn0

@strehle @hsinn0

Since there was a scripts/jasmine-tests I assumed your build images would already have Javascript (nodejs) installed.

The dockerfile (can you point me to it so I can send a PR?) would need to include

# install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

# load NVM
 export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

# install npm (I used 18.18.2 cause it works)
nvm install 18.18.2

Now ./gradlew generateDocs will work. There is a small update needed to jasmine test that I'm including in this PR too

fhanik avatar Oct 10 '24 20:10 fhanik

The dockerfile (can you point me to it so I can send a PR?) would need to include

https://github.com/cloudfoundry/uaa-ci/blob/main/concourse/dockerfiles/uaa-generate-docs/Dockerfile @fhanik , I just gave you w perm to the repo so u can push a PR.

hsinn0 avatar Oct 10 '24 21:10 hsinn0

@hsinn0 @strehle

I was working on the uaa-ci patch, but lost access while doing so. I no longer can see the repository

here is the patch for the Dockerfile

# install NVM for JavaScript/nodejs
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

# load NVM into the profile and install npm
RUN \
   export NVM_DIR="$HOME/.nvm" \
    && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" \
    && [ -s "$NVM_DIR/bash_completion" ] \
    && nvm install 18.18.2

add those, and we should be green on generateDocs as well on scripts/jasmine-tests again

fhanik avatar Oct 11 '24 00:10 fhanik

Can you @fhanik please sign CLA - see error . I know you was an approver for UAA already, but maybe you have to re-assign (because of changes) but we must only accept PR with a green CLA... https://tenor.com/b1jfv.gif

strehle avatar Oct 11 '24 11:10 strehle

nvm-sh

I like more the OS dependent approach because then we dont have to maintain broker URLs, so we have node installation in uaa-singular and here we do:

## Install node
RUN \
  curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -
RUN \
    apt-get install -y nodejs && \
    npm install npm@latest -g

On my machine I use and like nvm but in a docker we dont need the flexiblity of different node versions

strehle avatar Oct 11 '24 11:10 strehle

Can you @fhanik please sign CLA - see error . I know you was an approver for UAA already, but maybe you have to re-assign (because of changes) but we must only accept PR with a green CLA... https://tenor.com/b1jfv.gif

I signed one, but it’s probably sitting in an approval queue at Broadcom.

I’ll see if I can track it down

fhanik avatar Oct 11 '24 14:10 fhanik

approval queue at Broadcom.

cool, thanks.

You may have seen, that voter for docs generation now is green. .e.g. https://github.com/cloudfoundry/uaa/actions/runs/11281815112/job/31408214542?pr=3081

strehle avatar Oct 11 '24 14:10 strehle

I was working on the uaa-ci patch, but lost access while doing so. I no longer can see the repository

@fhanik, yeah, the cloudfoundry automation overwrote the access settings. I see that @strehle made the change in uaa-ci though, so we are good there.

hsinn0 avatar Oct 11 '24 17:10 hsinn0

I just learned that if I'm a member of the pivotal-cf org, I should not need a CLA. Let me close this PR and reopen to trigger another check.

fhanik avatar Oct 22 '24 16:10 fhanik