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

resourceadm bugfix: fix import resource identifier validation and return errors #12466

Conversation

mgunnerud
Copy link
Contributor

@mgunnerud mgunnerud commented Mar 8, 2024

Description

  • bugfix: allow creation of resources with identifier which is a substring of existing resource identifier
  • bugfix: return http error status code when importing a resource with an existing identifier

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

@github-actions github-actions bot added the solution/studio/designer Issues related to the Altinn Studio Designer solution. label Mar 8, 2024
@mgunnerud mgunnerud requested a review from TheTechArch March 8, 2024 12:15
@github-actions github-actions bot added the quality/testing Tests that are missing, needs to be created or could be improved. label Mar 8, 2024
@mgunnerud mgunnerud changed the title resourceadm bugfix: allow creation of resources with identifier which is a substring of existing resource identifier resourceadm bugfix: fix import resource identifier validation and return errors Mar 8, 2024
…source-with-an-identifier-which-is-a-substring-of-existing-resource
Copy link

codecov bot commented Mar 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.10%. Comparing base (056a2df) to head (c48e194).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #12466   +/-   ##
=======================================
  Coverage   88.10%   88.10%           
=======================================
  Files        1271     1271           
  Lines       18321    18321           
  Branches     2263     2263           
=======================================
  Hits        16141    16141           
  Misses       1910     1910           
  Partials      270      270           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…source-with-an-identifier-which-is-a-substring-of-existing-resource
Copy link
Member

@TheTechArch TheTechArch left a comment

Choose a reason for hiding this comment

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

💯

@mgunnerud mgunnerud merged commit b8577c4 into main Mar 12, 2024
17 checks passed
@mgunnerud mgunnerud deleted the 12461-resourceadm-cannot-create-or-import-resource-with-an-identifier-which-is-a-substring-of-existing-resource branch March 12, 2024 07:40
nkylstad pushed a commit that referenced this pull request Mar 13, 2024
…urn errors (#12466)

* bugfix: equality check resource name with exact filename, not filename.Contains new identifier

* bugfix: return error code if error happens when importing resource, before trying to import policy file
nkylstad pushed a commit that referenced this pull request Mar 13, 2024
…urn errors (#12466)

* bugfix: equality check resource name with exact filename, not filename.Contains new identifier

* bugfix: return error code if error happens when importing resource, before trying to import policy file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
quality/testing Tests that are missing, needs to be created or could be improved. solution/studio/designer Issues related to the Altinn Studio Designer solution.
Projects
None yet
2 participants