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

Barebones Analysis Display + Audit Logs #144

Merged
merged 2 commits into from
Jan 18, 2024
Merged

Barebones Analysis Display + Audit Logs #144

merged 2 commits into from
Jan 18, 2024

Conversation

gbdubs
Copy link
Contributor

@gbdubs gbdubs commented Jan 17, 2024

  • Adds a simple FE for report display to the my-data page.
  • Adds a view button which allows a user to see the report, with a few failures.
  • Fixes an issue that wouldn't allow analyses to be listed appropriately (missing their artifact + blob population)
  • Fixes missing api FileType enums
  • Adds Audit Logging + Authorization Checking to the Streaming endpoint

@gbdubs gbdubs requested a review from bcspragu January 17, 2024 22:20
Copy link
Collaborator

@bcspragu bcspragu left a comment

Choose a reason for hiding this comment

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

Great stuff, nice to see it coming together!

cmd/server/pactasrv/conv/pacta_to_oapi.go Show resolved Hide resolved
frontend/components/analysis/ListView.vue Show resolved Hide resolved
frontend/components/analysis/ListView.vue Outdated Show resolved Hide resolved
reportsrv/reportsrv.go Outdated Show resolved Hide resolved
Comment on lines +118 to +122
} else {
s.logger.Info("poorly constructed analysis id", zap.String("path", string(aID)), zap.Error(err))
http.Error(w, http.StatusText(http.StatusNotFound), http.StatusNotFound)
return
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this a real issue we expect to happen? Generally I don't like to treat the entity ID prefixes as "load-bearing", they're simply a useful debugging/sanity checking tool. What's wrong with using db.IsErrNotFound?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question - I wanted to differentiate between them mostly for ease-of-debugging. There are some missing dependencies, and I'd like to distinguish in logs in such a way that we can alert about actual failures, and build in good filters for known missing deps.

reportsrv/reportsrv.go Outdated Show resolved Hide resolved
reportsrv/reportsrv.go Outdated Show resolved Hide resolved
@gbdubs gbdubs enabled auto-merge (squash) January 18, 2024 16:12
@gbdubs gbdubs merged commit 8d8c66a into main Jan 18, 2024
2 checks passed
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.

2 participants