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
Ditch @serverless/platform-sdk in favor of @serverless/platform-client #464
Comments
Below I've created a table with methods from
|
Some questions:
@medikoo I would appreciate if you had a chance to look at them and provide more context 🙇 |
@pgrzesik great questions, see replies below
Yes, it's old deprecated name (I've tried to ditch all occurrences, which we could ditch in
It corresponds to
It's a backend platform stage, not related in any way to stages to which users deploy their services. We only have two active platform deployments (on
AFAIK slugs are used, which are combinations of @astuyve I believe will be able to put more light on that.
This should be replaced with usage of https://github.com/serverless/utils/blob/master/docs/config.md (idea is to handle user config read & write operation only through this util)
Login and logout already was migrated in context of this plugin (check: #477). It's only config read/write utils and dashboard urls that are retrieved from
I take this is replaced by providers In platform client, best if we sync with @astuyve on that
It exists, and we can see it being a part of instanceSlug (instance represents specific service deployment) |
Thank you @medikoo for responding 🙇 It definitely made a few things much more clear for me. I've updated the table above with additional notes and I have a few extra questions:
|
@pgrzesik great questions:
Yes it can be just ditched out (as we discussed in the meeting). As I see in a history it was put behind the
Now concerning user config. User config should be read and written only through If we need more high level utils (as
This is what we should probably discuss through with @ac360 and @astuyve in upcoming scheduled meeting, as my picture is also blurry. Additional note, towards Still as you've noticed we also have there register logic, and I'm not sure if |
you may already know this, but @serverless/platform-client uses a vulnerable version of axios (ssrf) that has been patched in axios 0.21.1 (more details: axios/axios#3369). This impacts the serverless project due to the following dependency path: serverless > @serverless/enterprise-plugin > @serverless/platform-client > axios Just sharing since I didn't see it posted anywhere. |
After going through all responses here and my notes from a meeting last week, most of the things are now much clearer to me, I've updated the table with revised notes. I believe that in the next step, we can move to implementation, keeping in mind and trying to hit the following KRs (from https://github.com/serverlessinc/roadmap/issues/375):
but also keeping in mind all other KRs. Below is a short outline of how the implementation steps could look like: Implementation
I'm a bit on the fence with implementation of I'm open to feedback to the above, after I get a green light, I'll turn the rough list above into proper Github Issues. 💯 |
Thanks @pgrzesik for the update. Great we have that finally coined! I have just few comments
I believe there's no need to implement those functions, as this functionality is already served by
I think we shouldn't be afraid of that. Whole and only point of utils is to secure an ability to share functionalities among Framework, Components and Plugin. If that implies extra dependency in |
You're totally right, so part of this will be just confirming if it works as expected and adding an extra
Here I was mostly worried about introducing a chain of dependencies which can be problematic to upgrade in some cases. If we introduce a dependency on What do you think? |
Yes, but I don't think it's that problematic. I still would prefer to reuse same utility instead of maintaining two copies of it, in two different packages. Aside of a burden of bumping versions and releasing two packages do you envision any other issues it may create? Also it's a temporary state, we're going into direction where |
At this point I don't see any other issues that this situation might create other than this minor inconvenience during updates. 👍 |
I'm coming back to this as starting the migration is next on our priority list and there's one topic that I'd like to resolve to ensure that it's going to be as smooth as possible. What is the standard way to test out new SDK ( |
I think running integration tests of |
Thanks @medikoo - if I understand correctly, it seems like all these type of tests would have to run via CLI which is good, but I was also looking for a potentially similar experience as in |
I believe there's not, as that qualifies as integration tests for @serverless/platform-sdk and we can confirm it has none |
Anyway, why exactly you want to test against old dashboard? AFAIK point of this migration is to move things so everything works against new platform |
@medikoo Unfortunately, not all backend functionality is migrated to new |
I see. In such case best if you confirm with @ac360 and @astuyve on best path. I believe that either we should improve platform and migrate fully platform-client to new platform. Or introduce temporary integration tests against old dashboard in a platform. |
Hello team, there are a few open PRs that I could use a little bit of feedback on, I also have a few questions that came up during implementation that I was hoping maybe you can answer. The PRs in question:
Questions:
@medikoo @ac360 @astuyve I would really appreciate reviews + feedback on the above questions, thanks in advance 🙇 |
I think using joi or ajv for internal functions args validation would rather be overkill (those utils are more suited for validating complex configuration structures as e.g. If it's about validation within our internal functions (so private in context of Framework or Components users), then I believe throwing as soon as first error is discovered is ok. Those errors signal programmer error, and ideally (assuming good tests coverage) should happen only in development phase and be picked before merging to master (they can be seen just as debugging aid at development stage) Still we may improve the validation by not only checking existence, but also by confirming on content type has nice dedicated utils which we already use in some places in Framework.
+1, as we're on that. I would push that further, but confirm with @ac360 and @astuyve |
I was thinking about it more from external users' perspective, as |
For costumer facing API's, I think |
Discussed during the Framework call (02/02/2021):
Pending questions:
Next steps for me (high level):
@ac360 @eahefnawy @astuyve I would love to hear you input on the above, thanks in advance 🙇 |
|
I'll add, that I believe we should focus on (1) testing functionality that's implemented in given package (e.g. in platform-client we should cover testing implementation that it's in |
Thanks @astuyve and @medikoo 🙇 I've grepped around for
@stevewillard - do you happen to know why in the |
For For |
Thank you @stevewillard for clarification, it all makes sense to me now 👍 |
A small update from me. PRs that are ready for review and safe to merge to current master (no breaking changes):
PRs that are ready for review, have their descriptions update and include breaking changes = are not safe to merge to master:
Having these in should allow for a full migration from
Questions to answer before releasing
I'd love to hear your opinion on that + getting fresh reviews on listed PRs. Thanks in advance 🙇 |
@pgrzesik great feedback, all looks great to me. I have just one question
What is our plan to address |
Thanks @medikoo 🙇 As @astuyve answered about
It seems like we cannot remove that functionality yet, but the plan is to remove it at some point in the future. |
Another update (hopefully the last one regarding the approach to migration 😅): During the Framework call yesterday, we established that in order to make the SDK migration smoother, we will aim to not introduce ANY breaking changes at this point, which means that we will keep old, non-namespaced methods as deprecated if a namespaced equivalent exists, we also don't migrate any existing methods to object-param at this point. We still want to do it, but at a later point in time. For now, we will make sure that everything is backwards compatible. Additionally, we agreed that in order to not block migration, we will port all Below you can find a list of PRs that are ready for review - once these get merged, we will have all missing functionality available in the PRs:
Reviews to the above will be much appreciated and will greatly speed up the migration process 🙇 |
@pgrzesik great thanks for this outstanding work. I've reviewed all those to which I was assigned (note that e.g. https://github.com/serverlessinc/platform/pull/282 has no reviewers assigned at this point, is it not finished yet?) I believe best if you ping @astuyve directly on Slack, so he's fully aware with what it's expected from him. (@ac360 is on the road, so I believe this week we won't see reviews from him) |
Thank you @medikoo 🙇 As for https://github.com/serverlessinc/platform/pull/282 - It was an omission on my part as I didn't request reviews via Github there - it's ready for review as well. |
As a research for next steps, I have a question n the context of the following acceptance criteria:
I also have an additional question about the use of @medikoo @eahefnawy @ac360 I would love to hear your opinion on the above |
Today we've released the |
@serverless/platform-sdk
should no longer be used.Note it's also used in
@serverless/components
and@serverless/safeguards-plugin
. Ideally it should be also removed from them (at least from@serverless/components
).Implementation proposal:
In first phase, let's document all
@serverless/platform-sdk
methods that are used in those packages, and investigate weather we have reliable counterparts on@serverless/platform-client
side(do not implement any changes at this point)
The text was updated successfully, but these errors were encountered: