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 Slate, and have successful platform doc builds… #3081

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

fhanik
Copy link
Contributor

@fhanik fhanik commented Oct 9, 2024

… 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

on both Mac and Linux using Ruby 3.3.5

Step 1 - Upgrade dependencies
Copy link

linux-foundation-easycla bot commented Oct 9, 2024

CLA Not Signed

@strehle
Copy link
Member

strehle commented Oct 9, 2024

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

Copy link
Member

@strehle strehle left a comment

Choose a reason for hiding this comment

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

without mini_racer I see error

bundler: failed to load command: middleman (/usr/local/bundle/bin/middleman)
/usr/local/bundle/gems/execjs-2.9.1/lib/execjs/runtimes.rb:68:in autodetect': Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable) from /usr/local/bundle/gems/execjs-2.9.1/lib/execjs.rb:5:in module:ExecJS'

@@ -1,15 +1,17 @@
ruby '>= 3.0'
ruby '>= 3.3'
source 'https://rubygems.org'

gem 'bundler', '~> 2.2'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
gem 'bundler', '~> 2.2'
gem 'bundler', '~> 2.5'

gem 'mini_racer', '~> 0.4.0', :platform => :ruby
gem 'opal'
gem 'opal-sprockets'

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
gem 'mini_racer', '~> 0.16.0', :platform => :ruby

redcarpet (~> 3.6.0)
rouge (~> 3.21)
sass
webrick

RUBY VERSION
ruby 3.0
ruby 3.3.5

BUNDLED WITH
2.2.22
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
2.2.22
2.5.21

Copy link
Member

Choose a reason for hiding this comment

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

DEPENDENCIES
bundler (~> 2.5)

@strehle
Copy link
Member

strehle commented Oct 10, 2024

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 strehle requested a review from hsinn0 October 10, 2024 09:38
@fhanik
Copy link
Contributor Author

fhanik commented Oct 10, 2024

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

@hsinn0
Copy link
Contributor

hsinn0 commented Oct 10, 2024

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
Copy link
Contributor

hsinn0 commented Oct 10, 2024

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.

@fhanik
Copy link
Contributor Author

fhanik commented Oct 10, 2024

@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

@hsinn0
Copy link
Contributor

hsinn0 commented Oct 10, 2024

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.

@fhanik
Copy link
Contributor Author

fhanik commented Oct 11, 2024

@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

@strehle
Copy link
Member

strehle commented Oct 11, 2024

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
Copy link
Member

strehle commented Oct 11, 2024

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

@fhanik
Copy link
Contributor Author

fhanik commented Oct 11, 2024

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

@strehle
Copy link
Member

strehle commented Oct 11, 2024

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

@hsinn0
Copy link
Contributor

hsinn0 commented Oct 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Pending Review | Discussion
Development

Successfully merging this pull request may close these issues.

3 participants