Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamal2411 committed Apr 25, 2024
2 parents 6180a50 + 13821d9 commit a61313e
Show file tree
Hide file tree
Showing 8 changed files with 97 additions and 11 deletions.
6 changes: 6 additions & 0 deletions .buildkite/pipelines/pipeline_prune_staging_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## 🏠/.buildkite/pipelines/pipeline_prune_staging_docs.yml

steps:
- agents:
provider: "gcp"
command: .buildkite/scripts/pipelines/pipeline_prune_staging_docs.sh
38 changes: 38 additions & 0 deletions .buildkite/scripts/pipelines/pipeline_prune_staging_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

set -euo pipefail
set +x

# Expected env variables:
# * GPROJECT - GCE project name, e.g. elastic-bekitzur
# * GCE_ACCOUNT - credentials for the google service account (JSON blob)
if [[ -z "${GCE_ACCOUNT}" ]]; then
echo ":fire: GCP credentials not set." 1>&2
exit 1
fi
if [[ -z "${GPROJECT}" ]]; then
echo "GPROJECT is not set, e.g. 'GPROJECT=elastic-bekitzur'"
exit 1
fi

# Login to the cloud with the service account
gcloud auth activate-service-account --key-file <(echo "${GCE_ACCOUNT}")
unset GCE_ACCOUNT

EUI_DOCS_PROJECT=eui-docs-live
BUCKET=${GPROJECT}-${EUI_DOCS_PROJECT}

# https://cloud.google.com/storage/docs/gsutil/commands/ls
ls_options=(
-d # only list directories
-l # Print additional details about the subdir
)
echo "Listing all PR staging links"
gsutil ls "${ls_options[@]}" "gs://${BUCKET}/pr_*" # | sort -k 2 # sort by the 2nd field returned by -l which is the 'created by' timestamp

# https://cloud.google.com/storage/docs/gsutil/commands/rm
rm_options=(
-r # recursive, delete everything inside subdir
-m # enables multi-threading for large numbers of objects
)
# gsutil rm "${rm_options[@]}" "gs://${BUCKET}/pr_TODO"
43 changes: 42 additions & 1 deletion catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ spec:
build_tags: false
build_pull_requests: true
filter_enabled: true
# Start Buildkite jobs using the API only
filter_condition: |
(build.creator.name == 'elasticmachine' && build.pull_request.id != null)
teams:
Expand Down Expand Up @@ -258,6 +257,48 @@ spec:
everyone:
access_level: READ_ONLY

---
##
# buildkite-pipeline-eui-prune-staging-docs
# Run this pipeline manually in Buildkite's UI whenever we need to delete old PR staging servers
##

# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/e57ee3bed7a6f73077a3f55a38e76e40ec87a7cf/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
name: buildkite-pipeline-eui-prune-staging-docs
description: EUI pipeline to prune old PR staging docs
links: [
{
title: "EUI - prune-staging-docs",
url: "https://buildkite.com/elastic/eui-prune-staging-docs",
}
]

spec:
type: buildkite-pipeline
owner: group:eui-team
system: buildkite
implementation:
apiVersion: buildkite.elastic.dev/v1
kind: Pipeline
metadata:
name: eui-prune-staging-docs
spec:
repository: elastic/eui
pipeline_file: ".buildkite/pipelines/pipeline_prune_staging_docs.yml"
provider_settings:
# Start Buildkite jobs using the web UI only
build_branches: false
build_tags: false
build_pull_requests: false
teams:
eui-team:
access_level: MANAGE_BUILD_AND_READ
everyone:
access_level: READ_ONLY

---
##
# buildkite-pipeline-eui-release
Expand Down
1 change: 1 addition & 0 deletions changelogs/upcoming/7702.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Updated `EuiSearchBar` to allow the `@` special character in query string searches
3 changes: 3 additions & 0 deletions changelogs/upcoming/7708.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**Bug fixes**

- Fixed a visual bug with `EuiSuperDatePicker`'s absolute tab on small mobile screens
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
.euiDatePopoverContent .react-datepicker {
width: $euiFormMaxWidth;
max-width: 100%;

@include euiBreakpoint('xs') {
width: $euiDatePickerCalendarWidth;
}
}

.euiDatePopoverContent__padded {
Expand All @@ -11,10 +15,3 @@
.euiDatePopoverContent__padded--large {
padding: $euiSize;
}

@include euiBreakpoint('xs') {
.euiDatePopoverContent {
// Small screens drop the time selector
width: $euiDatePickerCalendarWidth;
}
}
4 changes: 2 additions & 2 deletions src/components/search_bar/query/default_syntax.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -871,12 +871,12 @@ describe('defaultSyntax', () => {
});

test('special characters', () => {
const ast = defaultSyntax.parse('*_-:');
const ast = defaultSyntax.parse('*_-:@');
const clauses = ast.getTermClauses();
expect(clauses).toEqual([
{
type: 'term',
value: '*_-:',
value: '*_-:@',
match: 'must',
},
]);
Expand Down
2 changes: 1 addition & 1 deletion src/components/search_bar/query/default_syntax.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ word
wordChar
= alnum
/ [-_*:/]
/ [-_*:/@]
/ escapedChar
/ extendedGlyph
Expand Down

0 comments on commit a61313e

Please sign in to comment.