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

Serverless awsProvider.d.ts fix + addition #49104

Merged
merged 9 commits into from Dec 22, 2020
Merged

Conversation

Namstel
Copy link
Contributor

@Namstel Namstel commented Oct 26, 2020

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test YOUR_PACKAGE_NAME.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

Select one of these and delete the others:

If changing an existing definition:

@typescript-bot typescript-bot added the Untested Change This PR does not touch tests label Oct 26, 2020
@typescript-bot typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board Oct 26, 2020
@typescript-bot
Copy link
Contributor

typescript-bot commented Oct 26, 2020

@Namstel Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through.

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

Because you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ❌ Most recent commit is approved by type definition owners, DT maintainers or others

Once every item on this list is checked, I'll ask you for permission to merge and publish the changes.

Inactive

This PR has been inactive for 26 days — it is still unreviewed!


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 49104,
  "author": "Namstel",
  "headCommitAbbrOid": "8005d95",
  "headCommitOid": "8005d959e83d7fc778be4b6c50b23646fcc16c5d",
  "lastPushDate": "2020-11-26T12:52:29.000Z",
  "lastActivityDate": "2020-11-26T12:52:29.000Z",
  "maintainerBlessed": false,
  "hasMergeConflict": false,
  "isFirstContribution": true,
  "popularityLevel": "Well-liked by everyone",
  "pkgInfo": [
    {
      "name": "serverless",
      "kind": "edit",
      "files": [
        {
          "path": "types/serverless/plugins/aws/provider/awsProvider.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/serverless/serverless-tests.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "hassankhan",
        "JonathanWilbur",
        "a-pavlenko",
        "fredericbarthelet",
        "bryan-hunter",
        "thomasaribart"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    }
  ],
  "reviews": [
    {
      "type": "stale",
      "reviewer": "fredericbarthelet",
      "date": "2020-11-20T19:50:07.000Z",
      "abbrOid": "10691c6"
    }
  ],
  "ciResult": "pass"
}

@typescript-bot
Copy link
Contributor

🔔 @hassankhan @JonathanWilbur @a-pavlenko @fredericbarthelet @bryan-hunter @ThomasAribart — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Oct 26, 2020
@typescript-bot
Copy link
Contributor

👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings.

Let’s review the numbers, shall we?

Comparison details 📊
master #49104 diff
Batch compilation
Memory usage (MiB) 38.4 45.3 +18.0%
Type count 3020 3023 0%
Assignability cache size 290 290 0%
Language service
Samples taken 470 470 0%
Identifiers in tests 470 470 0%
getCompletionsAtPosition
    Mean duration (ms) 88.8 89.4 +0.7%
    Mean CV 14.4% 14.4%
    Worst duration (ms) 159.1 171.3 +7.6%
    Worst identifier layers resources
getQuickInfoAtPosition
    Mean duration (ms) 88.4 89.2 +1.0%
    Mean CV 14.4% 14.5% +1.2%
    Worst duration (ms) 129.9 129.8 0.0%
    Worst identifier testFunction identitySource

It looks like nothing changed too much. I won’t post performance data again unless it gets worse.

@typescript-bot typescript-bot added the Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. label Oct 26, 2020
@RyanCavanaugh RyanCavanaugh moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board Oct 26, 2020
@Namstel
Copy link
Contributor Author

Namstel commented Oct 27, 2020

I've also added the type property to the Stream interface according to the following specs:
https://www.serverless.com/framework/docs/providers/aws/events/streams/

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Oct 27, 2020
@RyanCavanaugh RyanCavanaugh moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board Oct 28, 2020
@Namstel
Copy link
Contributor Author

Namstel commented Nov 13, 2020

🔔 @hassankhan @JonathanWilbur @a-pavlenko @fredericbarthelet @bryan-hunter @ThomasAribart — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

Hi, I would love to hear from any of you.

Sincerely,
Niels

@@ -368,7 +368,7 @@ declare namespace Aws {
interface Sns {
topicName: string;
displayName?: string;
filterPolicy?: string[] | { [key: string]: string };
filterPolicy?: string[] | { [key: string]: string[] };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filterPolicy is an object of attributes to be filtered against string, numeric or boolean value. It can also contain exists, anything-but... filters. (cf https://docs.aws.amazon.com/sns/latest/dg/sns-subscription-filter-policies.html)
If you agree, I'd rather go for the filterPolicy?: Record<string, unknown> type

Copy link
Contributor

@fredericbarthelet fredericbarthelet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution @Namstel and sorry for the late reploy :) I made a few comments on your PR. Let me know if you agree. Thanks

@typescript-bot typescript-bot added the Revision needed This PR needs code changes before it can be merged. label Nov 20, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Author Action in New Pull Request Status Board Nov 20, 2020
@typescript-bot
Copy link
Contributor

@Namstel One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits or comments. If you disagree with the reviewer's comments, you can "dismiss" the review using GitHub's review UI. Thank you!

Co-authored-by: Frédéric Barthelet <fredericb@theodo.fr>
@typescript-bot typescript-bot removed the Revision needed This PR needs code changes before it can be merged. label Nov 24, 2020
@typescript-bot typescript-bot moved this from Needs Author Action to Needs Maintainer Review in New Pull Request Status Board Nov 24, 2020
@typescript-bot
Copy link
Contributor

@fredericbarthelet Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

Co-authored-by: Frédéric Barthelet <fredericb@theodo.fr>
@typescript-bot typescript-bot added the The CI failed When GH Actions fails label Nov 24, 2020
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Needs Author Action in New Pull Request Status Board Nov 24, 2020
@typescript-bot
Copy link
Contributor

@Namstel The CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@Namstel
Copy link
Contributor Author

Namstel commented Nov 24, 2020

Thanks @fredericbarthelet ! I've applied the suggestions.

@typescript-bot typescript-bot removed the The CI failed When GH Actions fails label Nov 24, 2020
@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in New Pull Request Status Board Nov 24, 2020
@typescript-bot typescript-bot added the The CI failed When GH Actions fails label Nov 24, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Author Action in New Pull Request Status Board Nov 24, 2020
@typescript-bot
Copy link
Contributor

@Namstel The CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

Formatted document
Used Array<> syntax for AwsFunction.layers
@typescript-bot typescript-bot removed The CI failed When GH Actions fails Untested Change This PR does not touch tests labels Nov 26, 2020
@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in New Pull Request Status Board Nov 26, 2020
@typescript-bot typescript-bot added the Unreviewed No one showed up to review this PR, so it'll be reviewed by a DT maintainer. label Dec 8, 2020
@typescript-bot
Copy link
Contributor

Re-ping @hassankhan, @JonathanWilbur, @a-pavlenko, @fredericbarthelet, @bryan-hunter, @ThomasAribart:

This PR has been out for over a week, yet I haven't seen any reviews.

Could someone please give it some attention? Thanks!

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Action in New Pull Request Status Board Dec 14, 2020
@typescript-bot
Copy link
Contributor

It has been more than two weeks and this PR still has no reviews.

I'll bump it to the DT maintainer queue. Thank you for your patience, @Namstel.

(Ping @hassankhan, @JonathanWilbur, @a-pavlenko, @fredericbarthelet, @bryan-hunter, @ThomasAribart.)

@orta
Copy link
Collaborator

orta commented Dec 22, 2020

Cool, thanks, this looks like it fits the docs - let's get it in

@orta orta merged commit 3c1e642 into DefinitelyTyped:master Dec 22, 2020
@typescript-bot typescript-bot removed this from Needs Maintainer Action in New Pull Request Status Board Dec 22, 2020
@typescript-bot
Copy link
Contributor

I just published @types/serverless@1.78.16 to npm.

kaznovac pushed a commit to kaznovac/DefinitelyTyped that referenced this pull request Mar 2, 2021
* Fixed filterPolicty alternative type

* Allow AwsFunction layers property to be defined as key with string so Ref can be used.

* Added optional type to Stream interface

* Update types/serverless/plugins/aws/provider/awsProvider.d.ts

Co-authored-by: Frédéric Barthelet <fredericb@theodo.fr>

* Update types/serverless/plugins/aws/provider/awsProvider.d.ts

Co-authored-by: Frédéric Barthelet <fredericb@theodo.fr>

* Update types/serverless/plugins/aws/provider/awsProvider.d.ts

* Update awsProvider.d.ts

Added missing semicolon

* awsProvider.d.ts
Formatted document
Used Array<> syntax for AwsFunction.layers

* Fixed SNS filterPolicy test

Co-authored-by: Frédéric Barthelet <fredericb@theodo.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. Unreviewed No one showed up to review this PR, so it'll be reviewed by a DT maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants