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

requestMapper: Fix enabled services with firstboot #2464

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

regexowl
Copy link
Collaborator

Previously used .push() method was limited by non-writable length of the enabled services array, ending up in the following error:

 Uncaught (in promise) TypeError: can't define array index property past the end of an array with non-writable length

This fixes the problem by updating the array via spread operator.

Before: when creating an image with Oscap profile with enabled serviced and adding a firstboot script, the Create blueprint button at the Review step threw an error on click.
After fix: it's possible to create an image with Oscap profile that includes enabled services and a firstboot script.

Copy link

codecov bot commented Sep 24, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 83.64%. Comparing base (1a7350e) to head (936b5e0).
Report is 2157 commits behind head on main.

Files with missing lines Patch % Lines
...nents/CreateImageWizard/utilities/requestMapper.ts 50.00% 1 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2464      +/-   ##
==========================================
+ Coverage   75.71%   83.64%   +7.93%     
==========================================
  Files          33      153     +120     
  Lines         597    17235   +16638     
  Branches      144     1673    +1529     
==========================================
+ Hits          452    14416   +13964     
- Misses        139     2800    +2661     
- Partials        6       19      +13     
Files with missing lines Coverage Δ
...nents/CreateImageWizard/utilities/requestMapper.ts 94.54% <50.00%> (ø)

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 484d475...936b5e0. Read the comment docs.

@regexowl regexowl marked this pull request as ready for review September 24, 2024 07:54
@regexowl regexowl added 🍼 simple Simple and quick to review ❗ important 🐞 bug Something isn't working labels Sep 24, 2024
@jrusz
Copy link
Collaborator

jrusz commented Sep 24, 2024

Tests fail on teardown, will be resolved soon in separate PR. I was able to create the blueprint manually. Integration tests will be ran in stage to verify, let's merge this please :)

Previously used `.push()` method was limited by non-writable length of the enabled services array, ending up in the following error:
```
 Uncaught (in promise) TypeError: can't define array index property past the end of an array with non-writable length
```

This fixes the problem by updating the array via spread operator.

Before: when creating an image with Oscap profile with enabled serviced and adding a firstboot script, the Create blueprint button at the Review step threw an error on click.
After fix: it's possible to create an image with Oscap profile that includes enabled services and a firstboot script.
@regexowl regexowl enabled auto-merge (rebase) September 24, 2024 12:52
@regexowl regexowl merged commit e051aa3 into osbuild:main Sep 24, 2024
5 checks passed
@regexowl regexowl deleted the fix-services-in-requestmapper branch September 24, 2024 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍼 simple Simple and quick to review ❗ important 🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants