snowdrop / release-manager Goto Github PK
View Code? Open in Web Editor NEWJira Java Client Tool
Jira Java Client Tool
There are lots of opportunities to run things in parallel (in particular, all ticket creations / linking).
When building the project using mvn clean package
it fails with the following error:
[ERROR] The project me.snowdrop:jira-tool:1.0-SNAPSHOT (/z/dev/client/redhat-snowdrop/jira-tool/pom.xml) has 3 errors
[ERROR] Non-resolvable import POM: Could not find artifact com.atlassian.platform:platform:pom:3.1.7 in atlassian.com (http://maven.atlassian.com/public/) @ com.atlassian.jira:jira-rest-java-client-parent:5.0.4
This is due to version of the com.atlassian.jira:jira-rest-java-client-parent:5.0.4
which depends on...
<dependency>
<groupId>com.atlassian.platform</groupId>
<artifactId>platform</artifactId>
<version>3.1.7</version>
<type>pom</type>
<scope>import</scope>
</dependency>
...and the dependency is missing.
This command would encapsulate both the clone and create component commands in one command to avoid having to perform these actions separately and have the potential of error when passing the cloned issue.
The table of contents is not up to date.
The link to the release.yml example file is wrong
mvn clean package
...
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ issues-manager ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 6 source files to /Users/cmoullia/code/snowdrop/issues-manager/target/test-classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] error reading /Users/cmoullia/.m2/repository/io/quarkus/quarkus-bootstrap-app-model/1.8.1.Final/quarkus-bootstrap-app-model-1.8.1.Final.jar; zip file is empty
[ERROR] /Users/cmoullia/code/snowdrop/issues-manager/src/test/java/dev/snowdrop/jira/atlassian/model/MockProjectRestClient.java:[14,1] cannot access dev.snowdrop.jira.atlassian.model
zip END header not found
[ERROR] /Users/cmoullia/code/snowdrop/issues-manager/src/test/java/dev/snowdrop/jira/JodaDateTimeTest.java:[1,1] cannot access dev.snowdrop.jira
zip END header not found
[ERROR] /Users/cmoullia/code/snowdrop/issues-manager/src/test/java/dev/snowdrop/jira/atlassian/model/MockJiraRestClient.java:[40,8] cannot access dev.snowdrop.jira.atlassian
zip END header not found
[ERROR] /Users/cmoullia/code/snowdrop/issues-manager/src/test/java/dev/snowdrop/jira/Utility.java:[6,8] cannot access dev.snowdrop
zip END header not found
[ERROR] /Users/cmoullia/code/snowdrop/issues-manager/src/test/java/dev/snowdrop/jira/atlassian/model/MockPromise.java:[27,8] cannot access dev
zip END header not found
[ERROR] /Users/cmoullia/code/snowdrop/issues-manager/src/test/java/dev/snowdrop/jira/atlassian/model/ReleaseTest.java:[16,8] cannot access java
zip END header not found
[ERROR] /Users/cmoullia/code/snowdrop/issues-manager/src/test/java/dev/snowdrop/jira/atlassian/model/ReleaseTest.java:[20,8] cannot access javax
zip END header not found
[ERROR] /Users/cmoullia/code/snowdrop/issues-manager/src/test/java/dev/snowdrop/jira/atlassian/model/ReleaseTest.java:[20,13] cannot access javax.inject
zip END header not found
[ERROR] /Users/cmoullia/code/snowdrop/issues-manager/src/test/java/dev/snowdrop/jira/atlassian/model/ReleaseTest.java:[22,8] cannot access io
zip END header not found
[ERROR] /Users/cmoullia/code/snowdrop/issues-manager/src/test/java/dev/snowdrop/jira/atlassian/model/ReleaseTest.java:[22,10] cannot access io.quarkus
zip END header not found
[ERROR] /Users/cmoullia/code/snowdrop/issues-manager/src/test/java/dev/snowdrop/jira/atlassian/model/ReleaseTest.java:[23,8] cannot access org
zip END header not found
[ERROR] /Users/cmoullia/code/snowdrop/issues-manager/src/test/java/dev/snowdrop/jira/atlassian/model/ReleaseTest.java:[23,11] cannot access org.junit
zip END header not found
[ERROR] /Users/cmoullia/code/snowdrop/issues-manager/src/test/java/dev/snowdrop/jira/atlassian/model/ReleaseTest.java:[25,24] cannot access org.junit.jupiter
zip END header not found
[ERROR] /Users/cmoullia/code/snowdrop/issues-manager/src/test/java/dev/snowdrop/jira/atlassian/model/ReleaseTest.java:[26,32] cannot access org.junit.jupiter.api
zip END header not found
[INFO] 15 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 56.074 s
[INFO] Finished at: 2020-09-28T17:15:20+02:00
[INFO] ------------------------------------------------------------------------
Of course, the code will fail now as we don't yet use OAuth
Caused by: RestClientException{statusCode=Optional.of(401), errorCollections=[]}
at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:178)
at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:170)
at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:67)
at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:11)
at com.atlassian.util.concurrent.Promises$Of$3.apply(Promises.java:295)
at com.atlassian.util.concurrent.Promises$2.onSuccess(Promises.java:185)
at com.google.common.util.concurrent.Futures$6.run(Futures.java:1319)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:457)
...
<div class="aui-message aui-message-warning warning">
<p>Encountered a <code>"401 - Unauthorized"</code> error while loading this page.</p>
<p>Basic Authentication Failure - Reason : AUTHENTICATED_FAILED</p>
<p><a href="/secure/MyJiraHome.jspa">Go to Jira home</a></p>
</div>
This will be the text used for JIRA tickets created for information request for teams supporting products we bundle in our starters.
This way, it should be easier for product teams to provide us the information we need in a format that we should be able to process automatically.
Right now, it's using the same title as the associated project which is confusing.
This results in failure to link CVE issues to the master release ticket. Not sure why the link type doesn't exist anymore, though… :thinking:
… so that we can test the product requests without spamming their respective projects by using the SB project instead.
The name is more generic. What do you think, @cmoulliard?
Since this has nothing to do with a pure cloning operation.
Product tickets are marked as being "blocked by" the master release ticket when it should be the contrary.
Initial work has been done but using CDI is proving not trivial and the app doesn't work with it at the moment.
Populate a github issue ticket where the description of the ticket will contain a status report about a release like also for the the CVE
The description will contain 2 tables where one is about the releases
and the second about CVE
The release table will include for each release the list of the linked and related tasks, their status and if some tasks are still older than 1month and where status is still new, work in process, then a small red box will be displayed in front of the line to warn the team and product owner
The CVE will be similar as the release table but will also include the labels
able to decorate, enhance the description of the progress did around the issue
When we try to create an issue where se set the fix version
java -jar target/uber-atlassian-1.0-SNAPSHOT.jar \
-user 'yyyyyy' \
-password 'xxxxxxx' \
-cfg etc/release.yaml \
-action create \
-url https://issues.redhat.com
then we got this error
Exception in thread "main" RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={fixVersions=Field 'fixVersions' cannot be set. It is not on the appropriate screen, or unknown.}, errorMessages=[]}]}
at com.atlassian.jira.rest.client.internal.async.DelegatingPromise.claim(DelegatingPromise.java:45)
at dev.snowdrop.jira.atlassian.Client.createIssue(Client.java:91)
at dev.snowdrop.jira.atlassian.Client.main(Client.java:39)
Caused by: RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={fixVersions=Field 'fixVersions' cannot be set. It is not on the appropriate screen, or unknown.}, errorMessages=[]}]}
at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:176)
at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:170)
at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:49)
at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:10)
at io.atlassian.util.concurrent.Promises$OfStage.lambda$fold$4(Promises.java:332)
at io.atlassian.util.concurrent.Promises.lambda$biFunction$7(Promises.java:422)
at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:930)
at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:907)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$1.lambda$doCompleted$0(SettableFuturePromiseHttpPromiseAsyncClient.java:37)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient.runInContext(SettableFuturePromiseHttpPromiseAsyncClient.java:61)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalDelegateRunnable.run(SettableFuturePromiseHttpPromiseAsyncClient.java:129)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
The error seems not related at all to a technical issue but is probably due to a lack of permissions as documented here
The fix was to ask my company's Jira administrator to allow all users to be able to set assignees and fixVersions when they create new issues.
When a release is created, the associated release.yml
file should be updated with the created ticket so that we can then generate a status report for the release based on the information provided in the linked tickets.
Based on work done in #8
In order to notify the stakeholders responsible of filling in the information we need to assign the ticket to the right person. It could be nice if this task can be done automatically.
The leaders can be found here
… once #11 is finished.
spring-boot.version
in the POMThe account should be set up in such a way that it has appropriate permissions on jira and so that all engineering members of the team could get notified of answers to create jira tickets.
This is needed because not all components support the default issue task type (looking at you EAPSUP! 👀)
The goal being to simplify the command code and eventually move to quarkus.
By default, we should always clone from the same issue so this should be the default one unless we specifically override it.
The use case here is when we have a component that we support ourselves, we need to:
The README is not up to date anymore as by example it does not document how to create a Component JIRA issue and link it to a JIRA Parent issue
Example of command not documented
java -jar ./target/uber-issues-manager-1.0.0-SNAPSHOT.jar \
-user <user> -password <password> \
-action create-component \
-git "metacosm/spring-boot-bom/release-integration"
Question: Will it be needed to execute this command for each JIRA issue to be created for a component ? @metacosm
This would allow to more easily reuse release definition from previous releases without having to remove the components definition in case we want to create a master release ticket without asking product teams for compatible versions (e.g. in case of minor or CVE-only release).
atlassian-prod
issues-manager
to be more genericA declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.