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

Move configuration to appearance page #109

Merged
merged 8 commits into from
Nov 21, 2023
Merged

Conversation

timja
Copy link
Member

@timja timja commented Aug 24, 2023

Requires:
jenkinsci/jenkins#8403

This is a breaking change for JCasC configuration, it moves from unclassified to appearance, given this change had to happen anyway I took the liberty of using a more correct symbol of prism, as symbols are not supposed to include their extension point configuration was unneeded.

The new config is:

appearance:
  prism:
    theme: "DARK"
    sourceDirectories:
    - path: "C:\\Windows"
    - path: "/absolute"

Testing done

Submitter checklist

@timja timja added the enhancement Enhancement of existing functionality label Aug 24, 2023
@codecov
Copy link

codecov bot commented Aug 24, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (7b7a209) 75.13% compared to head (b28e5ac) 75.59%.
Report is 3 commits behind head on main.

❗ Current head b28e5ac differs from pull request most recent head a481376. Consider uploading reports for the commit a481376 to get more accurate results

Files Patch % Lines
...ns/plugins/prism/PrismAppearanceConfiguration.java 94.73% 0 Missing and 1 partial ⚠️
...a/io/jenkins/plugins/prism/PrismConfiguration.java 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #109      +/-   ##
============================================
+ Coverage     75.13%   75.59%   +0.46%     
- Complexity       87       91       +4     
============================================
  Files            12       13       +1     
  Lines           366      377      +11     
  Branches         30       30              
============================================
+ Hits            275      285      +10     
- Misses           88       89       +1     
  Partials          3        3              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

pom.xml Outdated Show resolved Hide resolved
@timja timja marked this pull request as ready for review September 10, 2023 21:22
Copy link
Member

@uhafner uhafner left a comment

Choose a reason for hiding this comment

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

Wouldn't it make more sense to move only the theme to the appearance section? The other option is more a security setting, letting administrators define allowed source code directories?

@timja
Copy link
Member Author

timja commented Sep 15, 2023

Wouldn't it make more sense to move only the theme to the appearance section? The other option is more a security setting, letting administrators define allowed source code directories?

Yes that would be better (and is also what is in the guidance here https://javadoc.jenkins.io/jenkins/appearance/AppearanceCategory.html)

@uhafner uhafner changed the title Move configuration to appearance page [LTS Jenkins 2.426] Move configuration to appearance page Oct 5, 2023
@uhafner uhafner marked this pull request as draft October 5, 2023 06:20
@timja
Copy link
Member Author

timja commented Oct 8, 2023

This is ridiculous @uhafner

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:05 min
[INFO] Finished at: 2023-10-08T20:00:23+01:00
[INFO] ------------------------------------------------------------------------
image

@timja timja requested a review from uhafner October 8, 2023 19:14
@uhafner
Copy link
Member

uhafner commented Oct 8, 2023

This is ridiculous @uhafner

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:05 min
[INFO] Finished at: 2023-10-08T20:00:23+01:00
[INFO] ------------------------------------------------------------------------

Don't blame me for this concept. Maven does only support success or failure. All Java analysis tools and javac do not fail the build with purpose on warnings. When everything is a failure then Jenkins does not finish processing, this is also a problem. Seems that you are using a totally different development workflow. I use maven command line very rarely. I run static analysis and tests within the IDE before each commit. I use maven only to deploy and release my plugins.

Copy link
Member

@uhafner uhafner left a comment

Choose a reason for hiding this comment

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

Thanks! Moving the source directories below the security category makes sense as well.

pom.xml Outdated
<changelist>-SNAPSHOT</changelist>
<jenkins.version>2.421</jenkins.version>
Copy link
Member

Choose a reason for hiding this comment

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

If this is ok for you I will not merge until 2.426.1 is ready.

Copy link
Member Author

Choose a reason for hiding this comment

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

sure

pom.xml Outdated

<module.name>${project.groupId}.prism</module.name>

<testcontainers.version>1.19.0</testcontainers.version>
<jsoup.version>1.16.1</jsoup.version>

<hpi.compatibleSinceVersion>1.30.0-1</hpi.compatibleSinceVersion>
Copy link
Member

Choose a reason for hiding this comment

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

Does this work with a number of 1.29.0-9 as well? I want to keep the first part of the version number in sync with the version number of Prism.js.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes it will be fine

* @author Ullrich Hafner
*/
@Extension
@Symbol("prism")
Copy link
Member

Choose a reason for hiding this comment

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

Is it ok to use the same ID twice? In steps this should be avoided buy maybe here it is ok?

Copy link
Member Author

@timja timja Oct 13, 2023

Choose a reason for hiding this comment

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

it's ok as it's in a different category.

Normally it's extension points that shouldn't have the same one but as far as I know as long as it's in a different category it should be fine.

@timja
Copy link
Member Author

timja commented Nov 16, 2023

possible to relook at this @uhafner?

pom.xml Show resolved Hide resolved
@uhafner
Copy link
Member

uhafner commented Nov 17, 2023

Yes, I'll merge it after the weekend...

@uhafner uhafner marked this pull request as ready for review November 21, 2023 08:21
@uhafner uhafner changed the title [LTS Jenkins 2.426] Move configuration to appearance page Move configuration to appearance page Nov 21, 2023
@uhafner uhafner merged commit 424a8f2 into jenkinsci:main Nov 21, 2023
25 checks passed
@timja timja deleted the appearance-page branch November 21, 2023 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants