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

fix: service copy without default template #1558

Merged
merged 5 commits into from
Dec 20, 2024

Conversation

0utplay
Copy link
Member

@0utplay 0utplay commented Dec 16, 2024

Motivation

When copying a service without providing a template we try to fallback to the "/default" template. But our fallback logic is not working correctly and causing an NPE.

Modification

We now only accept a single service when copying. If no default template exists and no template is provided we respond with an message indicating the missing template.

Result

The service <Service> copy Command is working again.

Other context

Fixes #1550

@0utplay 0utplay added v: 4.X This pull should be included in the 4.0 release in: node An issue/pull request releated to the node module code t: fix A pull request introducing a fix for a bug. labels Dec 16, 2024
@0utplay 0utplay requested a review from derklaro December 16, 2024 19:02
@0utplay 0utplay self-assigned this Dec 16, 2024
Copy link

github-actions bot commented Dec 16, 2024

Test Results

 48 files  ±0   48 suites  ±0   1m 40s ⏱️ -1s
420 tests ±0  420 ✅ ±0  0 💤 ±0  0 ❌ ±0 
751 runs  ±0  751 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 119bb58. ± Comparison against base commit 71fa7ca.

This pull request removes 38 and adds 38 tests. Note that renamed tests count towards both.
eu.cloudnetservice.driver.document.DocumentSerialisationTest ‑ [4] {"b":1,"s":2,"i":3,"l":4,"f":5.0,"d":6.0,"c":"/","string":"Hello, World!","bol":true,"cloud":["Ben?","Yes","No","HoHoHoHo"],"world":{"this":"is","insane":"!","hello":"world"}}, PRETTY
eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [14] 2024-11-14
eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [23] 21:07:49.656861592
eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [28] 21:07:49.657013826Z
eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [29] 21:07:49.657040606Z
eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [30] 21:07:49.657064681+05:00
eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [31] 21:07:49.657090860-03:00
eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [34] 2024-11-14T21:07:49.657112751
eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [39] 2024-11-14T21:07:49.660735619Z
eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [4] 2024-11-14T21:07:49.656690372Z
…
eu.cloudnetservice.driver.document.DocumentSerialisationTest ‑ [4] {"b":1,"s":2,"i":3,"l":4,"f":5.0,"d":6.0,"c":"/","string":"Hello, World!","bol":true,"cloud":["Ben?","Yes","No","HoHoHoHo"],"world":{"this":"is","hello":"world","insane":"!"}}, PRETTY
eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [14] 2024-12-20
eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [23] 19:17:53.739647210
eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [28] 19:17:53.739799192Z
eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [29] 19:17:53.739826442Z
eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [30] 19:17:53.739854144+05:00
eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [31] 19:17:53.739880112-03:00
eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [34] 2024-12-20T19:17:53.739901812
eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [39] 2024-12-20T19:17:53.740038956Z
eu.cloudnetservice.driver.document.gson.JavaTimeSerializerTest ‑ [4] 2024-12-20T19:17:53.739531606Z
…

♻️ This comment has been updated with latest results.

@0utplay 0utplay enabled auto-merge (squash) December 20, 2024 19:15
@0utplay 0utplay merged commit af4a659 into nightly Dec 20, 2024
6 checks passed
@0utplay 0utplay deleted the fix/GH-1550-service-copy-without-default-template branch December 20, 2024 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: node An issue/pull request releated to the node module code t: fix A pull request introducing a fix for a bug. v: 4.X This pull should be included in the 4.0 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copying services to templates end as an error
2 participants