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

feat: update DatasetAddToProject to use versioned core-service endpoints #2788

Merged
merged 4 commits into from
Sep 14, 2023

Conversation

ciyer
Copy link
Contributor

@ciyer ciyer commented Sep 7, 2023

Have DatasetAddToProject use versioned core-service endpoints.

Follow-up to #2764

/deploy #persist

@ciyer ciyer requested a review from a team as a code owner September 7, 2023 13:22
@ciyer ciyer temporarily deployed to renku-ci-ui-2788 September 7, 2023 13:22 — with GitHub Actions Inactive
@RenkuBot
Copy link
Contributor

RenkuBot commented Sep 7, 2023

You can access the deployment of this PR at https://renku-ci-ui-2788.dev.renku.ch

@ciyer ciyer marked this pull request as draft September 7, 2023 14:24
@ciyer ciyer force-pushed the ciyer/000-add-dataset-version branch from c35d182 to e777af7 Compare September 8, 2023 11:47
@ciyer ciyer temporarily deployed to renku-ci-ui-2788 September 8, 2023 11:48 — with GitHub Actions Inactive
@ciyer ciyer force-pushed the ciyer/000-add-dataset-version branch from e777af7 to 93a21fc Compare September 8, 2023 13:00
@ciyer ciyer temporarily deployed to renku-ci-ui-2788 September 8, 2023 13:00 — with GitHub Actions Inactive
@ciyer ciyer force-pushed the ciyer/000-add-dataset-version branch from 93a21fc to 04267c0 Compare September 11, 2023 09:42
@ciyer ciyer temporarily deployed to renku-ci-ui-2788 September 11, 2023 09:43 — with GitHub Actions Inactive
@ciyer ciyer force-pushed the ciyer/000-add-dataset-version branch from 04267c0 to 35e8568 Compare September 12, 2023 11:14
@ciyer ciyer temporarily deployed to renku-ci-ui-2788 September 12, 2023 11:14 — with GitHub Actions Inactive
@ciyer ciyer temporarily deployed to renku-ci-ui-2788 September 12, 2023 17:46 — with GitHub Actions Inactive
@ciyer ciyer temporarily deployed to renku-ci-ui-2788 September 12, 2023 17:50 — with GitHub Actions Inactive
@ciyer ciyer force-pushed the ciyer/000-add-dataset-version branch from 35e8568 to 3a4757e Compare September 13, 2023 08:08
@ciyer ciyer temporarily deployed to renku-ci-ui-2788 September 13, 2023 08:08 — with GitHub Actions Inactive
@ciyer
Copy link
Contributor Author

ciyer commented Sep 13, 2023

For testing you need a dataset with files, like test-new-dataset

  • Add the dataset to an existing, current project
  • Try to add the dataset to an older project and see that there is an error
  • Add a dataset from an old project to a more recent project (cannot get a dataset/project combination to test this)
  • Add the dataset to a new project

@ciyer ciyer force-pushed the ciyer/000-add-dataset-version branch from 3a4757e to 2ec90ac Compare September 13, 2023 09:30
@ciyer ciyer temporarily deployed to renku-ci-ui-2788 September 13, 2023 09:30 — with GitHub Actions Inactive
@ciyer ciyer marked this pull request as ready for review September 13, 2023 09:30
Copy link
Member

@lorenzo-cavazzi lorenzo-cavazzi left a 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

image

Comment on lines 64 to 107
// 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."
// );
// }
// }
Copy link
Member

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 😁

Copy link
Contributor Author

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.

@ciyer ciyer merged commit 1a90d02 into master Sep 14, 2023
@ciyer ciyer deleted the ciyer/000-add-dataset-version branch September 14, 2023 09:59
@RenkuBot
Copy link
Contributor

Tearing down the temporary RenkuLab deplyoment for this PR.

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.

4 participants