-
Notifications
You must be signed in to change notification settings - Fork 328
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
Refactor spo page set
and spo page add
to use util instead of calling other command, Closes #5300
#5301
Conversation
Thanks for another awesome PR 💪👍. You are on 🔥 today. We will review it ASAP |
@nicodecleyre also here some tests are failing and it does not seem like some workflow glitch 😉. |
That's perfectly possible, the pipeline Node |
Thank you for the clarification @milanholemans, I tried testing it locally with node Do you have any guidance how to solve this failing pr? I don't really understand why it fails in the pipeline, also the fact that one of the failing test is one I didn't touched |
Will check this one as well. I think it is related to the other PR |
Actually on the pipes it's failing always 😅 node 16, 18, 20 and win or Ubuntu. Seems strange. |
Thank you for wanting to help 🙏. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicodecleyre I managed to reproduce the issues from the pipeline locally and unfortunately, those are connected to small mistakes done in code. I pointed out one mistake done in the review comments.
The problem shows up when running this in a container on ubuntu. You may check it yourself locally. With the devcontainer
we have in the repo it is quite easy, just install Docker for windows, install the Remote Containers VS Code extension and run the Reopen in Container
and that's it 👍. You may follow those details in the wiki for more details
https://github.com/pnp/cli-microsoft365/wiki/GitHub-Codespaces-&-Visual-Studio-Remote-Development-Container#local-remote-development-container
Please try to recheck it locally.
Hi @Adam-it, first of all, thank you very, very much for looking through this and pointing out the problem!! Really appreciate it! I've come a long way with your explanation. But it still goes wrong during the prebuild where I run into a So i tried with |
@nicodecleyre are you using the devcontainer from here -> https://github.com/pnp/cli-microsoft365/tree/main/.devcontainer |
Jup, i'm using that one and not using an external drive. But... Was able to reproduce it using GitHub Codespaces and was able to write a fix for the test 🥳. Thank you for your help along the way, you rock 🤩 Seems we still faced a timeout 😆 can you pretty please rerun the test? |
Awesome news! No need to thank for the support. I didn't do much + we are in this together 👍
sure Thanks for the fixes. I will review it ASAP |
08e2a6e
to
cdb87ea
Compare
setting to draft due to the following observations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicodecleyre this is a good start 👍. Let's recheck if we may improve this a bit and also
this should be merged together with #5299 as a single change in order to avoid code conflicts
@nicodecleyre how are things going? I was thinking if we could refresh those PR's and try to proceed with this and #5299 PR as one go. Also refactoring the parent commands like |
Hi @Adam-it. I'm good but suuuuuperbusy right now, a lot of things come together at once 😅. How are you? I'll make some time this month and look into what you're asking |
cdb87ea
to
b159b8f
Compare
Hi @Adam-it, Did what was requested! Not gonna lie, this was a hard one and spended a lot of time on this one 😅. |
spo page set
to use util instead of calling other command, Closes #5300spo page set
and spo page add
to use util instead of calling other command, Closes #5300
Thanks @nicodecleyre for the awesome work and another holdup from our side 🙏. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicodecleyre awesome work. Seems a lot better and I love the fact we are moving more to utils also in the co-related commands and as a result we now have less code (instead of duplicated logic).
I think we are on the right track till now I only found minor details we may improve along the way 👏👍
I noticed that when using spo page set
I am unable to, but maybe it is also like this from main branch 😅 We could recheck 👍
@pnp/cli-for-microsoft-365-maintainers I would appreciate second 👀on this 🙏. Lets be sure we catch most of the things so that we may align other 42 refactor to util PRs in similar way lets start the merging 🚀 |
src/utils/spo.ts
Outdated
} | ||
|
||
const parsedUrl = new URL(requestUrl); | ||
const serverRelativeSiteUrl = requestUrl.match(new RegExp('/sites/[A-Za-z0-9-]*'))![0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment seems to be marked as resolved without any comment or changes. Why is that?
3adebfd
to
8f7fa8e
Compare
Hey @nicodecleyre, could you please resolve the conflict so that we won't lose any of your fixes? Then we'll have another look at this PR and get it in if all is good. Thank you! |
Hi @waldekmastykarz, I have already resolved quite a few merge conflicts regarding this PR, which were not always that easy. The merge conflicts currently present are from a command present in this PR that uses a new use of executecommand from a PR that has been merged during time, which we are just trying to refactor in this PR, and that is a bit discouraging if I may be so honest... Can we use an approach to minimize the overhead here and finally ship this PR? |
Sorry for the trouble, and that's totally on us. We'll resolve the conflict ourselves. |
Don't get me wrong, I'm totally fine into resolving these merge conflicts myself 😅. I have time tomorrow anyway. I just hope we can prioritize the refactoring prs (this one and the ones I had to close) a bit (bearing in mind that we all do this in our spare time) so we can minimize the overhead and time they are open 🙏 |
a73cea1
to
3bbf2a2
Compare
Merged manually. Thank you! Once again, sorry it's taken us so long. |
Closes #5300