Skip to content

Commit

Permalink
Merge branch 'master' into use-eslint-plugin-prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Sep 16, 2024
2 parents 3ddc729 + 0037be6 commit 5621168
Show file tree
Hide file tree
Showing 94 changed files with 423 additions and 329 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/run-since-updater.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Run update-since-todo.py

on:
schedule:
- cron: "0 16 * * THU"
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
since_updater:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'jenkinsci' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run update-since-todo.py
run: |
body=$(./update-since-todo.py)
{
echo 'PROGRESS<<EOF'
echo "${body}"
echo 'EOF'
} >> $GITHUB_OUTPUT
id: run_script
shell: bash
- name: Create Pull Request
uses: peter-evans/create-pull-request@d121e62763d8cc35b5fb1710e887d6e69a52d3a4 # v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Fill in since annotations
title: Fill in since annotations
body: ${{ steps.run_script.outputs.PROGRESS }}
base: master
labels: skip-changelog
branch: actions/update-since-todo
delete-branch: true
8 changes: 2 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,12 @@ MAVEN_OPTS='--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/ja
To run the Yarn frontend build, after [building the WAR file](#building-the-war-file), add the downloaded versions of Node and Yarn to your path:

```sh
export PATH=$PWD/war/node:$PWD/war/node/yarn/dist/bin:$PATH
export PATH=$PWD/node:$PWD/node/yarn/dist/bin:$PATH
```

Then you can run Yarn with e.g.

```sh
cd war
yarn
```

Expand All @@ -75,10 +74,9 @@ On one terminal, start a development server that will not process frontend asset
MAVEN_OPTS='--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED' mvn -pl war jetty:run -Dskip.yarn
```

On another terminal, move to the `war` folder and start a [webpack](https://webpack.js.org/) dev server, after [adding Node and Yarn to your path](#running-the-yarn-frontend-build):
Open another terminal and start a [webpack](https://webpack.js.org/) dev server, after [adding Node and Yarn to your path](#running-the-yarn-frontend-build):

```sh
cd war
yarn start
```

Expand Down Expand Up @@ -113,14 +111,12 @@ mvn spotless:apply
To view frontend issues, after [adding Node and Yarn to your path](#running-the-yarn-frontend-build), run:

```sh
cd war
yarn lint
```

To fix frontend issues, after [adding Node and Yarn to your path](#running-the-yarn-frontend-build), run:

```sh
cd war
yarn lint:fix
```

Expand Down
2 changes: 1 addition & 1 deletion ath.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -o xtrace
cd "$(dirname "$0")"

# https://github.com/jenkinsci/acceptance-test-harness/releases
export ATH_VERSION=5968.v180888e51761
export ATH_VERSION=5992.v39030e88deb_3

if [[ $# -eq 0 ]]; then
export JDK=17
Expand Down
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>6.1.12</version>
<version>6.1.13</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
16 changes: 8 additions & 8 deletions core/src/main/java/hudson/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ public static String addSuffix(int n, String singular, String plural) {
}

/**
* @since TODO
* @since 2.475
*/
public static RunUrl decompose(StaplerRequest2 req) {
List<Ancestor> ancestors = req.getAncestors();
Expand Down Expand Up @@ -610,7 +610,7 @@ public static <T> Iterable<T> reverse(Collection<T> collection) {
}

/**
* @since TODO
* @since 2.475
*/
public static Cookie getCookie(HttpServletRequest req, String name) {
Cookie[] cookies = req.getCookies();
Expand All @@ -633,7 +633,7 @@ public static javax.servlet.http.Cookie getCookie(javax.servlet.http.HttpServlet
}

/**
* @since TODO
* @since 2.475
*/
public static String getCookie(HttpServletRequest req, String name, String defaultValue) {
Cookie c = getCookie(req, name);
Expand Down Expand Up @@ -753,7 +753,7 @@ public static long getHourLocalTimezone() {
* This is used to determine the "current" URL assigned to the given object,
* so that one can compute relative URLs from it.
*
* @since TODO
* @since 2.475
*/
public static String getNearestAncestorUrl(StaplerRequest2 req, Object it) {
List list = req.getAncestors();
Expand Down Expand Up @@ -981,7 +981,7 @@ public static boolean hasPermission(Object object, Permission permission) throws
}

/**
* @since TODO
* @since 2.475
*/
public static void adminCheck(StaplerRequest2 req, StaplerResponse2 rsp, Object required, Permission permission) throws IOException, ServletException {
// this is legacy --- all views should be eventually converted to
Expand Down Expand Up @@ -1013,7 +1013,7 @@ public static void adminCheck(StaplerRequest req, StaplerResponse rsp, Object re
/**
* Infers the hudson installation URL from the given request.
*
* @since TODO
* @since 2.475
*/
public static String inferHudsonURL(StaplerRequest2 req) {
String rootUrl = Jenkins.get().getRootUrl();
Expand Down Expand Up @@ -2132,7 +2132,7 @@ public static List<Descriptor<CrumbIssuer>> getCrumbIssuerDescriptors() {
}

/**
* @since TODO
* @since 2.475
*/
public static String getCrumb(StaplerRequest2 req) {
Jenkins h = Jenkins.getInstanceOrNull();
Expand Down Expand Up @@ -2328,7 +2328,7 @@ public static String createRenderOnDemandProxy(JellyContext context, String attr
/**
* Called from renderOnDemand.jelly to generate the parameters for the proxy object generation.
*
* @since TODO
* @since 2.475
*/
@Restricted(NoExternalUse.class)
public static StaplerRequest2.RenderOnDemandParameters createRenderOnDemandProxyParameters(JellyContext context, String attributesToCapture) {
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/hudson/Plugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public void configure(JSONObject formData) throws IOException, javax.servlet.Ser
* <p>
* If you are using this method, you'll likely be interested in
* using {@link #save()} and {@link #load()}.
* @since TODO
* @since 2.475
*/
public void configure(StaplerRequest2 req, JSONObject formData) throws IOException, ServletException, FormException {
try {
Expand All @@ -250,7 +250,7 @@ public void configure(StaplerRequest req, JSONObject formData) throws IOExceptio
/**
* This method serves static resources in the plugin under {@code hudson/plugin/SHORTNAME}.
*
* @since TODO
* @since 2.475
*/
public void doDynamic(StaplerRequest2 req, StaplerResponse2 rsp) throws IOException, ServletException {
if (Util.isOverridden(Plugin.class, getClass(), "doDynamic", StaplerRequest.class, StaplerResponse.class)) {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/PluginManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ PluginManager doCreate(@NonNull Class<? extends PluginManager> klass,
private final PluginStrategy strategy;

/**
* @since TODO
* @since 2.475
*/
protected PluginManager(ServletContext context, File rootDir) {
this.context = context;
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -1852,7 +1852,7 @@ public static long daysElapsedSince(@NonNull Date date) {
* Find the specific ancestor, or throw an exception.
* Useful for an ancestor we know is inside the URL to ease readability
*
* @since TODO
* @since 2.475
*/
@Restricted(NoExternalUse.class)
public static @NonNull <T> T getNearestAncestorOfTypeOrThrow(@NonNull StaplerRequest2 request, @NonNull Class<T> clazz) {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/WebAppMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ private void recordBootAttempt(File home) {
}

/**
* @since TODO
* @since 2.475
*/
public static void installExpressionFactory(ServletContextEvent event) {
JellyFacet.setExpressionFactory(event, new ExpressionFactory2());
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/java/hudson/console/AnnotatedLargeText.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public AnnotatedLargeText(ByteBuffer memory, Charset charset, boolean completed,
}

/**
* @since TODO
* @since 2.475
*/
public void doProgressiveHtml(StaplerRequest2 req, StaplerResponse2 rsp) throws IOException {
if (Util.isOverridden(AnnotatedLargeText.class, getClass(), "doProgressiveHtml", StaplerRequest.class, StaplerResponse.class)) {
Expand All @@ -122,7 +122,7 @@ private void doProgressiveHtmlImpl(StaplerRequest2 req, StaplerResponse2 rsp) th
/**
* Aliasing what I think was a wrong name in {@link LargeText}
*
* @since TODO
* @since 2.475
*/
public void doProgressiveText(StaplerRequest2 req, StaplerResponse2 rsp) throws IOException {
doProgressText(req, rsp);
Expand All @@ -146,7 +146,7 @@ private boolean isHtml() {
}

/**
* @since TODO
* @since 2.475
*/
@Override
protected void setContentType(StaplerResponse2 rsp) {
Expand Down
8 changes: 4 additions & 4 deletions core/src/main/java/hudson/model/AbstractItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ private Object readResolve() {
/**
* Accepts the new description.
*
* @since TODO
* @since 2.475
*/
@RequirePOST
public synchronized void doSubmitDescription(StaplerRequest2 req, StaplerResponse2 rsp) throws IOException, ServletException {
Expand Down Expand Up @@ -690,7 +690,7 @@ private void doSubmitDescriptionImpl(StaplerRequest2 req, StaplerResponse2 rsp)
* since it predates {@code <l:confirmationLink>}. {@code /delete} goes to a Jelly page
* which should now be unused by core but is left in case plugins are still using it.
*
* @since TODO
* @since 2.475
*/
@RequirePOST
public void doDoDelete(StaplerRequest2 req, StaplerResponse2 rsp) throws IOException, ServletException, InterruptedException {
Expand Down Expand Up @@ -736,7 +736,7 @@ private void doDoDeleteImpl(StaplerRequest2 req, StaplerResponse2 rsp) throws IO
}

/**
* @since TODO
* @since 2.475
*/
@Override
public void delete(StaplerRequest2 req, StaplerResponse2 rsp) throws IOException, ServletException {
Expand Down Expand Up @@ -830,7 +830,7 @@ protected void performDelete() throws IOException, InterruptedException {
/**
* Accepts {@code config.xml} submission, as well as serve it.
*
* @since TODO
* @since 2.475
*/
@WebMethod(name = "config.xml")
public void doConfigDotXml(StaplerRequest2 req, StaplerResponse2 rsp)
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/model/AbstractProject.java
Original file line number Diff line number Diff line change
Expand Up @@ -1778,7 +1778,7 @@ public void doPolling(StaplerRequest2 req, StaplerResponse2 rsp) throws IOExcept
}

/**
* @since TODO
* @since 2.475
*/
@Override
protected void submit(StaplerRequest2 req, StaplerResponse2 rsp) throws IOException, ServletException, FormException {
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/hudson/model/Actionable.java
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ public <T extends Action> T getAction(Class<T> type) {
}

/**
* @since TODO
* @since 2.475
*/
public Object getDynamic(String token, StaplerRequest2 req, StaplerResponse2 rsp) {
if (Util.isOverridden(Actionable.class, getClass(), "getDynamic", String.class, StaplerRequest.class, StaplerResponse.class)) {
Expand Down Expand Up @@ -374,7 +374,7 @@ private Object getDynamicImpl(String token, StaplerRequest2 req, StaplerResponse
}

/**
* @since TODO
* @since 2.475
*/
@Override
public ContextMenu doContextMenu(StaplerRequest2 request, StaplerResponse2 response) throws Exception {
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/hudson/model/BuildAuthorizationToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public BuildAuthorizationToken(String token) {
}

/**
* @since TODO
* @since 2.475
*/
public static BuildAuthorizationToken create(StaplerRequest2 req) {
if (req.getParameter("pseudoRemoteTrigger") != null) {
Expand All @@ -79,7 +79,7 @@ public static BuildAuthorizationToken create(StaplerRequest req) {
}

/**
* @since TODO
* @since 2.475
*/
public static void checkPermission(Job<?, ?> project, BuildAuthorizationToken token, StaplerRequest2 req, StaplerResponse2 rsp) throws IOException {
if (token != null && token.token != null) {
Expand Down
12 changes: 6 additions & 6 deletions core/src/main/java/hudson/model/Descriptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ public T newInstance(StaplerRequest req) throws FormException {
*
* @throws FormException
* Signals a problem in the submitted form.
* @since TODO
* @since 2.475
*/
public T newInstance(@Nullable StaplerRequest2 req, @NonNull JSONObject formData) throws FormException {
if (Util.isOverridden(Descriptor.class, getClass(), "newInstance", StaplerRequest.class, JSONObject.class)) {
Expand Down Expand Up @@ -626,7 +626,7 @@ private T newInstanceImpl(@Nullable StaplerRequest2 req, @NonNull JSONObject for
* Replacement for {@link StaplerRequest2#bindJSON(Class, JSONObject)} which honors {@link #newInstance(StaplerRequest2, JSONObject)}.
* This is automatically used inside {@link #newInstance(StaplerRequest2, JSONObject)} so a direct call would only be necessary
* in case the top level binding might use a {@link Descriptor} which overrides {@link #newInstance(StaplerRequest2, JSONObject)}.
* @since TODO
* @since 2.475
*/
public static <T> T bindJSON(StaplerRequest2 req, Class<T> type, JSONObject src) {
return bindJSON(req, type, src, false);
Expand Down Expand Up @@ -859,7 +859,7 @@ public boolean configure(StaplerRequest req) throws FormException {
* See <a href="https://www.jenkins.io/doc/developer/forms/structured-form-submission/">the developer documentation</a>.
* @return false
* to keep the client in the same config page.
* @since TODO
* @since 2.475
*/
public boolean configure(StaplerRequest2 req, JSONObject json) throws FormException {
if (Util.isOverridden(Descriptor.class, getClass(), "configure", StaplerRequest.class, JSONObject.class)) {
Expand Down Expand Up @@ -1062,7 +1062,7 @@ private void doHelpImpl(StaplerRequest2 req, StaplerResponse2 rsp) throws IOExce
}

/**
* @since TODO
* @since 2.475
*/
@Restricted(NoExternalUse.class)
public static URL getStaticHelpUrl(StaplerRequest2 req, Klass<?> c, String suffix) {
Expand Down Expand Up @@ -1142,7 +1142,7 @@ Map<Descriptor<T>, T> toMap(Iterable<T> describables) {
* List of descriptors to create instances from.
* @return
* Can be empty but never null.
* @since TODO
* @since 2.475
*/
public static <T extends Describable<T>>
List<T> newInstancesFromHeteroList(StaplerRequest2 req, JSONObject formData, String key,
Expand All @@ -1162,7 +1162,7 @@ List<T> newInstancesFromHeteroList(StaplerRequest req, JSONObject formData, Stri
}

/**
* @since TODO
* @since 2.475
*/
public static <T extends Describable<T>>
List<T> newInstancesFromHeteroList(StaplerRequest2 req, Object formData,
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/hudson/model/Hudson.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static Hudson getInstance() {
}

/**
* @since TODO
* @since 2.475
*/
public Hudson(File root, ServletContext context) throws IOException, InterruptedException, ReactorException {
this(root, context, null);
Expand All @@ -96,7 +96,7 @@ public Hudson(File root, javax.servlet.ServletContext context) throws IOExceptio
}

/**
* @since TODO
* @since 2.475
*/
public Hudson(File root, ServletContext context, PluginManager pluginManager) throws IOException, InterruptedException, ReactorException {
super(root, context, pluginManager);
Expand Down
Loading

0 comments on commit 5621168

Please sign in to comment.