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

Harden status parsing #191

Merged
merged 7 commits into from
Jun 24, 2024
Merged

Harden status parsing #191

merged 7 commits into from
Jun 24, 2024

Conversation

dagguh
Copy link
Contributor

@dagguh dagguh commented Jun 14, 2024

No description provided.

@dagguh dagguh requested a review from a team as a code owner June 14, 2024 17:19
@dagguh dagguh changed the title Fix status parsing Harden status parsing Jun 14, 2024
@dagguh
Copy link
Contributor Author

dagguh commented Jun 14, 2024

We're kinda waiting for #190 to merge. This way we'll have a working release pipeline (and can finally release 3.2.0 properly). However, OracleJDK is so flaky we need a couple of reruns there.

mgrzaslewicz
mgrzaslewicz previously approved these changes Jun 14, 2024
dagguh added 7 commits June 24, 2024 15:32
Repro ijpt error:
```
Failed to start jira-node-1
java.lang.Exception: Failed to start jira-node-1
	at com.atlassian.performance.tools.awsinfrastructure.jira.DiagnosableStoppedNode.start(DiagnosableStoppedNode.kt:14)
	at com.atlassian.performance.tools.awsinfrastructure.api.jira.DataCenterFormula$provision$$inlined$map$lambda$1.call(DataCenterFormula.kt:299)
	at com.atlassian.performance.tools.awsinfrastructure.api.jira.DataCenterFormula$provision$$inlined$map$lambda$1.call(DataCenterFormula.kt:48)
	at com.atlassian.performance.tools.jvmtasks.api.TaskScope.task(TaskScope.kt:18)
	at com.atlassian.performance.tools.awsinfrastructure.api.jira.DataCenterFormula.provision(DataCenterFormula.kt:299)
	at com.atlassian.performance.tools.awsinfrastructure.api.jira.DataCenterFormula.provision(DataCenterFormula.kt:85)
	at com.atlassian.performance.tools.awsinfrastructure.api.InfrastructureFormula$provision$provisionJira$1.invoke(InfrastructureFormula.kt:77)
	at com.atlassian.performance.tools.awsinfrastructure.api.InfrastructureFormula$provision$provisionJira$1.invoke(InfrastructureFormula.kt:39)
	at com.atlassian.performance.tools.concurrency.api.TaskContextKt$sam$i$java_util_concurrent_Callable$0.call(TaskContext.kt)
	at com.atlassian.performance.tools.jvmtasks.api.TaskScope.task(TaskScope.kt:18)
	at com.atlassian.performance.tools.concurrency.api.TaskContextKt$submitWithLogContext$1.get(TaskContext.kt:25)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
	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:829)
Caused by: java.lang.Exception: Failed to start the Jira node.
	at com.atlassian.performance.tools.awsinfrastructure.jira.StandaloneStoppedNode.start(StandaloneStoppedNode.kt:71)
	at com.atlassian.performance.tools.awsinfrastructure.jira.DataCenterNodeFormula$provision$2.start(DataCenterNodeFormula.kt:30)
	at com.atlassian.performance.tools.awsinfrastructure.jira.DiagnosableStoppedNode.start(DiagnosableStoppedNode.kt:12)
	... 14 more
Caused by: javax.json.stream.JsonParsingException: Unexpected char 60 at (line no=1, column no=1, offset=0)
	at org.glassfish.json.JsonTokenizer.unexpectedChar(JsonTokenizer.java:601)
	at org.glassfish.json.JsonTokenizer.nextToken(JsonTokenizer.java:418)
	at org.glassfish.json.JsonParserImpl$NoneContext.getNextEvent(JsonParserImpl.java:413)
	at org.glassfish.json.JsonParserImpl.next(JsonParserImpl.java:363)
	at org.glassfish.json.JsonParserImpl$3.tryAdvance(JsonParserImpl.java:296)
	at java.base/java.util.Spliterators$1Adapter.hasNext(Spliterators.java:681)
	at kotlin.sequences.SequencesKt___SequencesKt.firstOrNull(_Sequences.kt:167)
	at com.atlassian.performance.tools.awsinfrastructure.jira.JiraStatus$Parser.parseResponse(JiraStatus.kt:25)
	at com.atlassian.performance.tools.awsinfrastructure.jira.StandaloneStoppedNode$waitForRunning$1.invoke(StandaloneStoppedNode.kt:122)
	at com.atlassian.performance.tools.awsinfrastructure.jira.StandaloneStoppedNode$waitForRunning$1.invoke(StandaloneStoppedNode.kt:23)
	at com.atlassian.performance.tools.awsinfrastructure.jira.StandaloneStoppedNode.pollJira(StandaloneStoppedNode.kt:199)
	at com.atlassian.performance.tools.awsinfrastructure.jira.StandaloneStoppedNode.waitForRunning(StandaloneStoppedNode.kt:115)
	at com.atlassian.performance.tools.awsinfrastructure.jira.StandaloneStoppedNode.start(StandaloneStoppedNode.kt:59)
	... 16 more
```

TDD: red
Avoid spam like this:
```
[2024-06-12T17:21:22.957Z][DEBUG][com.atlassian.performance.tools.ssh.SshjConnection] [email protected]$ curl http://admin:cd16ef18-a6ef-4e82-97a3-487a0ebaa5ac@localhost:8080/status
[2024-06-12T17:21:23.013Z][DEBUG][com.atlassian.performance.tools.ssh.WaitingCommand.Companion]   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (7) Failed to connect to localhost port 8080: Connection refused
```
The /status endpoint can legitimately not output any status:
```
curl: (7) Failed to connect to localhost port 8080: Connection refused
```
@dagguh dagguh force-pushed the fix-status-parsing branch from 26bf80a to c1dbcfa Compare June 24, 2024 14:06
@dagguh dagguh enabled auto-merge (rebase) June 24, 2024 14:27
@dagguh dagguh merged commit c66c203 into master Jun 24, 2024
3 checks passed
@dagguh dagguh deleted the fix-status-parsing branch June 24, 2024 20:08
@dagguh dagguh mentioned this pull request Jun 25, 2024
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.

2 participants