Skip to content

[Do not merge] Deploy to test lambda #722

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

Draft
wants to merge 170 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
8446cc6
Deploy to test lambda
bosschaert Jan 30, 2025
bc2abf5
Link model project directly
bosschaert Jan 31, 2025
51abca6
Temporarily bring in data-access
bosschaert Jan 31, 2025
d132026
Log http access
bosschaert Jan 31, 2025
5bf54c2
Update package.lock
bosschaert Jan 31, 2025
9f8338e
Additional logging
bosschaert Jan 31, 2025
73890d6
Move dataaccess last
bosschaert Jan 31, 2025
2299732
Role based
bosschaert Jan 31, 2025
cf127fe
wip
bosschaert Jan 31, 2025
02d17e1
Add stacktrace for testing
bosschaert Jan 31, 2025
544cdd0
Additional logging
bosschaert Jan 31, 2025
8e5fb1c
Propagate aclCtx
bosschaert Jan 31, 2025
065f133
Forgot this file
bosschaert Jan 31, 2025
2d5b678
Enable check
bosschaert Jan 31, 2025
ece5332
fix issue
bosschaert Jan 31, 2025
8c94853
Some DynamoDB
bosschaert Feb 10, 2025
590e747
Remove ProjectionExpression
bosschaert Feb 10, 2025
ed3a06b
Using document client
bosschaert Feb 10, 2025
0439731
use dynamodb resp
bosschaert Feb 11, 2025
e186139
wip
bosschaert Feb 11, 2025
ed5a666
wip
bosschaert Feb 11, 2025
471a095
FilterExpression
bosschaert Feb 11, 2025
c665489
wip
bosschaert Feb 11, 2025
12e92fc
Try without attr name mapping
bosschaert Feb 11, 2025
609af93
Use IN
bosschaert Feb 11, 2025
4c267a7
first attempt ims
bosschaert Feb 12, 2025
c066fbd
wip
bosschaert Feb 12, 2025
5cd7723
wip ims
bosschaert Feb 12, 2025
76678fa
wip ims
bosschaert Feb 12, 2025
f1ea3cb
Include org id
bosschaert Feb 12, 2025
a295861
tweak
bosschaert Feb 13, 2025
d04522a
tweak
bosschaert Feb 13, 2025
4d02558
tweak
bosschaert Feb 13, 2025
4942251
wip
bosschaert Feb 13, 2025
19f106c
wip
bosschaert Feb 13, 2025
934f6e1
wip
bosschaert Feb 13, 2025
341ff8b
wip
bosschaert Feb 13, 2025
e46a8d9
wip
bosschaert Feb 13, 2025
f3d118f
wip
bosschaert Feb 13, 2025
aad9366
wip
bosschaert Feb 13, 2025
b80b5b0
wip
bosschaert Feb 13, 2025
e6660d9
wip
bosschaert Feb 13, 2025
0d4793a
wip
bosschaert Feb 13, 2025
5c17602
wip
bosschaert Feb 13, 2025
49cd0ba
wip
bosschaert Feb 13, 2025
dcade15
wip
bosschaert Feb 13, 2025
5ef686d
wip
bosschaert Feb 13, 2025
f1441aa
patch
bosschaert Feb 14, 2025
05cf8d8
Add site to acl entities
bosschaert Feb 14, 2025
f004b5a
Permission logging
bosschaert Feb 14, 2025
2ae65ba
wip
bosschaert Feb 14, 2025
2492fdd
wip
bosschaert Feb 14, 2025
e28d37f
Extra logging
bosschaert Feb 17, 2025
ad00d32
Update function regex
bosschaert Feb 18, 2025
bbada04
Add ims client to direct deps
bosschaert Feb 18, 2025
dce4014
Update package-lock.json
bosschaert Feb 18, 2025
38bb49f
Get the IMS profile
bosschaert Feb 18, 2025
bd3a73d
wip
bosschaert Feb 18, 2025
2088529
wip
bosschaert Feb 18, 2025
28c4ab4
Name it RBAC
bosschaert Feb 18, 2025
981a7a6
Add temp data access
bosschaert Feb 19, 2025
4ae5a61
wip
bosschaert Feb 19, 2025
4fd629b
Move rbac to separate place
bosschaert Feb 19, 2025
e007ad5
tweak
bosschaert Feb 19, 2025
640e90b
wip
bosschaert Feb 19, 2025
2015448
wip
bosschaert Feb 19, 2025
9500b71
wip
bosschaert Feb 19, 2025
c74a8cb
wip
bosschaert Feb 19, 2025
7520939
iwp
bosschaert Feb 19, 2025
043ce28
wip
bosschaert Feb 19, 2025
fd5a274
groups
bosschaert Feb 19, 2025
c7cbe5b
wip
bosschaert Feb 19, 2025
81f3f1a
wip
bosschaert Feb 19, 2025
2ab8f69
wip
bosschaert Feb 19, 2025
d320361
wip
bosschaert Feb 19, 2025
bf19572
Create and Delete
bosschaert Feb 24, 2025
bddbf6c
Initial data access via model
bosschaert Mar 6, 2025
689008c
back
bosschaert Mar 6, 2025
db5235e
wip
bosschaert Mar 6, 2025
503c992
wip
bosschaert Mar 6, 2025
efdb1d0
wip
bosschaert Mar 6, 2025
d2efcba
Fix IMS result parsing
bosschaert Mar 6, 2025
80a3ed8
Fill model
bosschaert Mar 6, 2025
e1a2707
Entity Registry
bosschaert Mar 6, 2025
8e66a0f
wip
bosschaert Mar 6, 2025
6dccc9a
wip
bosschaert Mar 6, 2025
3b7d3e5
wip
bosschaert Mar 6, 2025
cbbc09a
wip
bosschaert Mar 6, 2025
c44d44d
pick up correct createDataAccess
bosschaert Mar 6, 2025
3c5bcea
wip
bosschaert Mar 7, 2025
f042496
wip
bosschaert Mar 7, 2025
3e810dc
Remove validate
bosschaert Mar 7, 2025
aa02c3b
wip
bosschaert Mar 7, 2025
3b1e22b
Use index
bosschaert Mar 7, 2025
348adb9
Add acl
bosschaert Mar 7, 2025
5cf1fbf
Add roleid to ACL
bosschaert Mar 7, 2025
135f9c9
wip
bosschaert Mar 7, 2025
7045429
wip
bosschaert Mar 7, 2025
f6c0063
wip
bosschaert Mar 7, 2025
9067469
wip
bosschaert Mar 7, 2025
b4d47c8
wip
bosschaert Mar 7, 2025
8d45f20
qip
bosschaert Mar 7, 2025
49ae6e0
Sample data
bosschaert Mar 7, 2025
8f17cbc
wip
bosschaert Mar 7, 2025
763f9d6
wip
bosschaert Mar 7, 2025
638eee5
fill model
bosschaert Mar 10, 2025
0e20e56
Add ACL index
bosschaert Mar 10, 2025
c4f00ef
wip
bosschaert Mar 10, 2025
31a7bd8
wip
bosschaert Mar 10, 2025
cd20d9f
wip
bosschaert Mar 10, 2025
9c20b4b
wip
bosschaert Mar 10, 2025
480becc
wip
bosschaert Mar 10, 2025
f4b4584
wip
bosschaert Mar 10, 2025
1c7c418
wip
bosschaert Mar 10, 2025
1edade8
Custom electrodb query
bosschaert Mar 10, 2025
21bcd45
wip
bosschaert Mar 10, 2025
f0f3e44
wip
bosschaert Mar 10, 2025
294ecc9
wip
bosschaert Mar 11, 2025
5743355
wip
bosschaert Mar 11, 2025
9c62d1a
refactor
bosschaert Mar 11, 2025
1e8c376
Log IMS profile
bosschaert Mar 11, 2025
d5129fc
wip
bosschaert Mar 11, 2025
94398c7
unit tests fixes
bosschaert Mar 12, 2025
6d7480f
wip
bosschaert Mar 12, 2025
95d74b8
Reduce data access scope
bosschaert Mar 12, 2025
a7904f3
wip
bosschaert Mar 12, 2025
68df727
Validation
bosschaert Mar 13, 2025
34fb3dd
Implement filter
bosschaert Mar 18, 2025
721bb50
wip
bosschaert Mar 18, 2025
669939f
wip
bosschaert Mar 18, 2025
436c07a
wip
bosschaert Mar 18, 2025
cfded43
wip
bosschaert Mar 18, 2025
e926424
wip
bosschaert Mar 18, 2025
0d364a9
wip
bosschaert Mar 18, 2025
4d3d48c
wip
bosschaert Mar 18, 2025
8e777a0
wip
bosschaert Mar 18, 2025
ccdddcf
wip
bosschaert Mar 18, 2025
2b454b5
wip
bosschaert Mar 18, 2025
dcaf01b
wi
bosschaert Mar 18, 2025
94782af
wip
bosschaert Mar 18, 2025
b053056
wip
bosschaert Mar 19, 2025
fe7dec2
Renaming
bosschaert Mar 20, 2025
95dd6c6
rename
bosschaert Mar 20, 2025
a7c72e9
tweak
bosschaert Mar 20, 2025
4c8eb5f
wip
bosschaert Mar 20, 2025
cbd8568
wip
bosschaert Mar 20, 2025
4a7ea44
relation
bosschaert Mar 20, 2025
6b3807c
testdata
bosschaert Mar 20, 2025
5cc3a35
wip
bosschaert Mar 20, 2025
7ce03ff
lookup
bosschaert Mar 20, 2025
3300aa4
wip
bosschaert Mar 20, 2025
2dc64fb
wip
bosschaert Mar 20, 2025
4a32403
wip
bosschaert Mar 21, 2025
fe41444
wip
bosschaert Mar 21, 2025
69e1610
wip
bosschaert Mar 21, 2025
7b59403
wip
bosschaert Mar 21, 2025
b236d46
wip
bosschaert Mar 21, 2025
717a3fa
wip
bosschaert Mar 21, 2025
73d3160
restruc
bosschaert Mar 21, 2025
a7402d7
Works
bosschaert Mar 21, 2025
41e461e
Rebase
bosschaert Mar 28, 2025
16b19fc
Update package lock
bosschaert Mar 28, 2025
bd122af
wip
bosschaert Mar 28, 2025
bc92fa5
wip
bosschaert Mar 28, 2025
6d72173
Update ims client
bosschaert Mar 28, 2025
ef588ab
Local IMS Client
bosschaert Mar 28, 2025
311c6c6
Update package lock
bosschaert Mar 28, 2025
f48006c
IMS Org
bosschaert Mar 28, 2025
d000137
Logging
bosschaert Mar 28, 2025
f4423cd
wip
bosschaert Mar 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vscode/*
coverage/*
test/*/fixtures/*
pkgs/*
16 changes: 8 additions & 8 deletions .github/actions/lint-test-coverage/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ runs:
run: npm run lint
shell: bash

- name: Test
run: npm run test
shell: bash
# - name: Test
# run: npm run test
# shell: bash

- name: Upload coverage to Codecov
if: ${{ inputs.upload_coverage == 'true' }}
uses: codecov/codecov-action@v5
with:
token: ${{ inputs.codecov_token }}
# - name: Upload coverage to Codecov
# if: ${{ inputs.upload_coverage == 'true' }}
# uses: codecov/codecov-action@v5
# with:
# token: ${{ inputs.codecov_token }}
5 changes: 5 additions & 0 deletions copy-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cp -r ../spacecat-shared_2/packages/spacecat-shared-data-access pkgs
cp -r ../spacecat-shared_2/packages/spacecat-shared-http-utils pkgs
cp -r ../spacecat-shared_2/packages/spacecat-shared-ims-client pkgs


41,241 changes: 19,429 additions & 21,812 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"build": "hedy -v --test-bundle",
"deploy": "hedy -v --deploy --test",
"deploy-routes": "hedy --no-build -no-hints -l major",
"deploy-ci": "hedy -v --deploy --test --pkgVersion=ci$CI_BUILD_NUM -l ci --cleanup-ci=24h",
"deploy-ci": "hedy -v --deploy --test --pkgVersion=ci$CI_BUILD_NUM -l david",
"deploy-secrets": "hedy --aws-update-secrets --params-file=secrets/secrets.env",
"docs": "npm run docs:lint && npm run docs:build",
"docs:build": "npx @redocly/cli build-docs -o ./docs/index.html --config docs/openapi/redocly-config.yaml",
Expand Down Expand Up @@ -67,10 +67,10 @@
"@adobe/helix-shared-wrap": "2.0.2",
"@adobe/helix-status": "10.1.5",
"@adobe/helix-universal-logger": "3.0.23",
"@adobe/spacecat-shared-data-access": "2.0.5",
"@adobe/spacecat-shared-data-access": "file:pkgs/spacecat-shared-data-access",
"@adobe/spacecat-shared-gpt-client": "1.4.5",
"@adobe/spacecat-shared-http-utils": "1.9.6",
"@adobe/spacecat-shared-ims-client": "1.5.4",
"@adobe/spacecat-shared-http-utils": "file:pkgs/spacecat-shared-http-utils",
"@adobe/spacecat-shared-ims-client": "file:pkgs/spacecat-shared-ims-client",
"@adobe/spacecat-shared-rum-api-client": "2.18.8",
"@adobe/spacecat-shared-slack-client": "1.5.4",
"@adobe/spacecat-shared-utils": "1.28.2",
Expand Down
17 changes: 17 additions & 0 deletions pkgs/spacecat-shared-data-access/.jsdoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"plugins": [],
"recurseDepth": 10,
"source": {
"includePattern": ".+\\.js(doc|x)?$",
"excludePattern": "(^|\\/|\\\\)_"
},
"sourceType": "module",
"tags": {
"allowUnknownTags": true,
"dictionaries": ["jsdoc","closure"]
},
"templates": {
"cleverLinks": false,
"monospaceLinks": false
}
}
6 changes: 6 additions & 0 deletions pkgs/spacecat-shared-data-access/.mocha-multi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"reporterEnabled": "spec,xunit",
"xunitReporterOptions": {
"output": "junit/test-results.xml"
}
}
9 changes: 9 additions & 0 deletions pkgs/spacecat-shared-data-access/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
coverage/
node_modules/
junit/
test/
docs/
logs/
test-results.xml
renovate.json
.*
1 change: 1 addition & 0 deletions pkgs/spacecat-shared-data-access/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
14 changes: 14 additions & 0 deletions pkgs/spacecat-shared-data-access/.nycrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"reporter": [
"lcov",
"text"
],
"check-coverage": true,
"lines": 100,
"branches": 97,
"statements": 100,
"all": true,
"include": [
"src/**/*.js"
]
}
17 changes: 17 additions & 0 deletions pkgs/spacecat-shared-data-access/.releaserc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
extends: "semantic-release-monorepo",
plugins: [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/changelog", {
"changelogFile": "CHANGELOG.md",
}],
"@semantic-release/npm",
["@semantic-release/git", {
"assets": ["package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}],
["@semantic-release/github", {}],
],
branches: ['main'],
};
1,984 changes: 1,984 additions & 0 deletions pkgs/spacecat-shared-data-access/CHANGELOG.md

Large diffs are not rendered by default.

74 changes: 74 additions & 0 deletions pkgs/spacecat-shared-data-access/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Adobe Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
74 changes: 74 additions & 0 deletions pkgs/spacecat-shared-data-access/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Contributing to Project Franklin

This project (like almost all of Project Franklin) is an Open Development project and welcomes contributions from everyone who finds it useful or lacking.

## Code Of Conduct

This project adheres to the Adobe [code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to cstaub at adobe dot com.

## Contributor License Agreement

All third-party contributions to this project must be accompanied by a signed contributor license. This gives Adobe permission to redistribute your contributions as part of the project. [Sign our CLA](http://opensource.adobe.com/cla.html)! You only need to submit an Adobe CLA one time, so if you have submitted one previously, you are good to go!

## Things to Keep in Mind

This project uses a **commit then review** process, which means that for approved maintainers, changes can be merged immediately, but will be reviewed by others.

For other contributors, a maintainer of the project has to approve the pull request.

# Before You Contribute

* Check that there is an existing issue in GitHub issues
* Check if there are other pull requests that might overlap or conflict with your intended contribution

# How to Contribute

1. Fork the repository
2. Make some changes on a branch on your fork
3. Create a pull request from your branch

In your pull request, outline:

* What the changes intend
* How they change the existing code
* If (and what) they breaks
* Start the pull request with the GitHub issue ID, e.g. #123

Lastly, please follow the [pull request template](.github/pull_request_template.md) when submitting a pull request!

Each commit message that is not part of a pull request:

* Should contain the issue ID like `#123`
* Can contain the tag `[trivial]` for trivial changes that don't relate to an issue



## Coding Styleguides

We enforce a coding styleguide using `eslint`. As part of your build, run `npm run lint` to check if your code is conforming to the style guide. We do the same for every PR in our CI, so PRs will get rejected if they don't follow the style guide.

You can fix some of the issues automatically by running `npx eslint . --fix`.

## Commit Message Format

This project uses a structured commit changelog format that should be used for every commit. Use `npm run commit` instead of your usual `git commit` to generate commit messages using a wizard.

```bash
# either add all changed files
$ git add -A
# or selectively add files
$ git add package.json
# then commit using the wizard
$ npm run commit
```

# How Contributions get Reviewed

One of the maintainers will look at the pull request within one week. Feedback on the pull request will be given in writing, in GitHub.

# Release Management

The project's committers will release to the [Adobe organization on npmjs.org](https://www.npmjs.com/org/adobe).
Please contact the [Adobe Open Source Advisory Board](https://git.corp.adobe.com/OpenSourceAdvisoryBoard/discuss/issues) to get access to the npmjs organization.

The release process is fully automated using `semantic-release`, increasing the version numbers, etc. based on the contents of the commit messages found.
Loading