Skip to content

fix(executeATCCheck): correctly escape namespaces #5275

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mzimnn
Copy link

@mzimnn mzimnn commented Feb 18, 2025

Description

The ATC check failed when the name of a development object included a namespace. Prior to this change, the generated request body looked like this:

  ...
  <adtcore:objectReferences>
    <adtcore:objectReference
      adtcore:uri="/sap/bc/adt/ddic/tables//ABC/MY_TABLE/source/main" />
    <adtcore:objectReference
      adtcore:uri="/sap/bc/adt/oo/interfaces//ABC/MY_INTERFACE" />
  </adtcore:objectReferences>
  ...

Due to the unescaped slashes in the namespace, the SAP system failed with a 400 Bad Request error:

URI-Mapping cannot be performed due to invalid URI: /sap/bc/adt/ddic/tables//ABC/MY_TABLE/source/main

By ensuring the namespaces are properly escaped (e.g. %2FABC%2FMY_TABLE) for all object types, the ATC check now works as expected. However, for classes this issue was already fixed in commit 4ff5271 (gCTSExecuteABAPQualityCheck_namespace_objects (#4623), 2023-10-11).

Checklist

  • Tests
  • Documentation
  • Inner source library needs updating

The ATC check failed when the name of a development object included a
namespace. Prior to this change, the generated request body looked like
this:

  ...
  <adtcore:objectReferences>
    <adtcore:objectReference
      adtcore:uri="/sap/bc/adt/ddic/tables//ABC/MY_TABLE/source/main" />
    <adtcore:objectReference
      adtcore:uri="/sap/bc/adt/oo/interfaces//ABC/MY_INTERFACE" />
  </adtcore:objectReferences>
  ...

Due to the unescaped slashes in the namespace, the SAP system failed
with a 400 Bad Request error:

  URI-Mapping cannot be performed due to invalid URI:
  /sap/bc/adt/ddic/tables//ABC/MY_TABLE/source/main

By ensuring the namespaces are properly escaped (e.g. %2FABC%2FMY_TABLE)
for all object types, the ATC check now works as expected. However, for
classes this issue was already fixed in commit 4ff5271
(gCTSExecuteABAPQualityCheck_namespace_objects (SAP#4623), 2023-10-11).
@mzimnn mzimnn requested a review from a team as a code owner February 18, 2025 14:30
Copy link
Contributor

Thank you for your contribution! This pull request is stale because it has been open 60 days with no activity. In order to keep it open, please remove stale label or add a comment within the next 10 days. If you need a Piper team member to remove the stale label make sure to add @SAP/jenkins-library-team to your comment.

@github-actions github-actions bot added the stale marks stale issues and pull requests label Apr 20, 2025
@mzimnn
Copy link
Author

mzimnn commented Apr 20, 2025

This pull request is still relevant, it fixes the issue described in #5324.

@SAP/jenkins-library-team I would really appreciate if some could take a look at this pull request or the associated issue.

@github-actions github-actions bot removed the stale marks stale issues and pull requests label Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant