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

Merge master to WebStorm #1120

Merged
merged 39 commits into from
Jul 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c532644
Switch out our test logger (#1027)
abrooksv Jun 11, 2019
8684149
Fixing alternative IDE logic so that it runs for every runTask define…
kiiadi Jun 11, 2019
40b02c2
Refactor New Project Wizard to extensions to support other platforms …
zhangzhx Jun 19, 2019
5ea65b9
Fix the bug when project is not located in the same drive of temp fol…
zhangzhx Jun 25, 2019
bef51c3
Fix the refresh vfs in ReadAction bug. (#1060)
zhangzhx Jun 26, 2019
19c0e34
Fix exceptions thrown in a run config breaking the Run Config action …
abrooksv Jun 26, 2019
478e309
Enable using the presence of a requirements.txt to determine if a met…
abrooksv Jun 27, 2019
874d8b2
Fix dynamodb template for python not creating successfully. (#1071)
zhangzhx Jun 27, 2019
774b55a
Remove anonymized. (#1074)
zhangzhx Jul 2, 2019
f273481
Only build the specified lambda function when running/debugging from …
zhangzhx Jul 3, 2019
a7ef404
Remove the BaseState system from run configs (#1073)
abrooksv Jul 3, 2019
ef8b85f
Fix exceptions while generating projects and on run config validation…
sdubov Jul 8, 2019
bc92578
Fix LocalLambdaRunConfiguration tests broken by async SAM version che…
abrooksv Jul 9, 2019
b9e0f6b
Switch UI tests to use a regex for SDK selection (#1084)
abrooksv Jul 10, 2019
38c57e1
Fix Virtual File System refresh after new project is generated (#1083)
sdubov Jul 11, 2019
7ec5fb3
Re-enable 192 EAP (#1076)
abrooksv Jul 11, 2019
30e3555
Fix toString() on SDK choices in UI test framework (#1085)
abrooksv Jul 11, 2019
a2d4c0d
Fix Java UI tests on 2018.3 (#1086)
abrooksv Jul 11, 2019
0b54d79
Fix read/write action errors when invoking a SAM lambda (#1087)
abrooksv Jul 12, 2019
570d565
Fix Windows SAM detection tests not running on Windows (#1089)
abrooksv Jul 16, 2019
1bc509d
Add test artifact saving for linux-based CI jobs (#1088)
abrooksv Jul 16, 2019
3fb4e37
Backfill credential management document (#1055)
abrooksv Jul 16, 2019
9992662
Break up the AwsExplorerNodes (#1091)
abrooksv Jul 16, 2019
7002573
Remove unused code (#1093)
abrooksv Jul 16, 2019
03851a5
Wrap credential retrieving with progress indication if on UI thread (…
abrooksv Jul 17, 2019
d36c2b7
Remove the endpoints.json URL that does not use HTTPS (#1097)
abrooksv Jul 17, 2019
8967d33
Add changelog for #1096 (#1098)
abrooksv Jul 18, 2019
a7a9511
Pull in latest AWS SDK to update Lambda models (#1100)
abrooksv Jul 18, 2019
01774b4
Simplify explorer service node (#1092)
abrooksv Jul 18, 2019
cd12587
Rename some of the local and remote lambda class names to be more con…
zhangzhx Jul 22, 2019
687ed42
Update to stable 192 versions, fix UI tests (#1106)
abrooksv Jul 25, 2019
d9dcac4
Remove LambdaHandlerIndex (#1107)
abrooksv Jul 26, 2019
733f599
Updating version to 1.5
Jul 29, 2019
26f7339
Updating SNAPSHOT version to 1.6-SNAPSHOT
Jul 29, 2019
065ae71
Fix Create Lambda action missing from explorer menu (#1111)
abrooksv Jul 29, 2019
5605feb
Implement resource cache - to be used for caching describe calls. (#1…
kiiadi Jul 29, 2019
0dde489
Support Gradle link (#1080)
zhangzhx Jul 29, 2019
642732e
Fork JetBrains' AsyncTreeModel to remove the read action requirement …
abrooksv Jul 29, 2019
51619b3
Add IU 192 profile
Jul 30, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .changes/1.5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"date" : "2019-07-29",
"version" : "1.5",
"entries" : [ {
"type" : "feature",
"description" : "Support Globals configuration in SAM template for serverless functions."
}, {
"type" : "feature",
"description" : "Enable searching for `requirements.txt` when determining if a python method is a handler to match SAM build"
}, {
"type" : "feature",
"description" : "Enable toolkit in 2019.2 EAP"
}, {
"type" : "feature",
"description" : "Support building only the requested function when sam cli version is newer than 0.16"
}, {
"type" : "bugfix",
"description" : "Upgraded AWS Java SDK to pull in latest model changes (#1099)"
}, {
"type" : "bugfix",
"description" : "Fix DynamoDB template for Python does not create correctly."
}, {
"type" : "bugfix",
"description" : "Fix DaemonCodeAnalyzer restart not happening in a read action (#1012)"
}, {
"type" : "bugfix",
"description" : "Fix the bug when project is in different drive than the temp folder drive for Windows. #950"
}, {
"type" : "bugfix",
"description" : "Fix invalid credentials file reporting an IDE error"
}, {
"type" : "bugfix",
"description" : "Fix issue where modifying a cloned run config results in mutation of the original"
}, {
"type" : "bugfix",
"description" : "Fix runtime exceptions on project startup and run configuration validation"
}, {
"type" : "bugfix",
"description" : "Fix read/write action issues when invoking a Lambda using SAM (#1081)"
}, {
"type" : "bugfix",
"description" : "Make sure all STS assume role calls are not on the UI thread (#1024)"
} ]
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type" : "feature",
"description" : "Add support to link Gradle project."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type" : "feature",
"description" : "Enable caching of describe calls to avoid repeated network calls for already known resources."
}
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# _1.5_ (2019-07-29)
- **(Feature)** Support Globals configuration in SAM template for serverless functions.
- **(Feature)** Enable searching for `requirements.txt` when determining if a python method is a handler to match SAM build
- **(Feature)** Enable toolkit in 2019.2 EAP
- **(Feature)** Support building only the requested function when sam cli version is newer than 0.16
- **(Bug Fix)** Upgraded AWS Java SDK to pull in latest model changes ([#1099](https://github.com/aws/aws-toolkit-jetbrains/issues/1099))
- **(Bug Fix)** Fix DynamoDB template for Python does not create correctly.
- **(Bug Fix)** Fix DaemonCodeAnalyzer restart not happening in a read action ([#1012](https://github.com/aws/aws-toolkit-jetbrains/issues/1012))
- **(Bug Fix)** Fix the bug when project is in different drive than the temp folder drive for Windows. [#950](https://github.com/aws/aws-toolkit-jetbrains/issues/950)
- **(Bug Fix)** Fix invalid credentials file reporting an IDE error
- **(Bug Fix)** Fix issue where modifying a cloned run config results in mutation of the original
- **(Bug Fix)** Fix runtime exceptions on project startup and run configuration validation
- **(Bug Fix)** Fix read/write action issues when invoking a Lambda using SAM ([#1081](https://github.com/aws/aws-toolkit-jetbrains/issues/1081))
- **(Bug Fix)** Make sure all STS assume role calls are not on the UI thread ([#1024](https://github.com/aws/aws-toolkit-jetbrains/issues/1024))

# _1.4_ (2019-06-10)
- **(Feature)** Usability enhancements to the CloudFormation UI
- color coding status similar to the AWS Console
Expand Down
16 changes: 9 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ subprojects {

testlogger {
showFullStackTraces true
showStandardStreams true
showPassedStandardStreams false
showSkippedStandardStreams true
showFailedStandardStreams true
}

test {
Expand All @@ -107,6 +111,11 @@ subprojects {
includes = ["software.aws.toolkits.*"]
excludes = ["software.aws.toolkits.ktlint"]
}

reports {
junitXml.enabled = false
html.enabled = true
}
}

idea {
Expand Down Expand Up @@ -134,13 +143,6 @@ subprojects {
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath

binResultsDir = file("$buildDir/integration-test-results/binary/integrationTest")

reports {
html.destination file("$buildDir/reports/integration-test")
junitXml.destination file("$buildDir/integration-test-results")
}

jacoco {
excludes = ["com.sun.*"] // See https://groups.google.com/forum/#!topic/jacoco/H0gDwxNuhK4
}
Expand Down
12 changes: 12 additions & 0 deletions buildspec/linuxIntegrationTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,15 @@ phases:
- CI_BUILD_ID="${CODEBUILD_BUILD_ID}"
- curl -s https://codecov.io/bash > codecov.sh
- if [ "$CODE_COV_TOKEN" ]; then bash ./codecov.sh -t $CODE_COV_TOKEN -F integtest || true; fi

post_build:
commands:
- TEST_ARTIFACTS="/tmp/testArtifacts"
- mkdir $TEST_ARTIFACTS
- rsync -rmv --include='*/' --include '**/build/idea-sandbox/system*/log/**' --exclude='*' . $TEST_ARTIFACTS/ || true
- rsync -rmv --include='*/' --include '**/build/reports/**' --exclude='*' . $TEST_ARTIFACTS/ || true

artifacts:
files:
- "**/*"
base-directory: /tmp/testArtifacts
12 changes: 12 additions & 0 deletions buildspec/linuxTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,15 @@ phases:
- CI_BUILD_ID="${CODEBUILD_BUILD_ID}"
- curl -s https://codecov.io/bash > codecov.sh
- if [ "$CODE_COV_TOKEN" ]; then bash ./codecov.sh -t $CODE_COV_TOKEN -F unittest || true; fi

post_build:
commands:
- TEST_ARTIFACTS="/tmp/testArtifacts"
- mkdir $TEST_ARTIFACTS
- rsync -rmv --include='*/' --include '**/build/idea-sandbox/system*/log/**' --exclude='*' . $TEST_ARTIFACTS/ || true
- rsync -rmv --include='*/' --include '**/build/reports/**' --exclude='*' . $TEST_ARTIFACTS/ || true

artifacts:
files:
- "**/*"
base-directory: /tmp/testArtifacts
16 changes: 13 additions & 3 deletions buildspec/linuxUiTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ phases:
- apt-get update
- apt-get install -y xvfb icewm procps ffmpeg libswt-gtk-3-java
- pip install --user aws-sam-cli

build:
commands:
- Xvfb :99 -screen 0 1920x1080x24 &
Expand All @@ -33,16 +34,25 @@ phases:
ffmpeg -f x11grab -video_size 1920x1080 -i :99 -codec:v libx264 -r 12 /tmp/screen_recording.mp4 &
fi
- ./gradlew guiTest coverageReport --info --console plain

post_build:
commands:
- TEST_ARTIFACTS="/tmp/testArtifacts"
- mkdir $TEST_ARTIFACTS
- rsync -r guitest.log $TEST_ARTIFACTS/gui/ || true
- rsync -rmv --include='*/' --include '**/build/idea-sandbox/system*/log/**' --exclude='*' . $TEST_ARTIFACTS/ || true
- rsync -rmv --include='*/' --include '**/build/reports/**' --exclude='*' . $TEST_ARTIFACTS/ || true

- if [ "$RECORD_UI" ]; then pkill -2 ffmpeg; while pgrep ffmpeg > /dev/null; do sleep 1; done; fi
- if [ "$RECORD_UI" ]; then cp /tmp/screen_recording.mp4 jetbrains-core-gui/build/idea-sandbox/system/log/screen_recording.mp4; fi
- if [ "$RECORD_UI" ]; then cp /tmp/screen_recording.mp4 $TEST_ARTIFACTS/gui/; fi

- VCS_COMMIT_ID="${CODEBUILD_RESOLVED_SOURCE_VERSION}"
- CI_BUILD_URL=$(echo $CODEBUILD_BUILD_URL | sed 's/#/%23/g') # Encode `#` in the URL because otherwise the url is clipped in the Codecov.io site
- CI_BUILD_ID="${CODEBUILD_BUILD_ID}"
- curl -s https://codecov.io/bash > codecov.sh
- if [ "$CODEBUILD_BUILD_SUCCEEDING" ] && [ "$CODE_COV_TOKEN" ]; then bash ./codecov.sh -t $CODE_COV_TOKEN -F uitest || true; fi

artifacts:
base-directory: /tmp/testArtifacts
files:
- guitest.log
- jetbrains-core-gui/build/idea-sandbox/system/log/**/*
- "**/*"
19 changes: 18 additions & 1 deletion buildspec/windowsTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@ env:
CI: true

phases:
install:
commands:
- choco install -y --no-progress codecov

build:
commands:
- ./gradlew check --info --full-stacktrace --console plain
- ./gradlew check coverageReport --info --full-stacktrace --console plain

post_build:
commands:
- |
if(-Not($Env:CODEBUILD_BUILD_SUCCEEDING -eq "0" -Or $Env:CODE_COV_TOKEN -eq $null)) {
$env:VCS_COMMIT_ID=$Env:CODEBUILD_RESOLVED_SOURCE_VERSION;
$env:CI_BUILD_URL=[uri]::EscapeUriString($Env:CODEBUILD_BUILD_URL);
$env:CI_BUILD_ID=$Env:CODEBUILD_BUILD_ID;
codecov -t $Env:CODE_COV_TOKEN `
--flag unittest `
-f "build/reports/jacoco/coverageReport/coverageReport.xml" `
-c $Env:CODEBUILD_RESOLVED_SOURCE_VERSION
}

This file was deleted.

1 change: 0 additions & 1 deletion core/src/software/aws/toolkits/core/region/Partitions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ object PartitionParser {

object ServiceEndpointResource : RemoteResource {
override val urls: List<String> = listOf(
"http://idetoolkits.amazonwebservices.com/endpoints.json",
"https://aws-toolkit-endpoints.s3.amazonaws.com/endpoints.json"
)
override val name: String = "service-endpoints.json"
Expand Down
11 changes: 11 additions & 0 deletions core/src/software/aws/toolkits/core/utils/LogUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ fun <T> Logger.tryOrThrowNullable(message: String, level: Level = Level.ERROR, b
throw e
}

/**
* Execute the given block and return the result. Log a warning when the result is null
*/
fun <T> Logger.logWhenNull(message: String, level: Level = Level.WARN, block: () -> T?): T? {
val value = block()
if (value == null) {
log(level) { message }
}
return value
}

fun Logger.log(level: Level, exception: Throwable? = null, block: () -> String) {
when (level) {
Level.ERROR -> error(exception, block)
Expand Down
7 changes: 7 additions & 0 deletions core/tst/software/aws/toolkits/core/utils/LogUtilsTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ class LogUtilsTest {
verify(log).debug("debug", null)
}

@Test
fun logWhenNull() {
val result = log.logWhenNull("message", level = Level.WARN) { null }
verify(log).warn("message", null)
assertThat(result, equalTo(null))
}

@Before
fun setup() {
reset(log)
Expand Down
Loading