Skip to content

Conversation

@VirginiaBalseiro
Copy link
Contributor

This PR fixes #1549.

A 404 error was throwing, which was blocking the new ACL from being initialized when one was not found. In this PR, we ignore this error so that the function can resume and the ACL initialization can be handled.

  • I've added a unit test to test for potential regressions of this bug.
    // tests pending work on setting up CSS tests
  • The changelog has been updated, if applicable.
  • Commits in this PR are minimal and have descriptive commit messages.

@VirginiaBalseiro VirginiaBalseiro requested a review from a team as a code owner April 14, 2023 08:59
@vercel
Copy link

vercel bot commented Apr 14, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
solid-client-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 17, 2023 8:51am

@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS PodSpaces April 14, 2023 11:48 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to NSS April 14, 2023 11:48 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS PodSpaces April 14, 2023 11:48 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to NSS April 14, 2023 11:48 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS PodSpaces April 14, 2023 11:48 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to NSS April 14, 2023 11:48 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS Dev-Next April 14, 2023 11:48 — with GitHub Actions Inactive
Copy link
Contributor

@NSeydoux NSeydoux left a comment

Choose a reason for hiding this comment

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

The code is fine, but I think more context in the comment would be helpful, to be kind to future us :p

src/acp/acp.ts Outdated
options
);
} catch (e) {
// if the above fails, an ACL cannot be found and we proceed.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be helpful to expand this comment a bit, to recontextualize why that's a correct behavior, rather than describing what the code does. For instance, remind that both ACL and ACR will be discovered through the same header, and that an additional lookup is required for checking the type of the resource, and that the absence of the resource is only possible in the case of an ACL, because in the ACR system the ACR is always present.

@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS PodSpaces April 17, 2023 08:22 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to NSS April 17, 2023 08:22 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS PodSpaces April 17, 2023 08:22 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to NSS April 17, 2023 08:22 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS PodSpaces April 17, 2023 08:22 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to NSS April 17, 2023 08:22 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS Dev-Next April 17, 2023 08:22 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS PodSpaces April 17, 2023 08:22 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS PodSpaces April 17, 2023 08:22 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS Dev-Next April 17, 2023 08:22 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro force-pushed the fix/acl-not-found-error branch from 6fc6b27 to 1b64b47 Compare April 17, 2023 08:30
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS PodSpaces April 17, 2023 08:30 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS PodSpaces April 17, 2023 08:30 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to NSS April 17, 2023 08:30 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS PodSpaces April 17, 2023 08:30 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS PodSpaces April 17, 2023 08:30 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS Dev-Next April 17, 2023 08:30 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to NSS April 17, 2023 08:30 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS PodSpaces April 17, 2023 08:30 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to NSS April 17, 2023 08:30 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS Dev-Next April 17, 2023 08:30 — with GitHub Actions Inactive
Copy link
Contributor

@NSeydoux NSeydoux left a comment

Choose a reason for hiding this comment

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

Can you break down the comment in multiple lines before merging, so that this is roughly aligned with our linting config?

@VirginiaBalseiro VirginiaBalseiro force-pushed the fix/acl-not-found-error branch from 1b64b47 to a9d4e73 Compare April 17, 2023 08:50
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS PodSpaces April 17, 2023 08:50 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS PodSpaces April 17, 2023 08:50 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS Dev-Next April 17, 2023 08:50 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS PodSpaces April 17, 2023 08:50 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to NSS April 17, 2023 08:50 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS PodSpaces April 17, 2023 08:50 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to NSS April 17, 2023 08:50 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS PodSpaces April 17, 2023 08:50 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to NSS April 17, 2023 08:50 — with GitHub Actions Inactive
@VirginiaBalseiro VirginiaBalseiro temporarily deployed to ESS Dev-Next April 17, 2023 08:50 — with GitHub Actions Inactive
@VirginiaBalseiro
Copy link
Contributor Author

Can you break down the comment in multiple lines before merging, so that this is roughly aligned with our linting config?

Oops, thought I did. Fixed.

@VirginiaBalseiro VirginiaBalseiro merged commit 88477f0 into main Apr 17, 2023
@VirginiaBalseiro VirginiaBalseiro deleted the fix/acl-not-found-error branch April 17, 2023 09:02
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.

access/universal functions throw error instead of creating .acl when no .acl exists

3 participants