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

should setting version.createdat change the default version if new time is the latest? #206

Closed
duglin opened this issue Dec 14, 2024 · 6 comments · Fixed by #222
Closed
Labels
AddToSpec Done v1 Required to be resolved for v1

Comments

@duglin
Copy link
Contributor

duglin commented Dec 14, 2024

It might look weird to see that the latest version isn't the one with the newest createdat timestamp.
(if things aren't sticky)

@Fannon
Copy link
Contributor

Fannon commented Dec 17, 2024

Suggestion: Treat createdat as a write-once property and problem goes away

Q: Why did we make it generally mutable at all? Unclear.

@duglin
Copy link
Contributor Author

duglin commented Dec 17, 2024

Looking at old notes, I think we made createdat mutable to allow for people to import the same entity again and override the value.

If we decide to continue on the path we agreed to on 12/17 then:

  • make createdat a write-once attribute. Meaning, set it during the create operation (system will set it if not provided by the client), but then any request to update it will be silently ignored.

@duglin duglin added the v1 Required to be resolved for v1 label Dec 17, 2024
@duglin
Copy link
Contributor Author

duglin commented Dec 17, 2024

Check with group in Jan to make sure we don't want to support the multi-import scenario.

@Fannon
Copy link
Contributor

Fannon commented Dec 18, 2024

In case someone wants to overwrite createdat they could also just first delete the old entries and insert them again as new entries. Can you multi-delete and then multi-insert?

@duglin
Copy link
Contributor Author

duglin commented Dec 18, 2024

yes you can do a delete first.

I'm curious why making createdat mutable would be a bad thing? In (most? all?) filesystems you can update it. Seems to me that once we allow an import to set it ( meaning it's not 100% owned by the server ) then why should we restrict it at all when (as you said) people could get around it by deleting and then doing a PUT. Seems we're just annoying people for no good reason.

@duglin
Copy link
Contributor Author

duglin commented Jan 8, 2025

1/8 call - yes do it. Keep createdat mutable and if it becomes newest then it becomes the default (assuming things aren't sticky)

duglin added a commit to duglin/xreg-spec that referenced this issue Jan 8, 2025
- clarify errors for bad paths and methods
- Remove "origin"
- add `/capabilities` API and "capabilities" Registry attr
  - requires `?inline=capabilities` reads, just presence on writes(like model)
  - remove "schemas" from model, moved into "capabilities"
- add 'xid'. Change xref to start with /
- add "labels" to model schema : Registry, Groups and Resources
  - add a "compatiblewith" well-known label
- add support for `relation` type of URLs
- add text about how to deal with sending incomplete results
  - error unless you can be tricky via something like pagination spec
- allow ?export, ?inline, ?filter on all APIs to control responses
- explain that "generated" errors != must send back to client - e.g. security
- use highest alphabetical versionid (case insensitive) when all versions have
  the same "createdat" value. Remove requirement for ?setdefaultversionid
- `DELETE RESOURCES` must put `epoch` under `meta` if present
- Primer: explain why GROUPS and RESOURCES have attribute name restrictions
- Primer: encourage domain/company prefix/suffixed on Groups (and Resources)
- Add `capability.enforcecompatibility` so servers can indicate whether they'll
  enforce the `compatibility` attribute on the owning Resource
- Clarify rules for updating Resources when dealing with 'xref'.
  - presence of any attribute on a 'write' to an xref'd resource is an error
  - xref->normal:
    - epoch = max(oldEpoch, targetResourceEpoch)+1
	- createdat = oldCreatedAt
	- modifiedat = now
- Updating a Version's `createdat` CAN make it the latest/default

Fixes xregistry#199
Fixes xregistry#216
Fixes xregistry#217
Fixes xregistry#213
Fixes xregistry#210
Fixes xregistry#211
Fixes xregistry#209
Fixes xregistry#187
Fixes xregistry#200
Fixes xregistry#202
Fixes xregistry#205
Fixes xregistry#207
Fixes xregistry#214
Fixes xregistry#203
Fixes xregistry#204
Fixes xregistry#206

Signed-off-by: Doug Davis <[email protected]>
@duglin duglin added the Done label Jan 8, 2025
duglin added a commit to duglin/xreg-spec that referenced this issue Jan 8, 2025
- clarify errors for bad paths and methods
- Remove "origin"
- add `/capabilities` API and "capabilities" Registry attr
  - requires `?inline=capabilities` reads, just presence on writes(like model)
  - remove "schemas" from model, moved into "capabilities"
- add 'xid'. Change xref to start with /
- add "labels" to model schema : Registry, Groups and Resources
  - add a "compatiblewith" well-known label
- add support for `relation` type of URLs
- add text about how to deal with sending incomplete results
  - error unless you can be tricky via something like pagination spec
- allow ?export, ?inline, ?filter on all APIs to control responses
- explain that "generated" errors != must send back to client - e.g. security
- use highest alphabetical versionid (case insensitive) when all versions have
  the same "createdat" value. Remove requirement for ?setdefaultversionid
- `DELETE RESOURCES` must put `epoch` under `meta` if present
- Primer: explain why GROUPS and RESOURCES have attribute name restrictions
- Primer: encourage domain/company prefix/suffixed on Groups (and Resources)
- Add `capability.enforcecompatibility` so servers can indicate whether they'll
  enforce the `compatibility` attribute on the owning Resource
- Clarify rules for updating Resources when dealing with 'xref'.
  - presence of any attribute on a 'write' to an xref'd resource is an error
  - xref->normal:
    - epoch = max(oldEpoch, targetResourceEpoch)+1
	- createdat = oldCreatedAt
	- modifiedat = now
- Updating a Version's `createdat` CAN make it the latest/default
- add support for "shortself"
- add "@" as a valid char for IDs

Fixes xregistry#199
Fixes xregistry#216
Fixes xregistry#217
Fixes xregistry#213
Fixes xregistry#210
Fixes xregistry#211
Fixes xregistry#209
Fixes xregistry#187
Fixes xregistry#200
Fixes xregistry#202
Fixes xregistry#205
Fixes xregistry#207
Fixes xregistry#214
Fixes xregistry#203
Fixes xregistry#204
Fixes xregistry#206
Fixes xregistry#212

Signed-off-by: Doug Davis <[email protected]>
duglin added a commit to duglin/xreg-spec that referenced this issue Jan 9, 2025
- clarify errors for bad paths and methods
- Remove "origin"
- add `/capabilities` API and "capabilities" Registry attr
  - requires `?inline=capabilities` reads, just presence on writes(like model)
  - remove "schemas" from model, moved into "capabilities"
- add 'xid'. Change xref to start with /
- add "labels" to model schema : Registry, Groups and Resources
  - add a "compatiblewith" well-known label
- add support for `relation` type of URLs
- add text about how to deal with sending incomplete results
  - error unless you can be tricky via something like pagination spec
- allow ?export, ?inline, ?filter on all APIs to control responses
- explain that "generated" errors != must send back to client - e.g. security
- use highest alphabetical versionid (case insensitive) when all versions have
  the same "createdat" value. Remove requirement for ?setdefaultversionid
- `DELETE RESOURCES` must put `epoch` under `meta` if present
- Primer: explain why GROUPS and RESOURCES have attribute name restrictions
- Primer: encourage domain/company prefix/suffixed on Groups (and Resources)
- Add `capability.enforcecompatibility` so servers can indicate whether they'll
  enforce the `compatibility` attribute on the owning Resource
- Clarify rules for updating Resources when dealing with 'xref'.
  - presence of any attribute on a 'write' to an xref'd resource is an error
  - xref->normal:
    - epoch = max(oldEpoch, targetResourceEpoch)+1
	- createdat = oldCreatedAt
	- modifiedat = now
- Updating a Version's `createdat` CAN make it the latest/default
- add support for "shortself"
- add "@" as a valid char for IDs

Fixes xregistry#199
Fixes xregistry#216
Fixes xregistry#217
Fixes xregistry#213
Fixes xregistry#210
Fixes xregistry#211
Fixes xregistry#209
Fixes xregistry#187
Fixes xregistry#200
Fixes xregistry#202
Fixes xregistry#205
Fixes xregistry#207
Fixes xregistry#214
Fixes xregistry#203
Fixes xregistry#204
Fixes xregistry#206
Fixes xregistry#212

Signed-off-by: Doug Davis <[email protected]>
duglin added a commit to duglin/xreg-spec that referenced this issue Jan 9, 2025
- clarify errors for bad paths and methods
- Remove "origin"
- add `/capabilities` API and "capabilities" Registry attr
  - requires `?inline=capabilities` reads, just presence on writes(like model)
  - remove "schemas" from model, moved into "capabilities"
- add 'xid'. Change xref to start with /
- add "labels" to model schema : Registry, Groups and Resources
  - add a "compatiblewith" well-known label
- add support for `relation` type of URLs
- add text about how to deal with sending incomplete results
  - error unless you can be tricky via something like pagination spec
- allow ?export, ?inline, ?filter on all APIs to control responses
- explain that "generated" errors != must send back to client - e.g. security
- use highest alphabetical versionid (case insensitive) when all versions have
  the same "createdat" value. Remove requirement for ?setdefaultversionid
- `DELETE RESOURCES` must put `epoch` under `meta` if present
- Primer: explain why GROUPS and RESOURCES have attribute name restrictions
- Primer: encourage domain/company prefix/suffixed on Groups (and Resources)
- Add `capability.enforcecompatibility` so servers can indicate whether they'll
  enforce the `compatibility` attribute on the owning Resource
- Clarify rules for updating Resources when dealing with 'xref'.
  - presence of any attribute on a 'write' to an xref'd resource is an error
  - xref->normal:
    - epoch = max(oldEpoch, targetResourceEpoch)+1
	- createdat = oldCreatedAt
	- modifiedat = now
- Updating a Version's `createdat` CAN make it the latest/default
- add support for "shortself"
- add "@" as a valid char for IDs

Fixes xregistry#199
Fixes xregistry#216
Fixes xregistry#217
Fixes xregistry#213
Fixes xregistry#210
Fixes xregistry#211
Fixes xregistry#209
Fixes xregistry#187
Fixes xregistry#200
Fixes xregistry#202
Fixes xregistry#205
Fixes xregistry#207
Fixes xregistry#214
Fixes xregistry#203
Fixes xregistry#204
Fixes xregistry#206
Fixes xregistry#212

Signed-off-by: Doug Davis <[email protected]>
duglin added a commit to duglin/xreg-spec that referenced this issue Jan 9, 2025
- clarify errors for bad paths and methods
- Remove "origin"
- add `/capabilities` API and "capabilities" Registry attr
  - requires `?inline=capabilities` reads, just presence on writes(like model)
  - remove "schemas" from model, moved into "capabilities"
- add 'xid'. Change xref to start with /
- add "labels" to model schema : Registry, Groups and Resources
  - add a "compatiblewith" well-known label
- add support for `relation` type of URLs
- add text about how to deal with sending incomplete results
  - error unless you can be tricky via something like pagination spec
- allow ?export, ?inline, ?filter on all APIs to control responses
- explain that "generated" errors != must send back to client - e.g. security
- use highest alphabetical versionid (case insensitive) when all versions have
  the same "createdat" value. Remove requirement for ?setdefaultversionid
- `DELETE RESOURCES` must put `epoch` under `meta` if present
- Primer: explain why GROUPS and RESOURCES have attribute name restrictions
- Primer: encourage domain/company prefix/suffixed on Groups (and Resources)
- Add `capability.enforcecompatibility` so servers can indicate whether they'll
  enforce the `compatibility` attribute on the owning Resource
- Clarify rules for updating Resources when dealing with 'xref'.
  - presence of any attribute on a 'write' to an xref'd resource is an error
  - xref->normal:
    - epoch = max(oldEpoch, targetResourceEpoch)+1
	- createdat = oldCreatedAt
	- modifiedat = now
- Updating a Version's `createdat` CAN make it the latest/default
- add support for "shortself"
- add "@" as a valid char for IDs

Fixes xregistry#199
Fixes xregistry#216
Fixes xregistry#217
Fixes xregistry#213
Fixes xregistry#210
Fixes xregistry#211
Fixes xregistry#209
Fixes xregistry#187
Fixes xregistry#200
Fixes xregistry#202
Fixes xregistry#205
Fixes xregistry#207
Fixes xregistry#214
Fixes xregistry#203
Fixes xregistry#204
Fixes xregistry#206
Fixes xregistry#212

Signed-off-by: Doug Davis <[email protected]>
@duglin duglin closed this as completed in 6a75351 Jan 9, 2025
Fannon pushed a commit to Fannon/xregistry that referenced this issue Jan 23, 2025
- clarify errors for bad paths and methods
- Remove "origin"
- add `/capabilities` API and "capabilities" Registry attr
  - requires `?inline=capabilities` reads, just presence on writes(like model)
  - remove "schemas" from model, moved into "capabilities"
- add 'xid'. Change xref to start with /
- add "labels" to model schema : Registry, Groups and Resources
  - add a "compatiblewith" well-known label
- add support for `relation` type of URLs
- add text about how to deal with sending incomplete results
  - error unless you can be tricky via something like pagination spec
- allow ?export, ?inline, ?filter on all APIs to control responses
- explain that "generated" errors != must send back to client - e.g. security
- use highest alphabetical versionid (case insensitive) when all versions have
  the same "createdat" value. Remove requirement for ?setdefaultversionid
- `DELETE RESOURCES` must put `epoch` under `meta` if present
- Primer: explain why GROUPS and RESOURCES have attribute name restrictions
- Primer: encourage domain/company prefix/suffixed on Groups (and Resources)
- Add `capability.enforcecompatibility` so servers can indicate whether they'll
  enforce the `compatibility` attribute on the owning Resource
- Clarify rules for updating Resources when dealing with 'xref'.
  - presence of any attribute on a 'write' to an xref'd resource is an error
  - xref->normal:
    - epoch = max(oldEpoch, targetResourceEpoch)+1
	- createdat = oldCreatedAt
	- modifiedat = now
- Updating a Version's `createdat` CAN make it the latest/default
- add support for "shortself"
- add "@" as a valid char for IDs

Fixes xregistry#199
Fixes xregistry#216
Fixes xregistry#217
Fixes xregistry#213
Fixes xregistry#210
Fixes xregistry#211
Fixes xregistry#209
Fixes xregistry#187
Fixes xregistry#200
Fixes xregistry#202
Fixes xregistry#205
Fixes xregistry#207
Fixes xregistry#214
Fixes xregistry#203
Fixes xregistry#204
Fixes xregistry#206
Fixes xregistry#212

Signed-off-by: Doug Davis <[email protected]>
Signed-off-by: Simon Heimler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AddToSpec Done v1 Required to be resolved for v1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants