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

Add information in 'location' for input data assets? #35

Closed
nodet opened this issue Oct 8, 2021 · 1 comment
Closed

Add information in 'location' for input data assets? #35

nodet opened this issue Oct 8, 2021 · 1 comment

Comments

@nodet
Copy link
Owner

nodet commented Oct 8, 2021

The library currently builds input data references that look like this:

{
   'connection': {},
   'id': 'afiro.mps',
   'location': {'href': '/v2/assets/0d2966b8-a1d9-4382-88e2-e9e20e8886bf?space_id=4645be25-e08e-4a34-a475-ff3cd0dc9635'},
   'type': 'data_asset'
}

But the output data references that come back look like this:

{
   'connection': {},
   'id': 'solution.json',
   'location': {
      'href': 'https://api.eu-de.dataplatform.cloud.ibm.com/v2/assets/8132d1f1-be47-4cec-aaf1-8f52f3ec4074?space_id=4645be25-e08e-4a34-a475-ff3cd0dc9635',
      'id': '8132d1f1-be47-4cec-aaf1-8f52f3ec4074'
   },
   'type': 'data_asset'
}

Note in the location section how the href is a complete URL rather than just the 'REST API' part, and it has an id.

At this time, everything is fine and WML handles well the references that are sent. But one can wonder whether the beefier version should be sent.

@nodet
Copy link
Owner Author

nodet commented Oct 8, 2021

The additional information in the 'complete' version is actually redundant (the id already appears in the href, and the 'website' part of the URL must be known anyway to start anything. I would rather not generate useless (or worse, incoherent) content, so let's not change anything.

Moreover, the code of the library must be ready to deal with the 'skinnier' version of the references: it may have to deal with jobs that it didn't create, and shouldn't assume more than what's strictly necessary.

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

No branches or pull requests

1 participant