-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: update DatasetAddToProject to use versioned core-service endpoints #2788
Conversation
You can access the deployment of this PR at https://renku-ci-ui-2788.dev.renku.ch |
c35d182
to
e777af7
Compare
e777af7
to
93a21fc
Compare
93a21fc
to
04267c0
Compare
04267c0
to
35e8568
Compare
35e8568
to
3a4757e
Compare
For testing you need a dataset with files, like test-new-dataset
|
3a4757e
to
2ec90ac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great fix! I could use (almost) all the dataset functionalities again. I'm wondering if we should extend the e2e tests to catch these cases -- can be a follow-up PR.
Also, I noticed there are failures when uploading files on older datasets cause the cache.files_upload
endpoint isn't versioned (see screenshot). Not sure if it's worth fixing it in this PR or create a bug issue to take separately
// TODO: restore after #1585 | ||
// eslint-disable-next-line | ||
function addForkNotification( | ||
notifications, | ||
url, | ||
info, | ||
startingLocation, | ||
success = true, | ||
excludeStarting = false, | ||
visibilityException = false | ||
) { | ||
if (success && !visibilityException) { | ||
const locations = excludeStarting ? [url] : [url, startingLocation]; | ||
notifications.addSuccess( | ||
notifications.Topics.PROJECT_FORKED, | ||
`Project ${info.name} successfully created.`, | ||
url, | ||
"Show project", | ||
locations, | ||
`The project has been successfully forked to ${info.namespace}/${info.path}` | ||
); | ||
} else if (visibilityException) { | ||
const locations = excludeStarting ? [url] : [url, startingLocation]; | ||
notifications.addWarning( | ||
notifications.Topics.PROJECT_FORKED, | ||
`Project ${info.name} has been created with an exception.`, | ||
url, | ||
"Show project", | ||
locations, | ||
`The project has been successfully forked to ${info.namespace}/${info.path} | ||
although it was not possible to configure the visibility${visibilityException?.message}` | ||
); | ||
} else { | ||
const locations = excludeStarting ? [] : [startingLocation]; | ||
notifications.addError( | ||
notifications.Topics.PROJECT_FORKED, | ||
"Forking operation did not complete.", | ||
startingLocation, | ||
"Try again", | ||
locations, | ||
"The fork operation did not run to completion. It is possible the project has been created, but some" + | ||
"elements may have not been cloned properly." | ||
); | ||
} | ||
} | ||
// function addForkNotification( | ||
// notifications, | ||
// url, | ||
// info, | ||
// startingLocation, | ||
// success = true, | ||
// excludeStarting = false, | ||
// visibilityException = false | ||
// ) { | ||
// if (success && !visibilityException) { | ||
// const locations = excludeStarting ? [url] : [url, startingLocation]; | ||
// notifications.addSuccess( | ||
// notifications.Topics.PROJECT_FORKED, | ||
// `Project ${info.name} successfully created.`, | ||
// url, | ||
// "Show project", | ||
// locations, | ||
// `The project has been successfully forked to ${info.namespace}/${info.path}` | ||
// ); | ||
// } else if (visibilityException) { | ||
// const locations = excludeStarting ? [url] : [url, startingLocation]; | ||
// notifications.addWarning( | ||
// notifications.Topics.PROJECT_FORKED, | ||
// `Project ${info.name} has been created with an exception.`, | ||
// url, | ||
// "Show project", | ||
// locations, | ||
// `The project has been successfully forked to ${info.namespace}/${info.path} | ||
// although it was not possible to configure the visibility${visibilityException?.message}` | ||
// ); | ||
// } else { | ||
// const locations = excludeStarting ? [] : [startingLocation]; | ||
// notifications.addError( | ||
// notifications.Topics.PROJECT_FORKED, | ||
// "Forking operation did not complete.", | ||
// startingLocation, | ||
// "Try again", | ||
// locations, | ||
// "The fork operation did not run to completion. It is possible the project has been created, but some" + | ||
// "elements may have not been cloned properly." | ||
// ); | ||
// } | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove this, or create a follow-up pr and link to that one? I fear the comment "restore after #1585" is rather outdated 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😆 I kept it in there because it was there before and did not understand the context. Let us just remove it.
2ec90ac
to
2874ff1
Compare
Tearing down the temporary RenkuLab deplyoment for this PR. |
Have DatasetAddToProject use versioned core-service endpoints.
Follow-up to #2764
/deploy #persist