Skip to content

Conversation

@mikehquan19
Copy link
Contributor

No description provided.

jpahm and others added 30 commits November 4, 2024 22:48
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.33.0 to 0.36.0.
- [Commits](golang/net@v0.33.0...v0.36.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Josh <20374744+jpahm@users.noreply.github.com>
* Added /course/:id/grades endpoint that returns all semesters

* Finished all endpoint functionallity, everything seems to work

* Removed a parameter I added to gradesAggregation

* Undo change in swagger.yaml

---------

Co-authored-by: Josh <20374744+jpahm@users.noreply.github.com>
* Empty routes

* Minor changes

* Working auth

* Better env

* some ai bs

* create if dne and return contents

* Revert .gitignore

* Don't start storage routes if key not present

* Comments

* Standardize error messages

* Restrict routes with password

* restriction comments

* Finalize cloud storage

---------

Co-authored-by: jpahm <jpahman2003@gmail.com>
Co-authored-by: jpahm <20374744+jpahm@users.noreply.github.com>
@mikehquan19 mikehquan19 marked this pull request as draft January 11, 2026 14:45
@mikehquan19 mikehquan19 self-assigned this Jan 12, 2026
@mikehquan19 mikehquan19 marked this pull request as ready for review January 12, 2026 10:14
@mikehquan19
Copy link
Contributor Author

mikehquan19 commented Jan 12, 2026

@ruba0s @sachi-jh @simar-rekhi, If you have time, can you please review this big PR?
I'm inviting you two because it is directly related to the events route or the dynamic pipline builder that each of you have been working on.

Just test all the course and events endpoints I would say. I will test the grades endpoints in the meantime.

@simar-rekhi
Copy link
Member

@mikehquan19, Sure

"former_offset": 0, // initialize the default value of offset & limit right in the map
"latter_offset": 0,
"limit": GetEnvLimit(),
// Returns the offsets and limit for pagination stage for aggregate endpoints pipeline
Copy link
Member

Choose a reason for hiding this comment

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

I notice how in the current version, you are appending the paginate entries directly into mongo.Pipeline. But appending a nil/empty bson.D as a stage might still produce invalid results causing runtime errors in future.

What we could do is initialize paginate with valid $skip stages (0) instead of nil and then override when a param is provided.

@mikehquan19, if you end up following the above route, let me know, we could discuss it in depth.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@simar-rekhi Initialized default stage for offset. Wdyt?

Copy link
Member

Choose a reason for hiding this comment

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

yep, just saw it. I think this will do the job!

Copy link
Member

Choose a reason for hiding this comment

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

If all goes well, we might even be able to test it using one of the unit tests in #283 ... wdyt?

paginateMap[field] = bson.D{{Key: "$skip", Value: offset}}
}
}

Copy link
Member

Choose a reason for hiding this comment

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

Reviewed configs/setup.go

Looks good to me for the most part!

might require some final touch ups if we end up changing the logic behind GetAggregateLimit()

Copy link
Member

Choose a reason for hiding this comment

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

I did review this. Seems okay. But would be great if someone having worked on Astra could give it a read.
@mikehquan19, @sachi-jh, @ruba0s

Copy link

Choose a reason for hiding this comment

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

I haven't worked on Astra, but this looks good to me too

Copy link
Member

Choose a reason for hiding this comment

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

again, needs review from @sachi-jh, @ruba0s, and @mikehquan19

Honestly, I did not find any major logic-based concerns. If it helps: it was mostly just comments re-formatted

Copy link

Choose a reason for hiding this comment

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

Looks good to me as well!

@mikehquan19
Copy link
Contributor Author

@simar-rekhi Thanks for these feedbacks! Super helpful! I will look into that getAggregateLimit() and discuss with you if I trip up somewhere.

@simar-rekhi
Copy link
Member

@mikehquan19, since there weren't any major issues apart from the GetAggregateLimit() one that we discussed & which you've already taken care of... lmk if i should I be approving the PR now?

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.

7 participants