question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue/TODO triage

See original GitHub issue

Let’s gather and discuss several smaller problems and TODOs, that could be then transformed into their own issues.

Improvements

  • Rule configuration should not be a single string - the options that rules require should be explicitly defined, multi-valued and possibly type-checked.
  • Metadata should be generic key-value, so parts of the application such as rules are able to store custom metadata. There should be a clean separation between meta values that users can just see, can see and edit, and private ones.
  • Artifact must exist (and there must be some content) to create artifact rules. Therefore users cannot define artifact rules (specifically application type CREATE) before actually adding the content for the first time (global rules work). The same applies in case of metadata. I suggest we separate creation of an artifact into just defining an empty version sequence (so the creation will not require initial content), and the first content will be added by an update operation. This may allow us to remove distinction between rule application type CREATE and UPDATE.
  • Alternatively, we could remove distinction between creation and updating of an artifact, because we are adding content in both cases.
  • getArtifactIds operation will become costly unless cached or paged
  • Consider making artifact immutable/append-only, i.e. you can not delete artifact versions, only whole artifact. A replacement would be the artifact state feature implemented using metadata (i.e. a DELETED state). This would support the git metaphor and auditing.

Code Quality

  • Use code quality tools and maven plugins, such as FindBugs or PMD
  • Use List instead of a SortedSet where ordering matters, there is a difference between ordered and sorted collection, unless it’s explicitly stated that it’s the same for the given use-case
  • More use of Optional and explicit null checks
  • Use of Lombok where possible
  • Improve StoredArtifact - rename it to ArtifactVersion / StoredArtifactVersion, rename field id to globalId, and it should contain artifactId field
  • Methods that return CompletionStage should not throw exceptions
  • We use long IDs, but some other systems use int. Make sure the conversion is safe and fails gracefully - there are unsafe calls to .intValue()
  • There is a possible race condition in generating IDs in JPA storage

Docs

  • Explicitly define basic concepts in a README and/or javadoc, e.g. what is an artifact, artifact version etc. Make sure this is reflected in naming of variables and methods.
  • In addition, add definitions (in javadoc) to all conceptual model classes (and enums) e.g. validity level and artifact state

TODOs/Tasks

  • Reflect ArtifactState in Compat API, i.e. if an artifact is in a DELETED state, do not return it in REST calls
  • Make sure Compat API supports multiple artifact types, in addition to Avro, if it’s done in the spec.

We can use this format to discuss issues that we come across in the code and replace TODO comments. Feel free to add more here.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jsenkocommented, Mar 2, 2021

@carlesarnal hi, can you take a look at the last two items related to the CCompat API and see if they are valid?

0reactions
EricWittmanncommented, Mar 3, 2021

Maybe create an issue for “Methods that return CompletionStage should not throw exceptions” but otherwise I say we close this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Emergency Department Triage - StatPearls - NCBI Bookshelf
The first question in the ESI triage algorithm for triage nurses asks whether "the patient requires immediate life-saving interventions" or ...
Read more >
INTERVENE‐HF: feasibility study of individualized, risk ...
Triage -HF Plus: a novel device-based remote monitoring pathway to identify worsening heart failure. ESC Heart Fail 2020; 7: 108– 117. Wiley ...
Read more >
Issue Management - Antrea
When new issues or PRs are created, the maintainers must triage the issue to ensure the information is valid, complete, and properly categorized...
Read more >
sql plan management - GitHub
TODO(Need Triage) · Issue: TODO(v4.0 backlog) · Issue: TODO(Low Priority) · Issue: TODO(High Priority) · Issue: DONE · PR: In Progress · PR:...
Read more >
Use of a Telephone Triage Protocol to Support Nurses and ...
Telephone triage is a systematic process by which a health care provider, often a nurse, assesses a patient over the phone, screens his/her ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found