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

Pull release notes from keycloak-client repository #548

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jonkoops
Copy link
Contributor

Work in progress PR to start sourcing release notes from other repositories in the organization, in this case the keycloak-client repository,

Closes #547

@mposolda mposolda self-requested a review January 13, 2025 08:43
@mposolda
Copy link
Contributor

@jonkoops I have issue that things don't work on my laptop. With building on my laptop mvn clean install, with the upstream/main it builds in less than a minute. However with your changes in this PR, the build is stucked.

It works as expected until this point (It starts to be really slow after the line Changelog appears and then after those lines, it is completely stuck):

SEVERE: <stdin>: line 12: level 0 sections can only be used when doctype is book
Jan 14, 2025 11:50:04 AM  
SEVERE: <stdin>: line 12: level 0 sections can only be used when doctype is book
Jan 14, 2025 11:50:04 AM  
SEVERE: <stdin>: line 12: level 0 sections can only be used when doctype is book
Jan 14, 2025 11:50:04 AM  
SEVERE: <stdin>: line 13: level 0 sections can only be used when doctype is book
Jan 14, 2025 11:50:04 AM  
SEVERE: <stdin>: line 12: level 0 sections can only be used when doctype is book
Jan 14, 2025 11:50:04 AM  
SEVERE: <stdin>: line 12: level 0 sections can only be used when doctype is book
Changelog
  
  - [loaded] 26.0.7
  - [loaded] 26.0.6
  - [loaded] 26.0.5
  - [loaded] 26.0.4
  - [loaded] 26.0.2
  - [loaded] 26.0.1
2025-01-14 11:51:51,887 [761587416]   WARN - #c.i.o.v.i.LineStatusTrackerManager - Tracker is being held on dispose by EditorImpl[file:///home/mposolda/IdeaProjects/keycloak/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/user/profile/UserProfileTest.java]; file: /home/mposolda/IdeaProjects/keycloak/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/user/profile/UserProfileTest.java
2025-01-14 11:51:51,887 [761587416]   WARN - #c.i.o.v.i.LineStatusTrackerManager - Tracker is being held on dispose by EditorImpl[file:///home/mposolda/IdeaProjects/keycloak/services/src/main/java/org/keycloak/services/DefaultKeycloakSessionFactory.java]; file: /home/mposolda/IdeaProjects/keycloak/services/src/main/java/org/keycloak/services/DefaultKeycloakSessionFactory.java
2025-01-14 11:51:52,571 [761588100]   WARN - #c.i.o.v.i.l.NativeFileWatcherImpl - File watcher is still alive, doing a force quit.

I am attaching the file jstack-keycloakweb-build.txt with the thread-dump to see where it is stucked (The important thread looks like "org.keycloak.webbuilder.WebBuilder.main()" . For the reference, I am attaching this thread stack here as well:

"org.keycloak.webbuilder.WebBuilder.main()" #52 [1290356] prio=5 os_prio=0 cpu=9086,55ms elapsed=256,27s tid=0x00007e97a58acc10 nid=1290356 runnable  [0x00007e97793f2000]
   java.lang.Thread.State: RUNNABLE
	at sun.nio.ch.Net.poll([email protected]/Native Method)
	at sun.nio.ch.NioSocketImpl.park([email protected]/NioSocketImpl.java:191)
	at sun.nio.ch.NioSocketImpl.timedRead([email protected]/NioSocketImpl.java:280)
	at sun.nio.ch.NioSocketImpl.implRead([email protected]/NioSocketImpl.java:304)
	at sun.nio.ch.NioSocketImpl.read([email protected]/NioSocketImpl.java:346)
	at sun.nio.ch.NioSocketImpl$1.read([email protected]/NioSocketImpl.java:796)
	at java.net.Socket$SocketInputStream.read([email protected]/Socket.java:1099)
	at sun.security.ssl.SSLSocketInputRecord.read([email protected]/SSLSocketInputRecord.java:489)
	at sun.security.ssl.SSLSocketInputRecord.readHeader([email protected]/SSLSocketInputRecord.java:483)
	at sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket([email protected]/SSLSocketInputRecord.java:70)
	at sun.security.ssl.SSLSocketImpl.readApplicationRecord([email protected]/SSLSocketImpl.java:1461)
	at sun.security.ssl.SSLSocketImpl$AppInputStream.read([email protected]/SSLSocketImpl.java:1066)
	at java.io.BufferedInputStream.fill([email protected]/BufferedInputStream.java:291)
	at java.io.BufferedInputStream.read1([email protected]/BufferedInputStream.java:347)
	at java.io.BufferedInputStream.implRead([email protected]/BufferedInputStream.java:420)
	at java.io.BufferedInputStream.read([email protected]/BufferedInputStream.java:399)
	at sun.net.www.http.HttpClient.parseHTTPHeader([email protected]/HttpClient.java:827)
	at sun.net.www.http.HttpClient.parseHTTP([email protected]/HttpClient.java:759)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0([email protected]/HttpURLConnection.java:1705)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream([email protected]/HttpURLConnection.java:1614)
	at java.net.HttpURLConnection.getResponseCode([email protected]/HttpURLConnection.java:531)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode([email protected]/HttpsURLConnectionImpl.java:307)
	at org.kohsuke.github.internal.GitHubConnectorHttpConnectorAdapter.send(GitHubConnectorHttpConnectorAdapter.java:87)
	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:384)
	at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:355)
	at org.kohsuke.github.Requester.fetch(Requester.java:76)
	at org.kohsuke.github.GHIssue.getRepository(GHIssue.java:102)
	- locked <0x0000000613e76990> (a org.kohsuke.github.GHIssue)
	at org.keycloak.webbuilder.builders.ChangelogBuilder.build(ChangelogBuilder.java:78)
	at org.keycloak.webbuilder.builders.AbstractBuilder.execute(AbstractBuilder.java:18)
	at org.keycloak.webbuilder.WebBuilder.build(WebBuilder.java:53)
	at org.keycloak.webbuilder.WebBuilder.main(WebBuilder.java:39)
	at java.lang.invoke.LambdaForm$DMH/0x00007e9724436000.invokeStaticInit([email protected]/LambdaForm$DMH)
	at java.lang.invoke.LambdaForm$MH/0x00007e9724436400.invoke_MT([email protected]/LambdaForm$MH)
	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:254)
	at java.lang.Thread.runWith([email protected]/Thread.java:1596)
	at java.lang.Thread.run([email protected]/Thread.java:1583)

jstack-keycloakweb-build.txt

It is possible it is something specific to my laptop, however we should probably make sure that things are build in the reasonable time on all laptops (For me, after 10 minutes it is still stucked )

I don't have much comments to the changes. They look OK to me as long as they are working as expected.

@jonkoops jonkoops force-pushed the keycloak-client-releases branch from b29d3a4 to 4da3487 Compare January 14, 2025 11:34
@jonkoops
Copy link
Contributor Author

Not all builders have been ported over yet so comment out all the builders except the ReleaseNotesBuilder in WebBuilder. It will generate empty release notes, as the upstream doesn't yet have any release notes. You can use my downstream to generate some release notes for 26.0.0 by replacing keycloak/keycloak-client with jonkoops/keycloak-client in releases.yaml (see jonkoops/keycloak-client@9c24405).

I am working on fixing up the other builders, as well as the GitHub release notes builder that needs to be generalized as well on the same manner. For now I am looking for feedback in the implementation of sourcing releases, and if it makes sense to build further on it.

@mposolda
Copy link
Contributor

@jonkoops Yes, to me the approach is OK. We just need to make sure that it is not stucked on various laptops like it is currently on mine. But if you know how to fix it, the approach works for me.

@jonkoops jonkoops force-pushed the keycloak-client-releases branch 6 times, most recently from 8e4acac to 43eeb55 Compare January 22, 2025 12:09
@jonkoops
Copy link
Contributor Author

This is now in a place where it can be largely reviewed. The only major part that still needs to be done is converting the blogs builder and related code to pull in the generated files that are there so far.

@jonkoops jonkoops force-pushed the keycloak-client-releases branch from 43eeb55 to cd6ce91 Compare January 22, 2025 13:43
Copy link
Contributor

@mposolda mposolda left a comment

Choose a reason for hiding this comment

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

@jonkoops Nice, Thanks for the update!

I've added 2 comments inline. Besides that, I've tried the PR and have few additional comments:

  • Every keycloak-client release generates blog-post with the title like Keycloak 26.0.4 released . But the title should be rather something like Keycloak client 26.0.4 released or Keycloak client libraries 26.0.4 released ?
  • The generated blog-post has something like this at the beginning: To download the release go to [Keycloak downloads]. . This line should not be there for keycloak-client releases as there is not any keycloak-client download available among downloads. It should be there just for the server releases though
  • Link to the upgrading guide is probably incorrect in keycloak-client posts (added the comment inline about that too)
  • It may be good to remove the blog-post https://github.com/keycloak/keycloak-web/blob/main/blog/2025/keycloak-client-2604.adoc in this PR? I've added this blog-post manually for the keycloak-client 26.0.4 release, but with your PR, we will have keycloak-client release blog-posts automatically generated, so we don't need that manual blog-post anymore to avoid having duplicated blog-post for keycloak-client 26.0.4 release?

CURRENT=`cat pom.xml | grep '<version.keycloak.client>' | cut -d '>' -f 2 | cut -d '<' -f 1`
LATEST=`echo -e "$CURRENT\n$VERSION" | sort -V -r | head -n 1`

sed -i "s|<version.keycloak.client>$CURRENT</version.keycloak.client>|<version.keycloak.client>$LATEST</version.keycloak.client>|g" pom.xml
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
sed -i "s|<version.keycloak.client>$CURRENT</version.keycloak.client>|<version.keycloak.client>$LATEST</version.keycloak.client>|g" pom.xml
mvn versions:set-property -Dproperty=version.keycloak.client -DnewVersion=$LATEST -DgenerateBackupPoms=false

Minor suggestion: Probably slightly better to do this with maven

<div>

<h2>Upgrading</h2>
<p>Before upgrading refer to <a href="https://www.keycloak.org/docs/latest/upgrading/index.html#migration-changes">the migration guide</a> for a complete list of changes.</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

This link should probably go to https://www.keycloak.org/securing-apps/upgrading ?

I am pretty sure that location https://www.keycloak.org/docs/latest/upgrading/index.html#migration-changes is not correct as it contains server-specific upgrading notes related to the Keycloak server. Right now, we don't have any version specific upgrades for keycloak-client in https://www.keycloak.org/securing-apps/upgrading , but we can possibly add them to this file in the future if we have some backwards incompatible changes needed for the client. That file is rendered from the keycloak-client repository ( https://github.com/keycloak/keycloak-client/blob/main/docs/guides/securing-apps/upgrading.adoc ), so we can easily add any client specific updates there.

@jonkoops jonkoops force-pushed the keycloak-client-releases branch from f8c7f7e to 69ec5a8 Compare January 23, 2025 14:00
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.

Pull release notes from keycloak-client repository
2 participants