Skip to content

Commit e629796

Browse files
committed
Fix message in RemovedServiceError diff event
1 parent 69cfbb4 commit e629796

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
lines changed

.changes/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ a change suggestion that adds it.
2020

2121
To get details about optional arguments to the command, run `new-change -h`.
2222

23+
#### Types of changes
24+
25+
The following are the types defined for pull requests:
26+
27+
* **feature** - A larger feature or change in behavior, usually resulting in a
28+
minor version bump.
29+
* **bugfix** - Fixing a bug in an existing code path.
30+
* **documentation** - A documentation-only change.
31+
* **break** - A breaking change, be it a break-fix or a breaking feature change.
32+
* **other** - Any change that does not fit into another category.
33+
2334
### When Releasing Smithy
2435

2536
Before performing a release, ensure that every pull request since the last
@@ -150,7 +161,7 @@ These actions will be performed by the `amend` script.
150161
#### Releases
151162

152163
A manually-triggered GitHub workflow will bump the Smithy version, gather the
153-
pending changes into a release defintiion, and render the new changelog. It will
164+
pending changes into a release definition, and render the new changelog. It will
154165
then create a pull request with these changes.
155166

156167
The workflow will have an input argument to select either a major or minor version
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "bugfix",
3+
"description": "Fix message in RemovedServiceError diff event",
4+
"pull_requests": [
5+
"[#2823](https://github.com/smithy-lang/smithy/pull/2823)"
6+
]
7+
}

smithy-diff/src/main/java/software/amazon/smithy/diff/evaluators/RemovedServiceError.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ private List<ValidationEvent> createErrorViolations(ChangedShape<ServiceShape> c
3838
"The `%s` error was removed from the `%s` service. This means that it "
3939
+ "is no longer considered an error common to all operations within the "
4040
+ "service.",
41-
change.getShapeId(),
42-
id)));
41+
id,
42+
change.getShapeId())));
4343
}
4444
}
4545

smithy-diff/src/test/java/software/amazon/smithy/diff/evaluators/RemovedServiceErrorTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
package software.amazon.smithy.diff.evaluators;
66

77
import static org.hamcrest.MatcherAssert.assertThat;
8+
import static org.hamcrest.Matchers.containsString;
89
import static org.hamcrest.Matchers.equalTo;
910

1011
import java.util.List;
@@ -40,6 +41,10 @@ public void detectsRemovedErrors() {
4041
List<ValidationEvent> events = ModelDiff.compare(modelA, modelB);
4142

4243
// Emits one even for both removals.
43-
assertThat(TestHelper.findEvents(events, "RemovedServiceError").size(), equalTo(2));
44+
List<ValidationEvent> foundEvents = TestHelper.findEvents(events, "RemovedServiceError");
45+
assertThat(foundEvents.size(), equalTo(2));
46+
for (ValidationEvent foundEvent : foundEvents) {
47+
assertThat(foundEvent.getMessage(), containsString("error was removed from the `foo.baz#S` service"));
48+
}
4449
}
4550
}

0 commit comments

Comments
 (0)