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

Merged
merged 1 commit into from
Jan 28, 2025

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?

add-version-client.sh Outdated Show resolved Hide resolved
@jonkoops jonkoops force-pushed the keycloak-client-releases branch from cd6ce91 to f8c7f7e Compare January 23, 2025 11:35
@jonkoops jonkoops force-pushed the keycloak-client-releases branch 4 times, most recently from e4ccb1b to 2483852 Compare January 27, 2025 11:30
@jonkoops
Copy link
Contributor Author

Managed to get the last piece of this PR in, so it is now functionally complete as far as I can tell. @mposolda @stianst I would appreciate a review pass, please also make sure that the built result is in line with expectations.

@jonkoops jonkoops requested review from mposolda and stianst January 27, 2025 11:32
@jonkoops jonkoops marked this pull request as ready for review January 27, 2025 11:32
@mposolda
Copy link
Contributor

@jonkoops Nice! I've sent you PR jonkoops#1 where I've deleted manually written blog for keycloak-client 26.0.4 release, so we don't need duplicated blog-post for the same thing.

I have one inline comment, but I've rather suggest to do it as a follow-up to merge this PR ASAP

@@ -16,6 +17,8 @@ public class Context {
private final File resourcesDir;
private final File staticDir;
private final File versionsDir;
private final File keycloakVersionsDir;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it can be good if those stuff like keycloakVersionsDir and keycloakClientVersionsDir are handled dynamically, so that there is no need to update java sources once we add also node.js and keycloak.js adapter repositories? But IMO it is ok to do this as a follow-up (maybe once we are adding node.js).

Copy link
Contributor Author

@jonkoops jonkoops Jan 27, 2025

Choose a reason for hiding this comment

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

There is a lot in this PR that could be further generalized, but perhaps we do this when we pull in the Node.js adapter and Keycloak JS.

@jonkoops jonkoops force-pushed the keycloak-client-releases branch 2 times, most recently from 78a1edc to b993e1f Compare January 27, 2025 16:10
add-version.sh Outdated Show resolved Hide resolved
releases.yaml Show resolved Hide resolved
releases.yaml Outdated Show resolved Hide resolved
releases.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@stianst stianst left a comment

Choose a reason for hiding this comment

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

See comments

@jonkoops jonkoops force-pushed the keycloak-client-releases branch from b993e1f to 7ace071 Compare January 28, 2025 11:16
@jonkoops jonkoops requested a review from stianst January 28, 2025 11:18
@jonkoops jonkoops force-pushed the keycloak-client-releases branch 2 times, most recently from 760b7e8 to 8c8eff4 Compare January 28, 2025 13:06
@jonkoops jonkoops requested a review from mposolda January 28, 2025 13:13
@mposolda
Copy link
Contributor

@jonkoops In the last version, at the beginning of keycloak client libraries X.Y released blog-post, there is a sentence with the link to download:

To download the release go to [Keycloak downloads](file:///home/mposolda/IdeaProjects/keycloak-web/target/web/downloads.html).

I believe this should be removed in the keycloak-client blog-posts as those don't have any downloads (AFAIK it was done previously, but maybe re-introduced by some recent changes?)

@jonkoops
Copy link
Contributor Author

I believe this should be removed in the keycloak-client blog-posts as those don't have any downloads (AFAIK it was done previously, but maybe re-introduced by some recent changes?)

This was always the case, but I can add some logic to only include these for the main project. I'll add some code for it.

Closes keycloak#547

Signed-off-by: Jon Koops <[email protected]>
Signed-off-by: Marek Posolda <[email protected]>
Co-authored-by: Marek Posolda <[email protected]>
@jonkoops jonkoops force-pushed the keycloak-client-releases branch from 8c8eff4 to eb7c6b6 Compare January 28, 2025 14:55
@mposolda mposolda merged commit 49bdd29 into keycloak:main Jan 28, 2025
2 checks passed
@jonkoops jonkoops deleted the keycloak-client-releases branch January 28, 2025 15:11
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
3 participants